Skip to content

mistral

mistral

Mistral on vLLM (vllm.model_executor.models.mistral).

Llama's names and Llama's fused block. The block is vLLM's own subclass of Llama's; its attention and MLP are Llama's classes or Mistral's subclasses of them, as the checkpoint's config picks, so both are keyed.

RENAME module-attribute

RENAME = {'model.embed_tokens': 'embed_tokens', 'model.layers': 'layers', 'model.norm': 'norm'}

ENVOYS module-attribute

ENVOYS = {MistralDecoderLayer: Layer, MistralAttention: Attention, LlamaAttention: Attention, MistralMLP: Mlp, LlamaMLP: Mlp}

Layer

Layer(*args: Any, **kwargs: Any)

Bases: FusedLayer

The decoder block: forward(positions, hidden_states, residual) -> (hidden_states, residual).