REPENTE // a model that writes Pure Data
◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇
  SYSTEM: qwen2.5-coder-7b · QLoRA · GGUF 4.5GB · LOCAL ONLY
◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇◆◇

REPENTE

A language model that writes Pure Data patches and SuperCollider code, and runs on your own machine.

[ DOWNLOAD v0.7 ] [ READ THE PAPER ]

Qwen2.5-Coder-7B fine-tuned with QLoRA. GGUF, 4.5 GB. Nine training cycles, $284 of compute, one afternoon of measurement that reversed the conclusion.

PRESS 1-6 TO JUMP · ─────────────────────────────

DESAFIO — WHAT WAS TYPED ░▒▓
Make a puredata patch that: "makes a sine wave at 440 Hz connected to output"
RESPOSTA — v0.7, UNEDITED ░▒▓
#N canvas 0 22 450 300 10;
#X obj 50 50 osc~ 440;
#X obj 50 100 *~ 0.1;
#X obj 50 150 dac~;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 1 0 2 1;

That is a Pure Data file. Save it, open it, and it makes a sound. Real output from v0.7, unedited. The model reaches 3.83 of 5 on the measured battery; this is one draw, not a guarantee.

◆ DESAFIO / RESPOSTA — THE CALL AND THE REPLY OF A REPENTE

02 / WHAT IT IS

Musical programming languages are a small fraction of what code models are trained on, and it shows. Ask a general-purpose model for a Pure Data patch and you usually get a description of one, in prose, with the file format approximated. Repente was trained to write the file.

It handles two things. GENERATION, turning a description of a sound into code that produces it. And ANALYSIS, reading an existing patch and explaining what it does and how the signal flows.

It runs locally, through Ollama or llama.cpp, on a consumer GPU. Nothing is sent anywhere.

03 / DOWNLOADS

v0.7 current release Q4_K_M · 4.5 GB [ DOWNLOAD ]
v0.5 reference release Q4_K_M [ DOWNLOAD ]

Two versions are published on purpose. v0.7 is the one to use: it is the strongest of the nine checkpoints under measurement. v0.5 is the frozen reference that the experiments in the paper were run on, kept available so those results stay reproducible.

SHELL
$ ollama run hf.co/bidubr/repente-v0.7-GGUF:Q4_K_M

Or run the GGUF directly with llama.cpp. 4.5 GB, fits in 8 GB of VRAM.

04 / PD-REPENTE

pd-repente

A fork of PlugData with a prompt bar in the patching window. Type a musical idea, get a working patch on the canvas, hear it immediately. No window switching, no copying and pasting.

It knows what is already on the canvas, so the conversation continues: say now add reverb and it understands what it refers to. Works with Repente locally, or with any OpenAI-compatible endpoint.

SCREEN CAPTURE — PD-REPENTE ░▒▓
pd-repente: the prompt bar at the bottom of the patching window, the generated osc~ / *~ / dac~ patch on the canvas, and the console log of objects created and connected.
The prompt bar sits at the bottom of the patching window. The patch, the console log, and the request that produced them, in one window.
PROMPT BAR
/config url http://localhost:11434
/config model hf.co/bidubr/repente-v0.7-GGUF:Q4_K_M
make a syncopated beat with kick and hihat
[ GET PD-REPENTE ]

05 / MEASUREMENT

What we got wrong

Nine training cycles were steered by a test of five prompts, run once each. That test picked v0.5 as the best model, and it was wrong. Resampling the same five prompts thirty times on every checkpoint showed that two runs on one unchanged model disagree most of the time, that the result which selected v0.5 had a 1.5% chance of occurring, and that the version we had recorded as a regression was in fact a small improvement.

Three rules the project had treated as settled turned out to rest on single draws. The measurement that found this cost nothing and took an afternoon.

The paper reports all of it, including the part where we published the wrong model for four cycles without noticing.

[ READ THE PAPER — PDF ]
1,350
GENERATIONS MEASURED
1.5%
CHANCE OF THE RESULT THAT CHOSE v0.5
70%
OF RUNS ON ONE MODEL DISAGREE

06 / THE NAME

REPENTE takes its name from the repentistas of northeastern Brazil, who improvise sung verse in real time inside fixed metre and rhyme. Invention happens within a form rather than in the absence of one, which is roughly the problem a model faces when asked for a patch that has to load, connect, and make a sound.

SEXTILHA — the form most repentes are sung in

  1 ┤ ─────────────────────  A   7 syllables
  2 ┤ ─────────────────────  B   7 syllables
  3 ┤ ─────────────────────  C   7 syllables
  4 ┤ ─────────────────────  B   7 syllables
  5 ┤ ─────────────────────  D   7 syllables
  6 ┤ ─────────────────────  B   7 syllables

     six lines, fixed rhyme, invented on the spot