Downloads · 30 days
13
31% of all-time downloads
M64/sid-gpt-25m
sid-gpt-25m is a machine learning model from M64. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
A GPT model trained to generate Commodore 64 SID music by learning from legendary composers.
Downloads · 30 days
13
31% of all-time downloads
All-time downloads
42
Public
Repo size
1.6 GB
Likes
0
Public
Click a slice to open those files.
.pt1.5 GB · 79%
From the Hugging Face model README
A GPT model trained to generate Commodore 64 SID music by learning from legendary composers.
SID-GPT learns to predict SID register states frame-by-frame, essentially learning the "language" of C64 chiptune music. Trained on 2,410 songs from HVSC, it produces output with recognizable musical structures: kick drums, PWM sweeps, basslines, and arpeggios.
| Parameter | Value |
|---|---|
| Parameters | 25.7M |
| Architecture | 8 layers, 8 heads, 512 embedding |
| Block Size | 1020 tokens (20 frames) |
| Effective Context | 12 frames (0.24 sec) |
| Vocabulary | 22 tokens |
| Validation Loss | 0.207 |
| Training Time | 31 hours on M4 MacBook |
| File | Size | Description |
|---|---|---|
sid-gpt-xxxx.bin | 98 MB | Exported weights for Zig inference |
sid-gpt-xxxx.pt | 295 MB | PyTorch checkpoint (includes optimizer state) |
config.json | 1 KB | Model configuration |
The native Zig engine runs at ~350-120 tok/s with SIMD and KV caching, depending on context window:
# Clone repository
git clone https://github.com/M64GitHub/SidGPT
cd SidGPT
zig build -Doptimize=ReleaseFast
# Download model
wget https://huggingface.co/M64/sid-gpt-25m/resolve/main/sid-gpt-1700.bin -P models/
# Generate and play
./zig-out/bin/sidgpt --model models/sid-gpt-1700.bin --frames 700 --temp 0.90 --seed 7391738265 --context 12 | ./zig-out/bin/sidgpt-play
# Or export to WAV
./zig-out/bin/sidgpt --model models/sid-gpt-1700.bin --frames 700 --temp 0.90 --seed 7391738265 --context 12 --output music.txt
./zig-out/bin/sidgpt-play music.txt --output-wav music.wav
cd training
python sample_sid.py --checkpoint path/to/sid-gpt-1700.pt --num_frames 700 --temperature 0.95
Good seeds to try: 1337, 7391738264, 7391738265, 4829173650
Generated outputs from this model:
| Sample | Seed | Temp | Description |
|---|---|---|---|
| test.wav | 7391738265 | 0.95 | Melodic arps with bassline and kicks |
Despite only 12 frames (0.24 sec) of context, the model learned real SID techniques:
Loss progression:
Iter 0: 2.88 (random)
Iter 200: 0.96 (structure learned)
Iter 700: 0.37 (musical patterns)
Iter 1000: 0.27 (kick drums, PWM)
Iter 2000: 0.21 (best checkpoint)
Training was stopped at iter 2000 when validation loss plateaued and train/val gap exceeded 30% (indicating overfitting).
Each frame is 25 SID registers encoded as 50 hex characters + newline:
B0080005410A306011C0064108200016800D41082000B4031F
B0084005410A30601100074108200016C00D41082000B4031F
...
<end>
0-9, A-F, <, >, d, e, n, \n (22 tokens)The Zig engine includes:
@misc{sidgpt2026,
author = {Mario Schallner},
title = {SID-GPT: Transformer-based Commodore 64 Music Generation},
year = {2026},
publisher = {Hugging Face},
url = {https://huggingface.co/M64/sid-gpt-25m}
}
Thanks to the legendary C64 composers whose work made this possible: Matt Gray, Jeroen Tel, Rob Hubbard, Martin Galway, DRAX, Laxity, and all contributors to HVSC.