Datasets:
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Error code: DatasetGenerationError
Exception: CastError
Message: Couldn't cast
messages: list<item: struct<role: string, content: string>>
child 0, item: struct<role: string, content: string>
child 0, role: string
child 1, content: string
base: string
task: string
turns: int64
to
{'messages': List({'role': Value('string'), 'content': Value('string')})}
because column names don't match
Traceback: Traceback (most recent call last):
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1835, in _prepare_split_single
for key, table in generator:
^^^^^^^^^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 621, in wrapped
for item in generator(*args, **kwargs):
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
messages: list<item: struct<role: string, content: string>>
child 0, item: struct<role: string, content: string>
child 0, role: string
child 1, content: string
base: string
task: string
turns: int64
to
{'messages': List({'role': Value('string'), 'content': Value('string')})}
because column names don't match
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1379, in compute_config_parquet_and_info_response
parquet_operations, partial, estimated_dataset_info = stream_convert_to_parquet(
~~~~~~~~~~~~~~~~~~~~~~~~~^
builder, max_dataset_size_bytes=max_dataset_size_bytes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 956, in stream_convert_to_parquet
builder._prepare_split(split_generator=splits_generators[split], file_format="parquet")
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1702, in _prepare_split
for job_id, done, content in self._prepare_split_single(
~~~~~~~~~~~~~~~~~~~~~~~~~~^
gen_kwargs=gen_kwargs, job_id=job_id, **_prepare_split_args
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
):
^
File "/usr/local/lib/python3.14/site-packages/datasets/builder.py", line 1887, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
messages list |
|---|
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
[
{
"role": "system",
"content": "You are a LEGO Technic engineer. You edit a LEGO model given as a numbered list of parts (JSON).\n\nCoordinates: x and y in studs (1 stud = 8 mm), z in plates (1 plate = 3.2 mm; a brick is 3 plates tall).\nA part {\"w\": W, \"l\": L, ...} fills studs x..x+W-1 along x, y..y+L-... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; a brick is 3 plates tall. Parts connect by vertically shared studs or matching connectors. Edits refer to the numbered input parts: {\"op\":\"remove\",\"index\":I}, {\"op\":\"set\",\"index\":I,\"part\":{...}}, {\"op\":\"add\",\"part\":... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
[
{
"role": "system",
"content": "Coordinates: x/y are studs, z is plates; brick height 3, plate height 1. Parts connect by vertically shared studs or matching connectors. Axles/wheels share their axis line and height; axles need aligned holes. Hinge halves must have matching pin coordinates/axis; turntable h... |
SAMgo Glimmer training data (run 11): building working LEGO mechanisms
The supervised fine-tuning data, recipe and training script behind the builder model of SAMgo: one photo of a machine becomes a LEGO model whose mechanisms work (wheels roll, doors swing, rotors spin) and that you can actually build. Made for the Meta Global AI Developer Hackathon (Oct 27 - Nov 4, 2026).
The model trained on it, a LoRA (rank 32) on Muse Glimmer 30B:
vvennelakanti/samgo-glimmer-lora-r11 (also served on
Fireworks as accounts/vvennela/models/objects-r11-tuned).
Files
data/train.jsonl(15,680 rows),data/val.jsonl(50 rows): chat-format rows{"messages": [system, user, assistant, ...]}. The user turn is a LEGO model as a numbered parts list plus one task sentence; the assistant turn is a JSON edit list. Feedback rows continue with the checker's feedback and the corrected answer.train_serverless.py: the training script (Fireworks serverless LoRA SFT; needsFIREWORKS_API_KEYand the Fireworks training cookbook onPYTHONPATH).r11_chain.sh: the exact run (setSAMGO_REPOto the repository).
What the model learns from it
Given a LEGO model as a numbered parts list (studs in x/y, plates in z) and one generic sentence ("add the running
gear", "one edge of a flat structure should swing", "set a rotor into this face"), it answers with a JSON edit list
(clear, remove, set, add) that builds the mechanism: Technic bricks and axles for wheels, hinge plates for doors
and flaps, axles and blade crosses for rotors, turntables for upright rotors. If SAMgo's checker rejects the answer,
it receives the checker's exact feedback ("input part 86 overlaps your bar plate: remove it first", "this clip holds
nothing") and fixes its answer, up to 3 rounds.
In SAMgo, Muse Spark decides what moves and where; this model decides how to build it; code verifies every answer (real parts only, no overlaps, every part held by studs, the mechanism moves clear, the model stands).
Training data
15,680 rows, all generated and verified by SAMgo's own checker, no object names: generic bodies (blocks, panels, lids, fins, shelves, car-like shells) with generic skills (running gear, hinge a strip or a sheet's edge, a leg with a wheel, a side rotor, an upright rotor on a turntable). About half the skill rows are mistake -> checker feedback -> fix, including the model's own earlier mistakes. Airplanes, helicopters, fans and turbines were never in the data: they were held-out exams.
Recipe: LoRA rank 32, batch 64, 2 epochs, max sequence length 24,576.
Results (frozen test sets, never trained on)
First try / within 3 feedback rounds.
| Test (unseen bodies) | Run 11 |
|---|---|
| Side rotor set into a face, spins 360° clear (30) | 28 |
| Upright rotor: blades on a turntable, turn 360° clear (30) | 19 / 24 |
| Hinge a flat sheet's edge (30) | 14 / 20 |
| Hinge a strip on a block (20) | 14 / 15 |
| Add a leg with a wheel (20) | 20 |
| Car running gear, held-out cars (50) | 48 / 50 |
| Door hinges on unseen vehicles (10) | 10 |
| Objects: place or repair a mechanism (112) | 92 |
Earlier runs of this project scored 0 of 10 on the door-hinge test (run 4) and 0 of 20 on strip hinges (run 5); run 11 scores 10/10 and 15/20.
Use
The prompt format, edit format and checker are in the SAMgo repository (samgo/audit_objects.py messages,
samgo/edits.py, samgo/free_edit_test.py). Run the full pipeline with
python -m samgo.pipeline <photo> --assembly learned --model <the served adapter>.
- Downloads last month
- 71