LFM3-VL-2B-NVFP4-GGUF with preserved NVFP4 weights
[!IMPORTANT] Requires llama.cpp build b12818 or newer. That is commit
a38695013, "ggml: support quant scales for fp8 and nvfp4" (#28898, merged 2026-11-27). The last release without it is b12816, so prebuilt binaries up to that fail. Check withllama-cli --version, which prints the build number and commit.
The released NVFP4 checkpoint LiquidAI/LFM3-VL-2B-NVFP4 repackaged as GGUF without dequantising it. The FFN projections stay NVFP4 with their block and global scales; attention, convolutions and embeddings stay BF16, exactly as LiquidAI published them. No requantisation, no imatrix, no extra loss.
The vision tower ships as a separate mmproj file, which is how llama.cpp handles multimodal models. Both files are needed for image input; the model GGUF alone runs text only.
Independent, unofficial conversion. Not affiliated with or endorsed by LiquidAI. The original model card is reproduced below.
Files
| file | size | contents |
|---|---|---|
LFM3-VL-2B-NVFP4.gguf | 1.71 GiB | text tower, 431 tensors, NVFP4 FFN + BF16 elsewhere |
mmproj-LFM3-VL-2B-NVFP4.gguf | 361 MiB | vision projector, 139 tensors, BF16 / F32 / F16 |
Text tower breakdown:
NVFP4 : 72 FFN gate/up/down, 4.5 bpw super-blocks (36 B per 64 weights)
F32 : 277 72 `.scale`, 72 `.input_scale`, norms
BF16 : 82 attention, convolutions, embeddings, lm_head
hf_quant_config.json says quant_algo: NVFP4, group_size: 16, with attention, conv, embeddings and lm_head excluded, so only the FFN is 4-bit. The vision encoder was never quantised, so the projector is plain BF16.
Requirements
The text side carries NVFP4 super-blocks plus external .scale and .input_scale tensors; older builds reject the types or load without the scales.
Backends: CPU, CUDA/HIP (ROCm) and Metal apply the scales.
[!WARNING] Vulkan is not supported yet. The Vulkan backend rejects any matmul that carries a weight scale (
ggml_get_src_scale()→supports_op()false), so these tensors silently fall back to CPU and inference crawls. Track the open PR: vulkan: add fp8 and scaled matmul support (#29791).
Run
git clone https://github.com/ggml-org/llama.cpp
cd llama.cpp
cmake -B build -DCMAKE_BUILD_TYPE=Release # add -DGGML_HIP=ON or -DGGML_CUDA=ON as needed
cmake --build build -j"$(nproc)" --target llama-cli llama-server
./build/bin/llama-cli -m LFM3-VL-2B-NVFP4.gguf \
--mmproj mmproj-LFM3-VL-2B-NVFP4.gguf \
-ngl 99 -c 4096
Text-only, without the projector:
./build/bin/llama-cli -m LFM3-VL-2B-NVFP4.gguf -ngl 99 -c 4096
Measured on ROCm (AMD Radeon RX 9060 XT) with -dev ROCm0 -ngl 99 -c 1024, projector loaded: 12.0 t/s prompt, 99.4 t/s generation. Use -st / --single-turn for a one-shot prompt in this build.
How it was converted
Two passes over the same checkpoint, ModelOpt NVFP4 (weight, weight_scale, weight_scale_2, input_scale):
yes y | python convert_hf_to_gguf.py LFM3-VL-2B-NVFP4 --outfile LFM3-VL-2B-NVFP4.gguf
yes y | python convert_hf_to_gguf.py LFM3-VL-2B-NVFP4 --mmproj --outfile mmproj-LFM3-VL-2B-NVFP4.gguf
Only tensors that carry a weight_scale are repacked, which is why the attention layers and the whole vision tower stay BF16. Pure NVFP4 checkpoints skip dequantisation entirely, and LFM3's text transform is a pass-through (no head permutation or splitting), so the super-block repack is order-safe.
Verified by reading the tensor types back out of both GGUFs rather than trusting the exit code:
from gguf import GGUFReader
import collections
for f in ("LFM3-VL-2B-NVFP4.gguf", "mmproj-LFM3-VL-2B-NVFP4.gguf"):
r = GGUFReader(f)
print(f, collections.Counter(str(t.tensor_type) for t in r.tensors))
llama-quantize cannot re-quantise this file, the NVFP4 tensors are a storage type with external scales.
LFM3-VL-2B-NVFP4
NVFP4 version of LFM3-VL-2B for GPU inference.
Language feed-forward weights and activations use NVFP4 (W4A4, 16-value blocks). Attention, convolutions, embeddings, the output head and norms stay in BF16. The vision encoder and projector also stay in BF16. Sliding-window and RoPE settings are unchanged.
Find architecture and usage details in the original model card.
Use with SGLang
Support for LFM3-VL in SGLang is in review in sgl-project/sglang#46858. We will update this card when a release supports it.
python -m sglang.launch_server \
--model-path LiquidAI/LFM3-VL-2B-NVFP4 \
--reasoning-parser auto \
--tool-call-parser auto