NVIDIA-DGX-Spark
Collection
A collection of models I re-quantized, or distilled, or in some other way altered from the base to achieve a runnable status on one NVIDIA-DGX-Spark. • 2 items • Updated
How to use kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForMultimodalLM
tokenizer = AutoTokenizer.from_pretrained("kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4")
model = AutoModelForMultimodalLM.from_pretrained("kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4")
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]:]))How to use kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-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": "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4
How to use kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-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": "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-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": "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4 with Docker Model Runner:
docker model run hf.co/kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4
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 "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-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": "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'NVFP4 (4-bit floating point) quantization of Qwen/Qwen3-Coder-30B-A3B-Instruct, optimized for NVIDIA Blackwell GPUs.
| Property | Value |
|---|---|
| Base Model | Qwen/Qwen3-Coder-30B-A3B-Instruct |
| Architecture | Qwen3MoeForCausalLM (Mixture-of-Experts) |
| Total Parameters | 30B (3B active per token) |
| Experts | 128 per layer |
| Quantization | NVFP4 (4-bit NV floating point) |
| KV Cache | FP8 (8-bit float) |
| Original Precision | BF16 |
| Quantized Size | ~57 GB |
| Quantization Tool | NVIDIA ModelOpt 0.41.0 |
| Calibration | 512 samples (synthetic) |
| Hardware | NVIDIA DGX Spark GB10 (Blackwell) |
nvidia-modelopt with NVFP4_DEFAULT_CFGlm_head and all MoE router/gate layers (48 total) — these remain in original precision to preserve routing qualitysave_pretrained with manual quantization_config injection (ModelOpt 0.41.0 native export does not yet support Qwen3MoeExperts)vllm serve kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4 \
--quantization modelopt \
--trust-remote-code \
--max-model-len 32768
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4",
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(
"kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4"
)
{
"source_model": "Qwen/Qwen3-Coder-30B-A3B-Instruct",
"quantization": "NVFP4",
"tool": "nvidia-modelopt 0.41.0",
"export_method": "save_pretrained_manual",
"calib_size": 512,
"calib_dataset": "synthetic-random",
"hardware": "NVIDIA GB10 (Blackwell)",
"elapsed_sec": 472
}
save_pretrained fallback rather than ModelOpt's native HF checkpoint exporter, since Qwen3MoeExperts is not yet in ModelOpt 0.41.0's export allowlist. The quantization math is identical — only the serialization path differs.This model inherits the Apache 2.0 license from the base Qwen3-Coder-30B-A3B-Instruct model.
Base model
Qwen/Qwen3-Coder-30B-A3B-Instruct
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-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": "kleinpanic93/Qwen3-Coder-30B-A3B-Instruct-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'