Instructions to use chankhavu/smolmo-32b-nvfp4-step12750 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chankhavu/smolmo-32b-nvfp4-step12750 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chankhavu/smolmo-32b-nvfp4-step12750") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chankhavu/smolmo-32b-nvfp4-step12750") model = AutoModelForCausalLM.from_pretrained("chankhavu/smolmo-32b-nvfp4-step12750", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chankhavu/smolmo-32b-nvfp4-step12750 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chankhavu/smolmo-32b-nvfp4-step12750" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chankhavu/smolmo-32b-nvfp4-step12750", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chankhavu/smolmo-32b-nvfp4-step12750
- SGLang
How to use chankhavu/smolmo-32b-nvfp4-step12750 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "chankhavu/smolmo-32b-nvfp4-step12750" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chankhavu/smolmo-32b-nvfp4-step12750", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "chankhavu/smolmo-32b-nvfp4-step12750" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chankhavu/smolmo-32b-nvfp4-step12750", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chankhavu/smolmo-32b-nvfp4-step12750 with Docker Model Runner:
docker model run hf.co/chankhavu/smolmo-32b-nvfp4-step12750
smolmo-32b-nvfp4-step12750
NVFP4 (W4A4) quantization of
chankhavu/olmo_32b_fp8_niiattempt2_step12750_20260617055513,
a 32B dense Olmo3ForCausalLM SFT checkpoint, produced with
NVIDIA TensorRT Model Optimizer (ModelOpt) 0.44.0.
Quantization
- Format: NVFP4 E2M1 with block scaling —
group_size=16, FP8 E4M3 per-block scale + FP32 per-tensor scale, on both weights and activations (W4A4). - Kept in BF16:
lm_head; and, under the windowed attention recipe, the q/k/v/o projections of every full-attention layer and the windowed layer immediately preceding each full layer (Olmo3's 3:1 sliding:full pattern). All MLP layers are quantized to NVFP4. - KV cache: not quantized (kept BF16). For runtime FP8 KV cache use vLLM's
--kv-cache-dtype fp8.
This selective recipe protects the long-context global-attention path (the most sensitive component for reasoning) while quantizing the bulk of the parameters. Native FP4 compute requires Blackwell (SM100+, incl. RTX 6000 Pro / sm_120); older GPUs fall back to weight-only dequant.
Calibration
- Data:
chankhavu/smolmo-olmo3-calib-4k, all ~4000 samples. - Sequence length: 16384 tokens per sequence (truncated to natural length, no padding).
- Algorithm:
max(naive per-block absmax —NVFP4_DEFAULT_CFG). - Procedure: data-parallel calibration across 4 GPUs (one full replica per GPU,
each over a disjoint shard of the data);
amaxis merged across ranks by elementwise max — equivalent to single-process calibration over the full set.
Usage
Loads natively in vLLM and SGLang:
from vllm import LLM
llm = LLM(model="chankhavu/smolmo-32b-nvfp4-step12750")
NVFP4 compute requires a Blackwell GPU (SM100+); other GPUs dequantize to a higher precision for compute.
Notes
Exported as a unified Hugging Face checkpoint; quantization details are recorded in
hf_quant_config.json. This is PTQ only (no quantization-aware training). 4-bit
quantization will trail FP8/BF16 somewhat on hard math/reasoning benchmarks —
evaluate before relying on it.
- Downloads last month
- 11