File size: 1,595 Bytes
18a046b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
---
license: apache-2.0
base_model: Qwen/Qwen3.5-9B
library_name: transformers
pipeline_tag: text-generation
tags:
- code-based-image-generation
- text-to-image
- javascript
---

# CIG-9B-SFT

Qwen3.5-9B after SFT.

| | |
|---|---|
| Base | [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) |
| Training | SFT |
| Reward | none |
| Precision | fp16, merged weights |

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

## Use

```bash
python -m grpo.t2i.eval.generate_one --model codeimagegen/CIG-9B-SFT --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 26.4, AM 57.5.

## Other models

- [CIG-27B-IPR](https://huggingface.co/codeimagegen/CIG-27B-IPR)
- [CIG-27B-IR](https://huggingface.co/codeimagegen/CIG-27B-IR)
- [CIG-27B-PR](https://huggingface.co/codeimagegen/CIG-27B-PR)
- [CIG-27B-avgR](https://huggingface.co/codeimagegen/CIG-27B-avgR)
- [CIG-27B-SFT](https://huggingface.co/codeimagegen/CIG-27B-SFT)
- [CIG-9B-IPR](https://huggingface.co/codeimagegen/CIG-9B-IPR)
- Dataset: [CIG-SFT-35k](https://huggingface.co/datasets/codeimagegen/CIG-SFT-35k)

## Citation

```bibtex
@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}
}
```