Live data from Hacker News

Show HN: I trained a 125M model to autocomplete piano on-device

simedw.com

31–40 of 135 posts

Re: Show HN: I trained a 125M model to autocomplete piano on-device

#31

How would you expand this to support elements like attack ("velocity of the key-down" in piano speak), grace notes, timing etc. Would each of those be part of this model or another model? How would you model an arbitrary element (pedal, duration, etc...)

If the attribute describes the current note, I would first try adding it as another field/head on the note event. For example:

  NOTE(
    pitch,
    delta_onset,
    duration,
    attack_velocity,
    release_velocity,
    ...
  )
More global things might be better modelled as a control event:

  NOTE(...)
  | CONTROL_SUSTAIN(delta_onset, value)
  | CONTROL_TEMPO(delta_onset, bpm)
  | CONTROL_PROGRAM(delta_onset, instrument)
The harder part might actually be finding enough good training data with all of those attributes represented consistently.

Re: Show HN: I trained a 125M model to autocomplete piano on-device

#34
post #32

Very cool! Can you say a little bit about the size of the DPO training examples and how long training took?

For DPO I only had around 700 preference examples, so not much data at all. That took about 12 minutes to train on a single GPU.

Pretraining was obviously a a lot slower, the 125M model took roughly half a day.

Re: Show HN: I trained a 125M model to autocomplete piano on-device

#35

This is so amazing, can you improve the quality of generation at the cost of notes per seconds ? No one can play 108 notes/sec anyways, maybe you can train the model to do CoT for better quality

Yes, some kind of planning step is on my TODO list. Another thing I want to try is generating a few continuations in parallel, picking the one that looks best, and then continuing from there. Maybe the picking could be automatic.

I can probably squeeze out quite a bit more than 100 notes/sec as well. I haven’t spent much time optimizing inference yet.

Re: Show HN: I trained a 125M model to autocomplete piano on-device

#39

I would love something like that, except that I play the melody, and it produces proper 3-4 part accompaniment, preferably in good baroque style. Extra bonus if it could also write it into a file in a format suitable for music editing programs.

An early attempt at this was Microsoft Songsmith [1] all the way back in 2009, which would take a melody (usually recorded by mic) and try to scaffold an accompaniment around it though obviously not realtime in any sense of the word.

The closest we've had to realtime orchestration around a melody in the "real world" is probably arranger keyboards though your left hand is still responsible for the chord progression itself.

[1] - https://en.wikipedia.org/wiki/Microsoft_Research_Songsmith

Re: Show HN: I trained a 125M model to autocomplete piano on-device

#40
post #33

Ah, MIDI files. The only type of music you could realistically download from the internet back in the day, and you had to wake up at ungodly hours so that your dialup modem would not rack up a massive phone bill.

MIDI is still widely used for professional music production. It sounded goofy back in the day because synthesizer it was played on was not very good.
Post reply on HN