Text Generation
Transformers
Safetensors
qwen3_5_text
w4a4
nvfp4
agentic-coding
reasoning
tool-use
on-device
laptop-scale
sft
reinforcement-learning
conversational
modelopt
Instructions to use jsbaicenter/Aztec-Coder-4B-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jsbaicenter/Aztec-Coder-4B-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jsbaicenter/Aztec-Coder-4B-NVFP4") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jsbaicenter/Aztec-Coder-4B-NVFP4") model = AutoModelForCausalLM.from_pretrained("jsbaicenter/Aztec-Coder-4B-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 jsbaicenter/Aztec-Coder-4B-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jsbaicenter/Aztec-Coder-4B-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": "jsbaicenter/Aztec-Coder-4B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jsbaicenter/Aztec-Coder-4B-NVFP4
- SGLang
How to use jsbaicenter/Aztec-Coder-4B-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 "jsbaicenter/Aztec-Coder-4B-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": "jsbaicenter/Aztec-Coder-4B-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 "jsbaicenter/Aztec-Coder-4B-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": "jsbaicenter/Aztec-Coder-4B-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jsbaicenter/Aztec-Coder-4B-NVFP4 with Docker Model Runner:
docker model run hf.co/jsbaicenter/Aztec-Coder-4B-NVFP4
Upload hf_quant_config.json with huggingface_hub
Browse files- hf_quant_config.json +46 -0
hf_quant_config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"producer": {
|
| 3 |
+
"name": "modelopt",
|
| 4 |
+
"version": "0.44.0"
|
| 5 |
+
},
|
| 6 |
+
"quantization": {
|
| 7 |
+
"quant_algo": "NVFP4",
|
| 8 |
+
"kv_cache_quant_algo": null,
|
| 9 |
+
"group_size": 16,
|
| 10 |
+
"exclude_modules": [
|
| 11 |
+
"lm_head",
|
| 12 |
+
"model.layers.0.linear_attn*",
|
| 13 |
+
"model.layers.1.linear_attn*",
|
| 14 |
+
"model.layers.10.linear_attn*",
|
| 15 |
+
"model.layers.11.self_attn*",
|
| 16 |
+
"model.layers.12.linear_attn*",
|
| 17 |
+
"model.layers.13.linear_attn*",
|
| 18 |
+
"model.layers.14.linear_attn*",
|
| 19 |
+
"model.layers.15.self_attn*",
|
| 20 |
+
"model.layers.16.linear_attn*",
|
| 21 |
+
"model.layers.17.linear_attn*",
|
| 22 |
+
"model.layers.18.linear_attn*",
|
| 23 |
+
"model.layers.19.self_attn*",
|
| 24 |
+
"model.layers.2.linear_attn*",
|
| 25 |
+
"model.layers.20.linear_attn*",
|
| 26 |
+
"model.layers.21.linear_attn*",
|
| 27 |
+
"model.layers.22.linear_attn*",
|
| 28 |
+
"model.layers.23.self_attn*",
|
| 29 |
+
"model.layers.24.linear_attn*",
|
| 30 |
+
"model.layers.25.linear_attn*",
|
| 31 |
+
"model.layers.26.linear_attn*",
|
| 32 |
+
"model.layers.27.self_attn*",
|
| 33 |
+
"model.layers.28.linear_attn*",
|
| 34 |
+
"model.layers.29.linear_attn*",
|
| 35 |
+
"model.layers.3.self_attn*",
|
| 36 |
+
"model.layers.30.linear_attn*",
|
| 37 |
+
"model.layers.31.self_attn*",
|
| 38 |
+
"model.layers.4.linear_attn*",
|
| 39 |
+
"model.layers.5.linear_attn*",
|
| 40 |
+
"model.layers.6.linear_attn*",
|
| 41 |
+
"model.layers.7.self_attn*",
|
| 42 |
+
"model.layers.8.linear_attn*",
|
| 43 |
+
"model.layers.9.linear_attn*"
|
| 44 |
+
]
|
| 45 |
+
}
|
| 46 |
+
}
|