RS Quick build (SmolLM2-360M)

The model behind Quick build in RS Workshop, Reasoning School's browser CAD app (built on SolidCraft). A student types a part, such as "a plate 60 by 40, 5 thick, M3 holes in the corners", and the model, running in the student's browser (WebGPU, or WASM on the processor), writes a short part description. RS Workshop's compiler then builds the part exactly. What the student types never leaves their device; the browser only downloads this model, once.

It is a full fine-tune of SmolLM2-360M-Instruct.

What it does

It reads the request and copies out the shape and the sizes that were said. It doesn't compute geometry (hole positions, unit conversion, text fitting), which RS Workshop's compiler does:

request:  a mug 8cm across and 9.5cm tall with 2.5mm walls
answer:   {"shape":"mug","unit":"cm","height":9.5,"diameter":8,"wall":"2.5 mm"}

request:  make me a phone stand
answer:   {"shape":"unknown"}          β†’ RS Workshop offers to ask Violet, its tutor

Shapes: plate/block/cube, disc/rod/wheel, tube/washer/spacer, tray, cup/pot/bowl, ball, cone/funnel, ring (torus), hexagon/nut/polygons, star, name tag/keyring/sign, L bracket, case for a board, gear, gear pair, servo/motor/stepper/ bearing. Anything else, including a supported part with a feature it can't have ("a mug with a handle"), is unknown.

Files

file use
onnx/model_q4.onnx (275 MB) the browser model: MatMuls 4-bit (MatMulNBits, block 32), word table int8 with a scale per word, the rest fp32. Load with transformers.js, dtype: "q4"
model.safetensors (bf16) the fine-tuned weights, for transformers in Python
quickbuild.json the system prompt it was trained with, and the training settings

Use

transformers.js (browser):

import { AutoTokenizer, AutoModelForCausalLM } from "@huggingface/transformers";
const id = "researchase/rs-quickbuild-smollm2-360m";
const tok = await AutoTokenizer.from_pretrained(id);
const model = await AutoModelForCausalLM.from_pretrained(id, { dtype: "q4", device: "webgpu" });
const system = "You turn a request for a 3D part into a part description in JSON. Write only the JSON.";
const prompt = `<|im_start|>system\n${system}<|im_end|>\n<|im_start|>user\na 5 cm cube<|im_end|>\n<|im_start|>assistant\n`;
const inputs = tok(prompt, { add_special_tokens: false });
const out = await model.generate({ ...inputs, max_new_tokens: 110, do_sample: false });
console.log(tok.batch_decode(out.slice(null, [inputs.input_ids.dims[1], null]), { skip_special_tokens: true })[0]);

Use the prompt exactly as above (ChatML, this system prompt, greedy decoding).

Training

About 52,000 synthetic request β†’ description pairs from a generator. It writes each request many ways: units (none, mm, cm, inches, a different unit for one size), size orders, compact sizes (60x40x5), number and fraction words, capitals and typos. It also writes "not a part" requests: other objects, questions, edits, and parts with features that can't be made. Every description was checked by building it with RS Workshop's compiler, and pairs it refused were dropped. Training: 2 epochs, AdamW, lr 1e-4 cosine, batch 64, on one RTX 3090 (about 25 minutes).

Evaluation

Scored by what gets built: right means the compiler builds the same part from the answer as from the expected one.

test set requests same part right kind of part
blind, written before this model was trained, run once 32 96.9 % 100 %
fresh hand-written set (used to find gaps in earlier versions) 40 97.5 % 97.5 %
first hand-written set (likewise) 83 98.8 % 98.8 %

Every answer was valid JSON, and the 4-bit browser model gave the same answers as the full model on the requests compared. Known slips: an uncommon surname copied with one letter changed, and occasionally a shape word it invents ("open_top"), which RS Workshop treats as "not a part".

Limits

It is made for RS Workshop's part descriptions and its compiler, in English, for students aged about 11 and up. It is not a general assistant and won't answer questions. Its answers are descriptions to be checked and built by code, never steps to run directly.

Downloads last month
516
Safetensors
Model size
0.4B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for researchase/rs-quickbuild-smollm2-360m

Quantized
(139)
this model