File size: 8,005 Bytes
caecf04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b5def4e
 
 
 
caecf04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b5def4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ef7ccd
 
 
 
 
 
 
 
 
 
 
 
caecf04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4ef7ccd
caecf04
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
pretty_name: LowPoly Coder 4B training data
license: other
license_name: deepseek-output-terms
license_link: LICENSE.md
language:
- en
task_categories:
- text-generation
tags:
- code
- javascript
- threejs
- low-poly
- 3d
- synthetic
size_categories:
- 10K<n<100K
configs:
- config_name: stage1
  default: true
  data_files:
  - split: train
    path: data/stage1/train-*.parquet
  - split: validation
    path: data/stage1/validation-*.parquet
- config_name: stage2
  data_files:
  - split: train
    path: data/stage2/train-*.parquet
  - split: validation
    path: data/stage2/validation-*.parquet
---

# LowPoly Coder 4B training data

This is the complete training data of [`townbox/lowpoly-coder-4b`](https://huggingface.co/townbox/lowpoly-coder-4b), and nothing else. Each row pairs a one-sentence request for a 3D object ("Build a low-poly accent cabinet.") with the answer the model was trained to give: a short spec, then JavaScript that builds the object as a low-poly Three.js (r180) asset.

![Six rendered views (front, back, left, right, front-left, back-right) of the object built by row stage1-train-06570, "I need a low-poly farm ox.": a brown ox with a barrel body, four legs with dark hooves, a dark muzzle, two ivory horns and a thin tail.](images/six-views-stage1-train-06570.png)

*The object built by the code in row `stage1-train-06570` ("I need a low-poly farm ox."), seen from six sides. See [Examples](#examples) for more.*

## Contents

| Config | What it is | train | validation |
|---|---|---:|---:|
| `stage1` (default) | Answers written by DeepSeek V4.1 Flash, kept only when the code ran and passed technical checks | 7,599 | 412 |
| `stage2` | Answers written by the stage-1 model itself, kept only when they passed all technical checks and a vision model judged the render recognisable | 4,245 | 199 |

- **Training order:** the model was fine-tuned from `Qwen/Qwen3.5-4B` on `stage1`, then on `stage2`.
- **Validation:** `validation` rows were held out to monitor loss and were never trained on. The split is by object: an object's rows are either all in train or all in validation.
- **Coverage:** 10 categories, roughly balanced: animals; birds, sea creatures and bugs; containers and food; furniture; props; tools and gear; vehicles; architecture; fantasy and game; plants.

## Columns

| Column | Meaning |
|---|---|
| `id` | Row id, e.g. `stage2-train-00000` |
| `category` | One of the 10 categories |
| `prompt` | The user request |
| `response` | The exact assistant answer used as the training target |

Each `response` has the same shape:

~~~text
Asset: Accent cabinet
Triangle budget: 500
Brief: Narrow tall sideboard standing on four short tapered legs, front facing +Z: ...
Required named parts: carcass, top, door_left, door_right, knob_left, knob_right, leg_1, ...

```javascript
function buildAsset(THREE) { ... return group; }
```
~~~

## Examples

Every image here is a render of a real row. The row's own `response` code was run unchanged with Three.js r180 in a sandbox, and the meshes it built were drawn with flat shading. Nothing was modelled, edited or retouched by hand. Each tile is labelled with its source row's `id`, and [`images/examples.csv`](images/examples.csv) maps every tile to its row, with the SHA-256 of that row's `response`.

### Stage 1: answers by DeepSeek V4.1 Flash

![Six stage1 rows, front-left view: a farm ox (stage1-train-06570), a breeding barn (stage1-train-01290), a rooster (stage1-train-01716), a carton of waffle fries (stage1-train-07496), a grimoire (stage1-train-02876) and a conga drum (stage1-train-01809).](images/gallery-stage1.png)

### Stage 2: answers by the stage-1 model

![Six stage2 rows, front-left view: a utility vehicle (stage2-train-01374), a bottle jack (stage2-train-01487), an agave plant (stage2-train-01828), a pencil cup holder (stage2-train-02452), a cuttlefish (stage2-train-02913) and a game controller (stage2-train-00768).](images/gallery-stage2.png)

These 12 were picked by hand from the sample below because they read clearly, so they are better than a typical row.

### Uncurated sample

![A grid of 60 rendered objects, one category per row of the grid, each labelled with its request and row id: animals, buildings, birds and sea creatures, containers and food, fantasy items, furniture, plants and rocks, props, tools and vehicles.](images/sample-60-rows.png)

This is a seeded random sample (seed 20261105) of 60 `train` rows: 4 from `stage1` and 2 from `stage2` in each category. Every sampled row is shown, one category per line.
- **Checks:** all 60 ran and rendered. 59 passed every technical check: finite geometry within the spec's own triangle budget, every mesh a closed solid, and all parts joined in one piece. `stage2-train-00258` (a straw broom) uses 292 triangles, over the 250 its spec states.
- **Quality varies:** most are clearly the requested object, and a few only loosely, such as the robe hook (`stage2-train-02537`).

### Finding a row
The number in an `id` is the row's position in its config and split, so the farm ox is:

```python
from datasets import load_dataset

row = load_dataset("townbox/lowpoly-coder-4b-data", "stage1", split="train")[6570]
print(row["id"], row["prompt"])  # stage1-train-06570 I need a low-poly farm ox.
```

### 3D files (GLB)
[`glb/`](https://huggingface.co/datasets/townbox/lowpoly-coder-4b-data/tree/main/glb) holds one `.glb` file for each of the 60 sampled rows above. These include every row shown on this card. Each file is named after its source row: `glb/stage1-train-06570.glb` is the farm ox.
- **How they were made:** each row's `response` code was run unchanged through [`export_glb.mjs`](https://huggingface.co/townbox/lowpoly-coder-4b/blob/main/export_glb.mjs) from the model repo (Three.js r180). The result has one named node per mesh, flat shading and base colours only, with no textures.
- **Validation:** all 60 pass the Khronos glTF validator with 0 errors and 0 warnings. Their mesh and triangle counts match the renders above.
- **Source row:** each file also records its row in `asset.extras.source`: dataset, revision, config, split, id, category, prompt and the SHA-256 of the row's `response`.

```python
from huggingface_hub import hf_hub_download

path = hf_hub_download("townbox/lowpoly-coder-4b-data", "glb/stage1-train-06570.glb", repo_type="dataset")
```

## How it was used for training
Every row was trained as one chat:
- **System:** `system_prompt.md`, included in this repo and identical for every row.
- **User:** `prompt`.
- **Assistant:** `response`.

The chat template was applied with `enable_thinking=False`, and loss was computed on the assistant answer only.

```python
from datasets import load_dataset
from huggingface_hub import hf_hub_download

system = open(hf_hub_download("townbox/lowpoly-coder-4b-data", "system_prompt.md", repo_type="dataset")).read()
ds = load_dataset("townbox/lowpoly-coder-4b-data", "stage1", split="train")
ds = ds.map(lambda r: {"messages": [
    {"role": "system", "content": system},
    {"role": "user", "content": r["prompt"]},
    {"role": "assistant", "content": r["response"]},
]})
```

## Notes
- **Synthetic content:** all text is model-generated. Requests and specs describe everyday objects, creatures, buildings and fantasy props in one fixed low-poly "woodland" style and palette.
- **Code safety:** the code was run in a sandbox to check it, but it is still untrusted. Run it isolated if you execute it.
- **Images and 3D files:** `images/` holds the renders on this card and `examples.csv`, and `glb/` holds the 3D files of the same rows. They document the data and are not part of either config.
- **Licence:** the `stage1` answers are outputs of `deepseek/deepseek-v4.1-flash-1017`, and `stage2` answers come from a model trained on them. Use is subject to that model's licence and terms, and to the terms of the services it was accessed through. No separate licence has been chosen for this compilation; see `LICENSE.md`.