Downloads · 30 days
19
19% of all-time downloads
pirola/Devstral-24B-NVFP4-NVembed
Devstral-24B-NVFP4-NVembed is a machine learning model from pirola. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
NVFP4-quantized Devstral-Small-2-24B-Instruct — a 24B-parameter dense coding model that fits in 12.4 GB VRAM and runs 31K context on a single RTX 5080.
Downloads · 30 days
19
19% of all-time downloads
All-time downloads
101
Public
Parameters
13.3B
13.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors13.3 GB · 100%
How the weights are stored.
U811.8B · 89%
From the Hugging Face model README
NVFP4-quantized Devstral-Small-2-24B-Instruct — a 24B-parameter dense coding model that fits in 12.4 GB VRAM and runs 31K context on a single RTX 5080.
lm_head, and embed_tokens quantized to NVFP4model.safetensorsMistralForCausalLM architecture — no --trust-remote-code neededShould work on any Blackwell GPU (RTX 50-series, B-series datacenter). Context length scales with available VRAM.
git clone https://github.com/vllm-project/vllm.git
cd vllm
git checkout 628302114 # v0.16.1rc1.dev34
# Apply patches (required for NVFP4 lm_head and embed_tokens)
git apply ../Devstral-24B-NVFP4-NVembed/vllm_patches.diff
# Build
pip install -e . --no-build-isolation
pip install flashinfer==0.6.4 # or latest compatible
export VLLM_TEST_FORCE_FP8_MARLIN=1
export VLLM_NVFP4_GEMM_BACKEND=marlin
export PYTORCH_ALLOC_CONF=expandable_segments:True
export VLLM_FLASHINFER_WORKSPACE_BUFFER_SIZE=$((64 * 1024 * 1024))
vllm serve ./Devstral-24B-NVFP4-NVembed \
--dtype bfloat16 \
--quantization modelopt \
--kv-cache-dtype fp8_e4m3 \
--max-model-len 31200 \
--no-enable-prefix-caching \
--max-num-seqs 1 \
--kv-cache-memory-bytes $((1950 * 1310720)) \
--num-gpu-blocks-override 1950 \
--tensor-parallel-size 1 \
--enable-chunked-prefill \
--max-num-batched-tokens 256 \
--enforce-eager \
--override-generation-config '{"temperature": 0.0, "max_tokens": 8000}'
curl -s http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model": "Devstral-24B-NVFP4-NVembed",
"messages": [{"role": "user", "content": "Write a Python function to check if a number is prime."}]}' \
| python3 -m json.tool
| Flag | Why |
|---|---|
--quantization modelopt | NVFP4 weight format from NVIDIA Model Optimizer |
--kv-cache-dtype fp8_e4m3 | FP8 KV cache — halves KV memory vs BF16 |
--no-enable-prefix-caching | Disabled for maximum VRAM headroom |
--max-num-seqs 1 | Single sequence — 16 GB VRAM budget |
--kv-cache-memory-bytes | Precise KV allocation (bypasses gpu_memory_utilization startup check) |
--num-gpu-blocks-override 1950 | Binary-searched max stable blocks for RTX 5080 |
--enforce-eager | CUDA graphs disabled — saves VRAM |
--override-generation-config | temperature=0 for deterministic coding output |
| Metric | Value |
|---|---|
| Model size | 12.4 GiB |
| Max context | 31,200 tokens |
| KV cache blocks | 1,950 |
| KV cache size | ~2.4 GiB |
| KV per token | 80 KB (40 layers x 8 KV heads x 128 dim x 2 x 1 byte) |
| Architecture | Dense, 40 layers, GQA (32 Q / 8 KV heads) |
| Parameters | 24B |
nvidia-modelopt==0.41.0)The included vllm_patches.diff modifies 3 files based on vLLM commit 628302114:
| File | Change |
|---|---|
modelopt.py | NVFP4 lm_head + embed_tokens support; PerTensorScaleParameter init fix (uninitialized slots caused inf in merged linears) |
vocab_parallel_embedding.py | FP8 weight dtype preservation + BF16 cast in embedding() |
linear.py | FP8 weight cast in forward pass |
Some of these patches have been submitted upstream and may become unnecessary in future vLLM releases: