Instructions to use sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4") model = AutoModelForCausalLM.from_pretrained("sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4", 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 sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4
- SGLang
How to use sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 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 "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4" \ --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": "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4", "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 "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4" \ --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": "sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 with Docker Model Runner:
docker model run hf.co/sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4
llm-jp-4-32b-a3b-thinking-NVFP4
NVFP4 (W4A4) quantization of llm-jp/llm-jp-4-32b-a3b-thinking — a Japanese-native 32B-A3B Mixture-of-Experts thinking (reasoning) model. Quantized with llm-compressor 0.12.0 to the compressed-tensors nvfp4-pack-quantized format, ready to serve on NVIDIA Blackwell (SM120) GPUs via vLLM with the fast FLASHINFER_CUTLASS MoE kernel + CUDA graphs.
- ~20.7 GB (vs ~64 GB bf16). Experts NVFP4 4-bit;
lm_headkept in bf16; router/gates excluded. - Reasoning survives quantization and Japanese stays fluent; in internal testing it also writes look-ahead-safe trading/backtest code (uses
.shift(1)for next-bar execution).
⚠️ Important: padded MoE intermediate (960 → 1024)
The base model's moe_intermediate_size is 960, which is not accepted by vLLM's fast NVFP4 MoE kernels (FLASHINFER_CUTLASS/MARLIN require 128-aligned, and 960/TP=480 is rejected).
This checkpoint therefore has each expert's intermediate dimension zero-padded from 960 to 1024 before quantization, and config.json reports moe_intermediate_size: 1024. The padding is mathematically lossless (the 64 extra units have zero gate/up output rows and zero down-projection columns, contributing exactly 0), but the tensor shapes differ from the base model — keep this in mind if you diff against llm-jp/llm-jp-4-32b-a3b-thinking.
Serving (vLLM ≥ 0.22, Blackwell)
vllm serve sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4 \
--trust-remote-code \
--tensor-parallel-size 2 \ # or 4
--max-model-len 16384 \
--kv-cache-dtype fp8 \
--gpu-memory-utilization 0.90
# multi-GPU without NVLink/P2P: add --disable-custom-all-reduce and env NCCL_P2P_DISABLE=1
compressed-tensorsquantization is auto-detected; FLASHINFER_CUTLASS NVFP4 MoE backend is selected automatically on Blackwell.- Reasoning format: the model uses the harmony channel format (
analysis→final). vLLM 0.22'sopenai_gptossreasoning parser raisesNotImplementedErrorin non-streaming mode, so run without--reasoning-parser— the harmony text appears incontentand the user-facing answer follows thefinalchannel marker. (Use streaming if you want the parser to splitreasoning_content.) - A custom tokenizer (
llmjp4_tokenizer.py/llmjp4_harmony.py) ships with the model and loads via--trust-remote-code.
Measured throughput
On 2× / 4× NVIDIA RTX PRO 2000 Blackwell (16 GB, 288 GB/s, no NVLink), kv fp8, CUDA graphs:
| single-stream | aggregate | |
|---|---|---|
| TP=2 | ~119 tok/s | ~295 tok/s (4-way) |
| TP=4 | ~151–185 tok/s | ~465 (4-way) / ~750 (8-way) tok/s |
Quantization recipe
QuantizationModifier(targets="Linear", scheme="NVFP4", ignore=["lm_head", "re:.*mlp.gate$", "re:.*mlp.shared_expert_gate$"]), calibrated on neuralmagic/calibration (LLM split). MoE experts are linearized for per-expert calibration (calibrate_all_experts).
License & attribution
Apache-2.0, inherited from the base model llm-jp/llm-jp-4-32b-a3b-thinking by LLM-jp. Please cite and follow the base model's terms. This is a community quantization; no affiliation with LLM-jp.
- Downloads last month
- 89
Model tree for sakamakismile/llm-jp-4-32b-a3b-thinking-NVFP4
Base model
llm-jp/llm-jp-4-32b-a3b-thinking