Instructions to use prithivMLmods/CIG-9B-SFT-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/CIG-9B-SFT-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/CIG-9B-SFT-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("prithivMLmods/CIG-9B-SFT-NVFP4") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/CIG-9B-SFT-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 prithivMLmods/CIG-9B-SFT-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/CIG-9B-SFT-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": "prithivMLmods/CIG-9B-SFT-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/CIG-9B-SFT-NVFP4
- SGLang
How to use prithivMLmods/CIG-9B-SFT-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 "prithivMLmods/CIG-9B-SFT-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": "prithivMLmods/CIG-9B-SFT-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 "prithivMLmods/CIG-9B-SFT-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": "prithivMLmods/CIG-9B-SFT-NVFP4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/CIG-9B-SFT-NVFP4 with Docker Model Runner:
docker model run hf.co/prithivMLmods/CIG-9B-SFT-NVFP4
CIG-9B-SFT-NVFP4
CIG-9B-SFT-NVFP4 is a 9B-parameter NVFP4-quantized build of CIG-9B-SFT, based on Qwen3.5-9B and fine-tuned on the
CIG-SFT-35kdataset using supervised fine-tuning (SFT) without reinforcement learning rewards. Rather than generating pixels directly, it converts text prompts into JavaScript programs that are executed and rendered in headless Chrome to produce images. Quantized using GPTQ (Accurate Post-Training Quantization for Generative Pre-trained Transformers), GPTQ calibration helps stabilize and optimize NVFP4 compression, preserving accuracy close to the full-precision weights while reducing memory usage and accelerating inference on NVFP4-capable hardware. The original model reports a GM score of 26.4 and an AM score of 57.5 on GenEval2; these benchmarks have not been independently verified on this NVFP4 build. Released under the Apache 2.0 license.
MTP β Speculative Decoding: Yes | NVFP4 GGUF Available Here: CIG-9B-SFT-GGUF
Quantization Recipe
The model is quantized using the GPTQModifier with the NVFP4 quantization scheme.
default_stage:
default_modifiers:
GPTQModifier:
targets: [Linear]
ignore: [lm_head, 're:.*visual.*']
scheme: NVFP4
weight_observer: imatrix_mse
bypass_divisibility_checks: false
requires_calibration_data: true
block_size: 128
dampening_frac: 0.01
batched_quantization: auto
Model Files
| File Name | File Type | File Size | File Link | Description |
|---|---|---|---|---|
| chat_template.jinja | Jinja Template | 7.76 kB | Link | Chat template for formatting conversations and prompts. |
| config.json | JSON | 3.7 kB | Link | Core model architecture and configuration parameters. |
| generation_config.json | JSON | 116 Bytes | Link | Default text generation parameters (e.g., temperature, top_p). |
| model-00001-of-00002.safetensors | Safetensors | 4.99 GB | Link | Model weight shard 1/2. Required to load the model. |
| model-00002-of-00002.safetensors | Safetensors | 2.97 GB | Link | Model weight shard 2/2. Required to load the model. |
| model.safetensors.index.json | JSON | 108 kB | Link | Index file mapping model weights to their respective shards. |
| model_mtp.safetensors | Safetensors | 487 MB | Link | Multi-Token Prediction (MTP) auxiliary model weights, used to speed up generation. |
| recipe.yaml | YAML | 334 Bytes | Link | Configuration file detailing the quantization or training recipe (e.g., NVFP4 parameters). |
| tokenizer.json | JSON | 20 MB | Link | Complete tokenizer vocabulary and encoding rules. |
| tokenizer_config.json | JSON | 1.13 kB | Link | Tokenizer-specific configuration parameters. |
License and Attribution
This model is based on and/or incorporates the following open-source projects and models:
- Qwen3.5-9B: https://huggingface.co/Qwen/Qwen3.5-9B
- CIG-9B-SFT: https://huggingface.co/CodeImageGen/CIG-9B-SFT
- llm-compressor: https://github.com/vllm-project/llm-compressor
This model is released under the Apache License 2.0.
- Downloads last month
- 16