Views
No views yet
ministral3 model type and Ministral3ForCausalLM class were added in transformers 5.0. Will not load on transformers 4.x.transformers<5. The nightly allows the upgrade. vLLM does not have a native Ministral3ForCausalLM — it falls back to TransformersForCausalLM, which delegates to transformers 5's implementation. This is the correct path: it handles Ministral3's attention scaling (llama_4_scaling_beta) and YaRN RoPE properly.Warning: Do NOT override the architecture toMistralForCausalLM. While the model will load and serve,MistralForCausalLMsilently drops the position-dependent attention scaling and YaRN RoPE parameters, producing wordier and less disciplined output.
| Property | Value |
|---|---|
| Architecture | Ministral3ForCausalLM |
| Model type | ministral3 |
| Parameters | 23.57B |
| Quantization | FP8 W8A8 static (float8_e4m3fn) |
| Layers | 40 |
| Hidden size | 5120 |
| Attention heads | 32 (8 KV heads) |
| Context length | 393K tokens (YaRN RoPE) |
| Vocab size | 131,072 |
| Size on disk | ~24.9 GB |
Mistral3ForConditionalGeneration) is a VLM containing:language_model.* prefix from all tensor namesMinistral3ForCausalLM / model_type: "ministral3" (requires transformers >= 5.0)modules_to_not_convertactivation_scale → input_scale, weight_scale_inv → weight_scale (same values, no inversion — both conventions use multiplication for dequantization)1pip install transformers>=5.0
2
3vllm serve levara/Devstral-Small-2-24B-TextOnly-FP8 \
4 --tensor-parallel-size 2 \
5 --max-model-len 32768 \
6 --enable-auto-tool-choice \
7 --tool-call-parser mistralTransformersForCausalLM backend, which delegates to transformers 5's native Ministral3ForCausalLM.1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4tokenizer = AutoTokenizer.from_pretrained("levara/Devstral-Small-2-24B-TextOnly-FP8")
5model = AutoModelForCausalLM.from_pretrained(
6 "levara/Devstral-Small-2-24B-TextOnly-FP8",
7 device_map="auto",
8 torch_dtype=torch.bfloat16,
9)dequantize: true in the quantization config.Mistral3ForConditionalGeneration loads the text backbone through its own internal code path, bypassing the model registry. When we extract the text model standalone, we need an architecture that preserves Ministral3-specific features:llama_4_scaling_beta) — dampens attention at longer positionsbeta_fast, beta_slow, mscale — context length scalingMistralForCausalLM ignores these config fields. Ministral3ForCausalLM (transformers 5) handles them correctly.