LFM3-1.7B-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-1.7B-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.
Independent, unofficial conversion. Not affiliated with or endorsed by LiquidAI. The original model card is reproduced below.
File
| file | size | contents |
|---|---|---|
LFM3-1.7B-NVFP4.gguf | 1.71 GiB | 431 tensors, NVFP4 FFN + BF16 elsewhere |
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 on the exclude list, so only the FFN is 4-bit. The file lands at about 7.9 bits per weight overall because most tensors remain BF16. Everything here is text only.
Requirements
The GGUF 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-perplexity
./build/bin/llama-cli -m LFM3-1.7B-NVFP4.gguf -ngl 99 -c 4096
Measured on ROCm (AMD Radeon RX 9060 XT) with -dev ROCm0 -ngl 99 -c 2048: 11.3 t/s prompt, 99.1 t/s generation. Use -st / --single-turn for a one-shot prompt in this build.
How it was converted
Source: LiquidAI/LFM3-1.7B-NVFP4, ModelOpt NVFP4 (weight, weight_scale, weight_scale_2, input_scale). Only tensors that carry a weight_scale are repacked, which is why attention stays BF16.
No converter patch was needed. Pure NVFP4 checkpoints skip dequantisation entirely, and LFM3's modify_tensors is a pass-through for text weights (no head permutation or splitting), so the super-block repack is order-safe.
yes y | python convert_hf_to_gguf.py LiquidAI/LFM3-1.7B-NVFP4 --outfile LFM3-1.7B-NVFP4.gguf
Verified by reading the tensor types back out of the GGUF rather than trusting the exit code:
from gguf import GGUFReader
import collections
r = GGUFReader("LFM3-1.7B-NVFP4.gguf")
print(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-1.7B-NVFP4
NVFP4 version of LFM3-1.7B 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. Sliding-window and RoPE settings are unchanged.
Find architecture and usage details in the original model card.
Use with SGLang
Support for LFM3 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-1.7B-NVFP4 \
--reasoning-parser auto \
--tool-call-parser auto