Devstral Small (24B SWE Agent) — Requisiti VRAM, matrice di quantizzazione e guida GPU
Devstral Small (24B SWE Agent) (Mistral, Apache-2.0) adotta un’architettura Transformer denso con 23.6B parametri residenti (23.6B attivi per token), 40 livelli e Attenzione a query raggruppate (GQA) con supporto fino a 131,072 token di contesto.
Simulatore interattivo di memoria e contesto per Devstral Small (24B SWE Agent)
Matrice VRAM per precisione e quantizzazione (contesto 8K / 32K / 128K)
| Precisione / Formato | bpw effettivi | Solo pesi | Totale @ ctx 8K | Totale @ ctx 32K | Totale @ ctx 128K | Fascia consigliata (@ 32K) |
|---|---|---|---|---|---|---|
| FP16 / BF16 | 16.00 bpw | 43.96 GB | 47.73 GB | 51.48 GB | 66.48 GB | NVIDIA A100 80GB |
| FP8 | 8.50 bpw | 23.35 GB | 26.51 GB | 30.26 GB | 45.26 GB | RTX 5090 32GB |
| Q8_0 | 8.50 bpw | 23.35 GB | 26.51 GB | 30.26 GB | 45.26 GB | RTX 5090 32GB |
| Q6_K | 6.56 bpw | 18.02 GB | 21.02 GB | 24.77 GB | 39.77 GB | RTX 5090 32GB |
| Q5_K_M | 5.69 bpw | 15.63 GB | 18.55 GB | 22.30 GB | 37.30 GB | RTX 3090 24GB |
| Q4_K_M | 4.85 bpw | 13.32 GB | 16.18 GB | 19.93 GB | 34.93 GB | RTX 3090 24GB |
| AWQ INT4 | 4.50 bpw | 12.36 GB | 15.19 GB | 18.94 GB | 33.94 GB | RTX 3090 24GB |
| IQ4_XS | 4.25 bpw | 11.68 GB | 14.48 GB | 18.23 GB | 33.23 GB | RTX 3090 24GB |
Compatibilità hardware e velocità di decodifica (Devstral Small (24B SWE Agent) @ Q4_K_M, contesto 32K)
| Fascia hardware | Memoria e banda | Richiesta (32K) | Compatibilità | Velocità decod. stimata |
|---|---|---|---|---|
| RTX 3090 24GB | 24 GB · 936 GB/s | 19.93 GB (83%) | Al limite (>90% usabile) | 29.8 tok/s |
| RTX 4090 24GB | 24 GB · 1008 GB/s | 19.93 GB (83%) | Al limite (>90% usabile) | 32.0 tok/s |
| RTX 5090 32GB | 32 GB · 1792 GB/s | 19.93 GB (62%) | Entra comodamente | 57.0 tok/s |
| Apple M-Max 64GB | 64 GB · 546 GB/s | 19.39 GB (30%) | Entra comodamente | 16.3 tok/s |
| Mac Studio 128GB | 128 GB · 546 GB/s | 19.39 GB (15%) | Entra comodamente | 16.3 tok/s |
| Mac Studio 192GB | 192 GB · 800 GB/s | 19.39 GB (10%) | Entra comodamente | 23.9 tok/s |
| NVIDIA A100 80GB | 80 GB · 2039 GB/s | 19.93 GB (25%) | Entra comodamente | 68.6 tok/s |
| NVIDIA H100 80GB | 80 GB · 3350 GB/s | 19.93 GB (25%) | Entra comodamente | 112.8 tok/s |
Parametri verificati dell’architettura Transformer
- Checkpoint ID
- mistralai/Devstral-Small-2505
- Ollama Tag
- devstral:24b
- License / Release
- Apache-2.0 · 2025-Q2
- Topologia e attenzione
- Transformer denso
- Meccanismo di attenzione
- Attenzione a query raggruppate (GQA)
- Parametri totali (B)
- 23.6B
- Parametri attivi / token (B)
- 23.6B
- Livelli nascosti / Dimensione nascosta
- 40 / 5120
- Teste di query / Teste KV
- 32Q / 8KV (d=128)
- Vocab / Max Position
- 131,072 / 131,072
I formati quantizzati memorizzano fattori di scala per blocco e zero-point accanto ai pesi interi compatti. Un checkpoint GGUF Q4_K_M a 4 bit richiede in media 4.85 bit effettivi per parametro (non 4.00), mentre Q8_0 si attesta a 8.50 bpw. Nei modelli Mixture-of-Experts, tutti gli esperti instradati e condivisi restano residenti in memoria per evitare il paging dall’host a ogni token.
La Grouped-Query Attention standard alloca 2 × L × H_kv × d_head × S × B × bytes_kv lungo i livelli. La Multi-head Latent Attention di DeepSeek (MLA) comprime chiavi e valori in L × (d_kv_lora + d_qk_rope) × S × B × bytes_kv, riducendo di oltre il 90% la memoria sui contesti lunghi. I modelli ibridi a finestra scorrevole limitano i livelli di attenzione locale a min(S, window_size) facendo scalare linearmente con S quelli globali.
Comandi rapidi vLLM e Ollama per Devstral Small (24B SWE Agent)
vllm serve mistralai/Devstral-Small-2505 \
--tensor-parallel-size 1 \
--max-model-len 32768 \
--max-num-seqs 8 \
--gpu-memory-utilization 0.95 \
--kv-cache-dtype fp8 \
--enable-prefix-caching \
--port 8000
# Save as Modelfile, then run: ollama create devstral-24b-custom -f Modelfile
FROM devstral:24b
PARAMETER num_ctx 32768
PARAMETER num_batch 512
PARAMETER flash_attn true
# Environment variables for ollama serve:
# OLLAMA_NUM_PARALLEL=8 OLLAMA_FLASH_ATTENTION=1 OLLAMA_KV_CACHE_TYPE=q8_0 ollama serve
Confronta modelli affini e di scala simile a pesi aperti
Mistral Small 3.1 (24B)
Mistral · 24B (GQA)
Codestral 22B
Mistral · 22.2B (GQA)
Mistral Large 2411 (123B)
Mistral · 123B (GQA)
Gemma 3 27B IT (Multimodal)
Google Gemma · 27.4B (HYBRID_SWA)
Qwen3-30B-A3B (MoE)
Qwen · 30.5B (GQA)
GLM-4-32B-0414
Zhipu GLM · 32B (GQA)