nicolecello commited on
Commit
83d8d6e
·
verified ·
1 Parent(s): a1c9fc1
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - text-generation
5
+ tags:
6
+ - code-based-image-generation
7
+ - text-to-image
8
+ - javascript
9
+ size_categories:
10
+ - 10K<n<100K
11
+ ---
12
+
13
+ # CIG-SFT-35k
14
+
15
+ 35,000 prompt and program pairs for supervised fine-tuning of code-based image generation. Each program is a JavaScript
16
+ `render(stage)` function that draws the prompt in a 512x512 DOM element.
17
+
18
+ - Prompts: 50% GenEval2-style (17,500), 50% captions from [FLUX-Reason-6M](https://huggingface.co/datasets/LucasFang/FLUX-Reason-6M) (17,500, Apache-2.0).
19
+ - Programs: written by GPT-5.6 teachers, Sol 20% (7,000), Terra 30% (10,500), Luna 50% (17,500), with the same split in each prompt source.
20
+ - A program is kept if it finishes normally, renders a non-blank image, loads nothing external and fits in 8,192 tokens (prompt plus program).
21
+ - FLUX captions whose images are related to PRISM-Bench prompts were left out.
22
+
23
+ Used to train [CIG-27B-SFT](https://huggingface.co/codeimagegen/CIG-27B-SFT) and the models built on it.
24
+
25
+ ## Files
26
+
27
+ All files are in `geneval-flux/`.
28
+
29
+ | file | rows | what |
30
+ |---|---|---|
31
+ | `train.jsonl` | 35,000 | training set |
32
+ | `validation.jsonl` | 191 | held-out validation set, no overlap with train |
33
+ | `register.jsonl` | 35,000 | one record per training row: prompt, teacher and the checks it passed |
34
+ | `manifest.json` | | counts per source and teacher, and sha256 of the three jsonl files |
35
+ | `validation-manifest.json` | | counts and sha256 of `validation.jsonl` |
36
+
37
+ `train.jsonl` rows:
38
+
39
+ - `messages`: chat list of `system` (the task instruction), `user` (the prompt) and `assistant` (the program).
40
+ - `metadata`: `id`, `source_id`, `teacher`, `family` (`geneval2` or `flux`), `sequence_tokens`, `code_sha256`,
41
+ `image_sha256` (of the rendered image), `source` and `program_directory` (internal generation run and path).
42
+
43
+ `validation.jsonl` rows have the same `messages`; `metadata` holds `id`, `teacher`, `sft_sequence_tokens` and `code_sha256`.
44
+
45
+ `register.jsonl` records match `train.jsonl` by `id`. Main fields: `prompt`, `prompt_sha256`, `teacher`, `family`,
46
+ `finish_reason`, `code_bytes`, `prompt_tokens`, `completion_tokens_including_eos`, `sft_sequence_tokens`, `fits_8192`,
47
+ `external_url_flag`, `embedded_raster_flag`, `blank_gate_pass`, `spatial_rgb_rms_std`, `image_sha256`, `reject_reasons`.
48
+
49
+ ## Download
50
+
51
+ With the code at https://github.com/codeimagegen/codeimagegen:
52
+
53
+ ```bash
54
+ python train/fetch_sft_data.py geneval-flux --repo codeimagegen/CIG-SFT-35k --out data/sft/geneval-flux
55
+ ```
56
+
57
+ It downloads `geneval-flux/*` and checks every file's sha256 against the manifest. Or with `huggingface_hub`:
58
+
59
+ ```python
60
+ from huggingface_hub import snapshot_download
61
+ snapshot_download("codeimagegen/CIG-SFT-35k", repo_type="dataset", allow_patterns=["geneval-flux/*"])
62
+ ```
63
+
64
+ ## Citation
65
+
66
+ ```bibtex
67
+ @article{wang2026codeimagegen,
68
+ title = {Code-based Image Generation: Benchmarking, Baselines, and Improved Rewards},
69
+ author = {Wang, Nicole and Liang, Zhanhao and Leng, Xingjian and Zheng, Liang},
70
+ journal = {arXiv preprint},
71
+ year = {2026}
72
+ }
73
+ ```