TL;DR: strudel-lm is a 129M-parameter model that writes short Strudel loops (bass, chords, lead, drums) to play over a DJ's track. It was pretrained on MIDI turned into Strudel code and fine-tuned on house, techno and progressive. In blind swipes by its one listener, the fine-tuned model (FT3) got 37% of its parts marked "fits" against 26% for the previous small model, on the same moments of the same tracks. The confidence intervals overlap, so that is a lead, not a verdict. A new batch of cards, whole programs picked best-of-6 by a critic and a taste model, now waits for swipes and will decide between FT3 and FT4. Done mostly by an AI agent (Claude) under the author's direction.
tiny/ (models, data, training), deckc/ (the deck pages, batches, rendering) and js/ (the Strudel dialect and renderer).base130ft3 (FT3): a 129M model fine-tuned on house, techno and progressive. In blind swipes it beat the previous small model, 37% vs 26% "fits", with overlapping intervals.Strudel is a live-coding music environment in the browser (a JavaScript port of TidalCycles). A part is a short expression such as a mini-notation pattern plus a sound and a few effects. The model writes a small, strictly parsed subset of it (the "dialect"). The page parses the model's text with its own grammar and never evals it. That keeps the output to about 400 tokens per 4 bars instead of audio tokens every 40 ms, so the model can be small.
A page plays a track; guest decks join it. Each guest deck plays one requested part for 1, 2 or 4 phrases. Parts start on the track's phrase lines, take its key, and are levelled per role (BS.1770 loudness, a target per role). Where the track has a kick, a silent lane ducks the guest parts on every beat, the usual house and techno sidechain.
| Model | What it is |
|---|---|
| previous small model | a character-level transformer, 320 wide, trained on the Mac on MIDI-derived lines plus a rule-made style corpus, with "hear" words (what the track plays) in the prompt |
base130 |
TinyLMv2, 16 layers × 768, context 2048, BPE with 4096 tokens, 129M parameters. Pretrained on two V100s on MIDI converted to the dialect: about 5.7B tokens, validation loss 0.640 |
base130ft (FT1) |
fine-tuned on genre programs (cleaned Jamendo transcriptions, the electronic part of Lakh, NRG-CP, Groove, Strudel programs), genre lines and a replay of general data |
| FT2 | FT1 with three times the replay |
| FT3 | replay of both lines and programs, tags shuffled |
| FT4 | FT3 with less one-note bass, Freesound loops (3122 parts) and drum lines |
A private phone page. Each card is one moment of one of the author's own tracks: 8 bars before, the guest part, 8 bars after, prerendered into one AAC file so the phone only decodes audio. Swipe right if the part fits, left if not. Twins (two parts for the same moment) give preference pairs. Every swipe is stored with the model name, the prompt and the code, so models can be compared on the same cards.
| Model | Loss: genre programs | Loss: general data | Notes in key | Usable parts of 96 | Chords | Bass | Lead | Drums |
|---|---|---|---|---|---|---|---|---|
| base130 | 5.12 | 0.635 | 79.6% | 29 | 11/24 | 6/24 | 12/24 | 0/24 |
| FT1 | 1.12 | 0.992 | 92.9% | – | – | – | – | – |
| FT2 | 1.13 | 0.975 | 91.6% | 24 | 9/24 | 2/24 | 9/24 | 4/24 |
| FT3 | 1.13 | 0.813 | 90.8% | 33–34 | 15–18/24 | 1–6/24 | 11–12/24 | 2/24 |
| FT4 | 1.13 | 0.789 | 94.6% | 35 | 11/24 | 7/24 | 14/24 | 3/24 |
A "usable" part parses, has 8+ notes in 4 bars, and for melodic roles 2+ distinct notes with 80%+ in key. FT3 appears in two samples, hence the ranges. Every fine-tune finishes 48/48 programs with balanced brackets. At 24 parts per role, gaps of a few parts are noise; only the bass gap between FT3 and FT4 looks real.
Same swipe batch (version 49), the same moments of the same tracks, one listener, repeat cards excluded.
| Model | "Fits" | Share | 95% interval |
|---|---|---|---|
| FT3 | 14 / 38 | 37% | 23–53% |
| previous small model | 17 / 66 | 26% | 17–37% |
| Before | After | |
|---|---|---|
| Transcribed tracks | 290 (stopped at part 90 of 100) | 752 (all 100 parts) |
| Demucs | reloaded per track | loaded once per worker |
| Workers | 1 GPU | 2, one per GPU |
| Time per track | about 4 min | about 68 s per worker, now bound by basic-pitch on the CPU |
f1*16), and the models copy that. Cutting those lines (FT4) moved bass from 1 to 7 of 24.grep | tail pipeline swallowed the exit code. They were marked done and their archives deleted. The script now checks the exit code, keeps the archive and doesn't mark the part. The four parts were redone.Ranked by expected value per hour.
48 piece cards (24 FT3, 24 FT4) and 134 unrated older cards are on the page. 24 cards per model will show a direction; separating a 15-point gap with confidence takes roughly 100 swipes per model, so expect another batch.
363 new swipes are exported. Refit the logistic model on all of them (197 → about 560), check cross-validation, and use it for the next best-of-N batch. Cheap: seconds on a laptop.
DPO on twin cards once there are about 300 swipes of the new model. An earlier DPO run on critic-made pairs fell apart (parse rate 1.00 → 0.56 while the critic score rose: the Goodhart signature), so listener pairs come first and critic pairs at most as a supplement.
grep | tail hides failures. A pipeline returns the last command's status. Check the real command's exit code before marking work done.| File | Role |
|---|---|
HANDOFF.md |
current state, constraints, next steps |
reports/ft/README.md |
pretraining and FT1–FT4 evaluation |
tiny/piecegen.py |
whole-program generation (last-position logits, fp16) |
tiny/taste.py, tiny/taste.json |
the taste model and its weights |
deckc/batch.mjs |
swipe batch assembly, best-of-N by critic + taste |
tiny/jamendo.sh, tiny/audio2midi.py |
Jamendo download and transcription, two workers |
deckc/loudness.py, deckc/prerender.py |
levelling and card rendering |
deckc/rate/index.html |
the swipe page |
ratings3–ratings8/ |
swipe exports |
This work was done mostly by AI, under human direction. Read the results with that in mind.
| Part | Who did it |
|---|---|
| Goals, constraints, what to pursue, every swipe, what to publish | the author |
| Design, most of the code, running training and data jobs, debugging, analysis | Claude (Anthropic), working as a coding agent in Claude Code, directed by the author |
| Some routine code in this round (first drafts of whole-program generation and best-of-N selection, the two-worker transcription changes, tests) | a local Qwen model (qwen3.8-27b) given a written spec, with Claude checking the diff and running the tests |
| This report and post | written and published by Claude from the project's notes, logs and swipe exports, at the author's request; not separately reviewed by the author before going live |
| Swipe verdicts | one human listener (the author); no model judges the final comparisons |
| Critic and taste scores | rules plus a logistic model fit on the author's swipes; they only pick candidates |
The models under test (base130 and its fine-tunes, the previous small model) are research subjects, not authors. The transcription tools (Demucs, basic-pitch, beat_this) are third-party models used as tools.