Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

llama-server : implement universal assisted decoding #12635

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

g2mt
Copy link

@g2mt g2mt commented Mar 28, 2025

This pull request implements universal assisted decoding in llama-server. This is a method for performing speculative decoding given a draft model whose tokenizer is incompatible with the main model, by decoding and reencoding the generated text between the two models.

It currently works, but some improvements can be made.

  • Token healing can be done to fix any weirdness that may occur if the draft model generates tokens that doesn't lie on a word boundary (not sure how much this affects performance).
  • The translation process can be cached to improve sampling time, however it might require substantial refactoring.

@jukofyork
Copy link
Contributor

This looks really interesting! It's surprising how much crossover there is between many models' tokenisers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants