Instructions to use axteam/Nanbeige4.3-33B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use axteam/Nanbeige4.3-33B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="axteam/Nanbeige4.3-33B-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("axteam/Nanbeige4.3-33B-NVFP4") model = AutoModelForCausalLM.from_pretrained("axteam/Nanbeige4.3-33B-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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use axteam/Nanbeige4.3-33B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "axteam/Nanbeige4.3-33B-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": "axteam/Nanbeige4.3-33B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/axteam/Nanbeige4.3-33B-NVFP4
- SGLang
How to use axteam/Nanbeige4.3-33B-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 "axteam/Nanbeige4.3-33B-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": "axteam/Nanbeige4.3-33B-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 "axteam/Nanbeige4.3-33B-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": "axteam/Nanbeige4.3-33B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use axteam/Nanbeige4.3-33B-NVFP4 with Docker Model Runner:
docker model run hf.co/axteam/Nanbeige4.3-33B-NVFP4
Nanbeige4.3-33B · NVFP4 (W4A4, FP4)
4-bit quantization of Nanbeige/Nanbeige4.3-33B for vLLM serving. Quantized by axteam.
| Base model | Nanbeige/Nanbeige4.3-33B |
| Method | NVFP4 (W4A4, FP4) |
| Format | compressed-tensors nvfp4-pack-quantized |
| Weights / activations | W4A4 — FP4 (E2M1) weights group 16 + FP8 scale, FP4 activations |
| Architecture | Dense (Llama architecture) · 52 layers · text-only |
| Size on disk | ~20.6 GB |
| Calibration | 256 samples |
| License | apache-2.0 |
Quantization details
- Scheme — W4A4 — FP4 (E2M1) weights group 16 + FP8 scale, FP4 activations, stored as compressed-tensors
nvfp4-pack-quantized. - Kept in BF16 — token embeddings, the LM head, and all RMSNorms. Only attention & MLP projections are quantized.
- Post-training quantization (no retraining). Tokenizer /
chat_templateidentical to the original.
Evaluation (measured)
Fidelity to the BF16 original on an internal mixed EN/KO set (100 prompts).
| Metric | This model | BF16 original |
|---|---|---|
| Perplexity (lower = closer) | 1.3594 | 1.2232 (+11.1%) |
| Top-1 next-token agreement | 90.2% | 99.1% |
⚠️ Note: noticeable 4-bit degradation; prefer 8-bit (FP8 / AWQ INT8).
Usage (vLLM)
Start an OpenAI-compatible server:
vllm serve axteam/Nanbeige4.3-33B-NVFP4 --max-model-len 32768
Query it:
curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
"model": "axteam/Nanbeige4.3-33B-NVFP4",
"messages": [{"role": "user", "content": "대한민국의 수도는 어디인가요?"}],
"max_tokens": 512
}'
Offline inference in Python:
from vllm import LLM, SamplingParams
llm = LLM(model="axteam/Nanbeige4.3-33B-NVFP4", max_model_len=32768)
params = SamplingParams(max_tokens=1024)
out = llm.chat([{"role": "user", "content": "Explain model quantization in two sentences."}], params)
print(out[0].outputs[0].text)
Thinking mode is on by default in the chat template; to turn it off pass
chat_template_kwargs={"enable_thinking": False}(Pythonllm.chat(..., chat_template_kwargs=...), or"chat_template_kwargs": {"enable_thinking": false}in the request body).
Reducing KV-cache memory (optional, serve-time)
The KV cache is kept in BF16 by default. KV-cache precision is a runtime choice, independent of the weight quantization above; for long contexts or large batches FP8 roughly halves KV-cache memory:
vllm serve axteam/Nanbeige4.3-33B-NVFP4 --kv-cache-dtype fp8
License
Quantized derivative of Nanbeige/Nanbeige4.3-33B (apache-2.0).
한국어 요약
Nanbeige/Nanbeige4.3-33B 를 NVFP4 (W4A4, FP4) 로 양자화한 서빙용(4-bit) 모델입니다. 작성: axteam.
- 방식 — 가중치·활성화 FP4(W4A4). Blackwell FP4 텐서코어. 형식 compressed-tensors
nvfp4-pack-quantized. - BF16 유지 — 임베딩·LM 헤드·모든 norm. attention·MLP projection 만 양자화.
- PTQ(재학습 없음), 토크나이저·chat_template 원본 동일.
- 품질(실측) — BF16 대비 perplexity 1.3594(원본 1.2232, +11.1%), top-1 90.2%(원본 99.1%).
- ⚠️ 4비트 열화 큼 — 8비트 권장.
- 실행 —
vllm serve axteam/Nanbeige4.3-33B-NVFP4 --max-model-len 32768로 OpenAI 호환 서버(포트 8000), 또는 PythonLLM(model="axteam/Nanbeige4.3-33B-NVFP4").chat(...)(위 예시). thinking 끄기:chat_template_kwargs={"enable_thinking": False}. - KV 캐시 절감(런타임) —
--kv-cache-dtype fp8.
- Downloads last month
- 70
Model tree for axteam/Nanbeige4.3-33B-NVFP4
Base model
Nanbeige/Nanbeige4.3-33B-Base