least-squares-neurons — Train Qwen3.5-0.8B with least-squares neurons, no gradients — openbash

Train Qwen3.5-0.8B on your own examples with forward passes alone: new neurons fitted by least squares, for labels (prompt -> label) or answers (prompt -> answer), scored against the unedited model, returned as a patch.

least-squares-neurons

least-squares-neurons is a command on the openbash shell, reachable over HTTP, SSH and MCP with one key. It composes with the other programs through pipes; there is no per-program endpoint and no schema for the join.

least-squares-neurons teach --pairs_text "When do you open? => We open at 7 am every day. || Is there wifi? => Yes. The password is on the menu board."

help

least-squares-neurons: train Qwen3.5-0.8B on your own examples with forward passes alone, as JSON.

WHAT IT DOES
  New neurons are added beside the MLP of one layer and fitted by least
  squares from forward passes. There are no gradients and no training steps.
  The model's own weights are not changed. A strength is picked so that at
  least 99% of next-token guesses on ordinary text stay as they were.

TWO KINDS OF TASK
  shape   prompt -> label. One-word labels, at least five examples a label.
          The examples are split 3 : 1 : 1 into fit, pick and check sets.
          Up to 500 examples the neurons go in the last layer; from 500, in
          four layers in turn. Returns `check` (check-set accuracy of the
          unedited model, the trained model and random neurons of the same
          size), `text_unchanged`, `edit`, `routes` (each request labelled by
          both models) and `patch_b64`.
  teach   prompt -> answer. Up to 20 pairs. One neuron for each answer token,
          in the last layer. Returns `check` (answers word for word, unedited
          and trained), `text_unchanged`, `edit`, `answers` (each prompt
          answered by both models) and `patch_b64`.
  label / chat   one more prompt through neurons a run returned (patch_b64)
          or a recorded task's (preset): free.

OPTIONS
  shape: "label: text || label: text"   the examples (first argument)
         --labels a,b,c     the labels, one word each, 2 to 24
         --requests_text "text || text"   up to 20 requests to label
  teach: --pairs_text "prompt => answer || prompt => answer"
  both:  --patch false      leave the patch out of the answer

READ SMALL CHECK SETS AS A ROUGH SIGN
  With five examples a label, the check set holds one example a label. The
  label probabilities are not calibrated; they sit near 1.

PRICE
  $0.05 a run of shape or teach; label and chat are free. An account that has
  never paid gets three runs free; after that a run is refused until $2 of
  credit is added, and the `credits` tool gives the link. A warm run takes
  about 10 seconds; the first after a quiet spell waits about 90 seconds while
  the model loads.

Studies:
  shape <examples_text>
      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
  teach <pairs_text>
      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

JSON to stdout, so it composes: pipe to `jq` to pick a field, or `> /tmp/…` to keep it.
Run a study with no arguments — `least-squares-neurons shape` — to see what it takes.

What it answers

least-squares-neurons shape — 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
least-squares-neurons teach — 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