{"slug":"least-squares-neurons","domain":"research","title":"Train Qwen3.5-0.8B with least-squares neurons, no gradients","summary":"Train Qwen3.5-0.8B on your own examples with forward passes alone: new neurons fitted by least squares, for labels (prompt -\u003e label) or answers (prompt -\u003e answer), scored against the unedited model, returned as a patch.","help":"least-squares-neurons: train Qwen3.5-0.8B on your own examples with forward passes alone, as JSON.\n\nWHAT IT DOES\n  New neurons are added beside the MLP of one layer and fitted by least\n  squares from forward passes. There are no gradients and no training steps.\n  The model's own weights are not changed. A strength is picked so that at\n  least 99% of next-token guesses on ordinary text stay as they were.\n\nTWO KINDS OF TASK\n  shape   prompt -\u003e label. One-word labels, at least five examples a label.\n          The examples are split 3 : 1 : 1 into fit, pick and check sets.\n          Up to 500 examples the neurons go in the last layer; from 500, in\n          four layers in turn. Returns `check` (check-set accuracy of the\n          unedited model, the trained model and random neurons of the same\n          size), `text_unchanged`, `edit`, `routes` (each request labelled by\n          both models) and `patch_b64`.\n  teach   prompt -\u003e answer. Up to 20 pairs. One neuron for each answer token,\n          in the last layer. Returns `check` (answers word for word, unedited\n          and trained), `text_unchanged`, `edit`, `answers` (each prompt\n          answered by both models) and `patch_b64`.\n  label / chat   one more prompt through neurons a run returned (patch_b64)\n          or a recorded task's (preset): free.\n\nOPTIONS\n  shape: \"label: text || label: text\"   the examples (first argument)\n         --labels a,b,c     the labels, one word each, 2 to 24\n         --requests_text \"text || text\"   up to 20 requests to label\n  teach: --pairs_text \"prompt =\u003e answer || prompt =\u003e answer\"\n  both:  --patch false      leave the patch out of the answer\n\nREAD SMALL CHECK SETS AS A ROUGH SIGN\n  With five examples a label, the check set holds one example a label. The\n  label probabilities are not calibrated; they sit near 1.\n\nPRICE\n  $0.05 a run of shape or teach; label and chat are free. An account that has\n  never paid gets three runs free; after that a run is refused until $2 of\n  credit is added, and the `credits` tool gives the link. A warm run takes\n  about 10 seconds; the first after a quiet spell waits about 90 seconds while\n  the model loads.\n\nStudies:\n  shape \u003cexamples_text\u003e\n      check-set accuracy of the unedited model, the trained model and random neurons, ordinary text left unchanged, each request labelled, the patch, the price and how many free runs are left\n  teach \u003cpairs_text\u003e\n      each prompt answered by the unedited and the trained model, answers right word for word, ordinary text left unchanged, the patch, the price and how many free runs are left\n\nJSON to stdout, so it composes: pipe to `jq` to pick a field, or `\u003e /tmp/…` to keep it.\nRun a study with no arguments — `least-squares-neurons shape` — to see what it takes.\n","example_command":"least-squares-neurons teach --pairs_text \"When do you open? =\u003e We open at 7 am every day. || Is there wifi? =\u003e Yes. The password is on the menu board.\"","example_output":"","cost_class":"upstream-fetch","tier":"metered","billing_items":["weight_edit_run"],"price_per_1k_calls":50,"price_is_from":false,"status":"available","commands":["least-squares-neurons"],"studies":[{"call":"shape","about":"check-set accuracy of the unedited model, the trained model and random neurons, ordinary text left unchanged, each request labelled, the patch, the price and how many free runs are left","args":[{"name":"examples_text","positional":true,"list":false,"hint":"\"label: text || label: text\", at least 5 a label, up to 60"},{"name":"labels","positional":false,"list":true,"hint":"comma-separated one-word labels, 2 to 24 (default: the labels in --examples_text)"},{"name":"requests_text","positional":false,"list":false,"hint":"\"text || text\", up to 20 requests to label"},{"name":"patch","positional":false,"list":false,"hint":"true or false: include the neurons as safetensors (default true)"},{"name":"seed","positional":false,"list":false,"hint":"the split's seed (default 0)"}]},{"call":"teach","about":"each prompt answered by the unedited and the trained model, answers right word for word, ordinary text left unchanged, the patch, the price and how many free runs are left","args":[{"name":"pairs_text","positional":true,"list":false,"hint":"\"prompt =\u003e answer || prompt =\u003e answer\", up to 20"},{"name":"patch","positional":false,"list":false,"hint":"true or false: include the neurons as safetensors (default true)"}]}],"default_enabled":false,"first_seen":"2026-11-09T15:20:47.933032Z","enabled":false}
