ONNX Model Zoo

amhinson/strudel-coder-0.5B-ONNX

By amhinson · ↓ 4 · ♥ 0 · Updated 2026-02-07

What's in this repo

This page lists the files in amhinson/strudel-coder-0.5B-ONNX, including model_q4f16.onnx.

  • 1 ONNX models (.onnx files)
  • 10 files, including 6 .json, 1 .md, 1 .txt, 1 .onnx
  • Last updated 2026-02-07

ONNX files

File Size Download
onnx/model_q4f16.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

strudel-coder-0.5B-ONNX

ONNX export of amhinson/strudel-coder-0.5B for use with transformers.js.

This is a fine-tuned Qwen2.5-Coder-0.5B-Instruct model specialized for Strudel REPL live coding — a browser-based music environment that ports TidalCycles' pattern language to JavaScript.

Usage with transformers.js

npm i @huggingface/transformers
import { pipeline } from "@huggingface/transformers";

const generator = await pipeline(
  "text-generation",
  "amhinson/strudel-coder-0.5B-ONNX",
  { dtype: "q4" }
);

const messages = [
  {
    role: "system",
    content: `You are a Strudel live coding assistant. Strudel is a music live coding environment for the browser that ports the TidalCycles pattern language to JavaScript. You help write and modify Strudel REPL code.

Strudel uses:
- Mini-notation for rhythmic patterns in double-quoted strings (spaces for sequences, [] for sub-sequences, <> for alternation, * for speed, ~ for rests, , for parallel patterns)
- Euclidean rhythms like (3,8) to distribute beats evenly
- Chained functions: .s() for sound source, .note() for pitch, .gain() for volume, .lpf()/.hpf() for filters, .delay(), .room(), .pan(), .vowel(), .speed(), .rev(), .every(), .sometimes()
- .bank() to select drum machine sample banks (e.g., RolandTR909, RolandTR808)
- $: prefix for multi-pattern composition (each $: line is an independent pattern)
- n() to select sample variations, stack() to layer patterns
- Signals like sine, saw, rand for continuous modulation with .range()

Given an instruction and the current code context, produce the complete updated code.`
  },
  {
    role: "user",
    content: 'Instruction: add a hi-hat pattern\nContext:\n$: s("bd(5,8)").bank("RolandTR909")'
  }
];

const output = await generator(messages, {
  max_new_tokens: 256,
  do_sample: false
});

console.log(output[0].generated_text.at(-1).content);

Training

Fine-tuned with QLoRA (rank 64, alpha 128) on 2000 Strudel REPL examples for 4 epochs. Base model: Qwen/Qwen2.5-Coder-0.5B-Instruct.

Model info

text-generation transformers.js
transformers.js onnx qwen2 text-generation strudel live-coding music conversational region:us
↓ 4 ♥ 0

Created: 2026-02-07

Updated: 2026-02-07

View on Hugging Face

Files (10)

.gitattributes
README.md
config.json
generation_config.json
merges.txt
onnx/model_q4f16.onnx ONNX
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models