Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions csrc/models/chatglm/chatglm_for_causal_lm.hpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
#pragma once

#include "../../layers/common_modules.hpp"
#include "../glm4/glm4_attention.hpp"
#include <memory>

namespace infinilm::models::chatglm {

using ChatglmMLP = infinilm::layers::MLP;

// Reuse Glm4Attention as ChatGLM and GLM4 share the identical attention layer
using ChatglmAttention = infinilm::models::glm4::Glm4Attention;
using ChatglmAttention = infinilm::layers::attention::Attention;

using ChatglmDecoderLayer = infinilm::layers::causal_lm_templates::TextDecoderLayer<ChatglmAttention, ChatglmMLP>;

Expand Down
183 changes: 0 additions & 183 deletions csrc/models/glm4/glm4_attention.cpp

This file was deleted.

50 changes: 0 additions & 50 deletions csrc/models/glm4/glm4_attention.hpp

This file was deleted.

5 changes: 3 additions & 2 deletions csrc/models/glm4/glm4_decoder_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
#include "../../backends/attention_backends.hpp"
#include "../../config/model_config.hpp"
#include "../../engine/distributed/distributed.hpp"
#include "../../layers/mlp/mlp.hpp"
#include "glm4_attention.hpp"
#include "../../layers/common_modules.hpp"
#include "infinicore/nn/module.hpp"
#include "infinicore/nn/rmsnorm.hpp"

namespace infinilm::models::glm4 {

using Glm4Attention = infinilm::layers::attention::Attention;

class Glm4DecoderLayer : public infinicore::nn::Module {
public:
Glm4DecoderLayer(std::shared_ptr<infinilm::config::ModelConfig> model_config,
Expand Down