How to use from
vLLM
Install from pip and serve model
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "CodeImageGen/CIG-9B-IPR"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
	-H "Content-Type: application/json" \
	--data '{
		"model": "CodeImageGen/CIG-9B-IPR",
		"messages": [
			{
				"role": "user",
				"content": "What is the capital of France?"
			}
		]
	}'
Use Docker
docker model run hf.co/CodeImageGen/CIG-9B-IPR
Quick Links

CIG-9B-IPR

Qwen3.5-9B after SFT then GRPO with the IPR reward: the judge sees the program and the rendered image.

Base Qwen/Qwen3.5-9B
Training SFT, then GRPO
Reward IPR (program + image)
Precision fp16, merged weights

The model writes a JavaScript program for a text prompt. The image is the program rendered in headless Chrome.

Use

python -m grpo.t2i.eval.generate_one --model codeimagegen/CIG-9B-IPR --prompt "a red fox in the snow" --out fox.png

Setup (renderer, environment): https://github.com/codeimagegen/codeimagegen

model-mtp.safetensors is the MTP head for speculative decoding. It is optional.

Results

GenEval2: GM 38.4, AM 69.7.

Other models

Citation

@article{wang2026codeimagegen,
  title   = {Code-based Image Generation: Benchmarking, Baselines, and Improved Rewards},
  author  = {Wang, Nicole and Liang, Zhanhao and Leng, Xingjian and Zheng, Liang},
  journal = {arXiv preprint},
  year    = {2026}
}
Downloads last month
-
Safetensors
Model size
9B params
Tensor type
F16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for CodeImageGen/CIG-9B-IPR

Finetuned
Qwen/Qwen3.5-9B
Finetuned
(1,588)
this model
Quantizations
2 models