glm¶
glm
¶
GLM-4, the first generation (GlmForCausalLM), on vLLM (vllm.model_executor.models.glm).
vLLM runs it as a Llama: GlmForCausalLM subclasses its
LlamaForCausalLM, builds Llama's own modules and then switches each
attention's rotary embedding to the interleaved (not NeoX) layout and drops
the output projection's bias. So the names, the fused block and the classes
are Llama's; the MLP's gate and up projections are fused into one
gate_up_proj on both engines.
RENAME
module-attribute
¶
ENVOYS
module-attribute
¶
ENVOYS = {LlamaDecoderLayer: Layer, LlamaAttention: Attention, LlamaMLP: Mlp}
Layer
¶
Bases: FusedLayer
The decoder block: forward(positions, hidden_states, residual) -> (hidden_states, residual).