Skip to content

Fix beam search#2157

Open
parkan wants to merge 1 commit into
futo-org:masterfrom
parkan:decoder-fixes
Open

Fix beam search#2157
parkan wants to merge 1 commit into
futo-org:masterfrom
parkan:decoder-fixes

Conversation

@parkan

@parkan parkan commented Jul 7, 2026

Copy link
Copy Markdown

This fixes a few issues beam search, because I noticed the keyboard performing very poorly. After installing the custom APK my typing experience has improved dramatically.

  • MAIN FIX: beamsearch never worked correctly due to using the wrong parent probability basis, corrected this (this is likely the biggest single improvement) <--- pick this please even if you disagree with the other tuning
    - increased LLM suggestion timeout; this appears to have no negative effect on latency
    - transformer context was too narrow, increased the params and validated empirically

I also noticed that the finetuning path was fully disabled in 44c8fcd even though USE_TRANSFORMER_FINETUNING is still consumed and I am seeing the tuning setting in the UI. Not touched in this PR but I suggest either completely removing if you think it's not viable on device or re-enabling it since it appears fully viable (and valuable) to me.

I am also trying out training retroactively on my own corpus/on my local workstation from  https://huggingface.co/breadlicker45/futo-keyboard-lm/blob/main/ml4_1_f16_meta_fixed.gguf since apparently no training occurred since ~last October and I have my own idiosyncratic speech patterns that the default model doesn't understand. So far even training on TinyStories gives better/equal performance to the stock model (though it talks about playgrounds and sleepy bears way too much) -- the "explore transformer models" link in the app still leads to an "under construction" page so even replacing that with a brief "how to locally train on your own writing" snippet would help, it trained in under 3 minutes at 2000 steps on a W7800 with no issues and imports fine.

@futo-cla-pr-labler

Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@futo-cla-pr-labler

Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

1 similar comment
@futo-cla-pr-labler

Copy link
Copy Markdown

Please sign our contributor license agreement at https://cla.futo.org

@Zvonimir-FUTO Zvonimir-FUTO added the Enhancement Request for a new feature label Jul 7, 2026
@Zvonimir-FUTO
Zvonimir-FUTO requested a review from abb128 July 7, 2026 09:49
@parkan

parkan commented Jul 7, 2026

Copy link
Copy Markdown
Author

oops sorry pushed the license-required modification notice to this branch instead of my main, fixing

@parkan

parkan commented Jul 13, 2026

Copy link
Copy Markdown
Author

ok the deadlines have a 50ms gap where we could drop the prediction/learning on the floor or double dispatch; extending both to ~600ms total is too slow for faster typing and doesn't solve that problem

rethinking how to optimize this but beam fix is correct, I will trim this branch to only include the beam fix or you can pick it separately

@parkan parkan changed the title Decoder fixes Fix beam search Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA-signed Enhancement Request for a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants