Skip to content

fix: include vocab sizes in EAGLE3 vocab mapping cache key#602

Open
wiketool wants to merge 1 commit into
sgl-project:mainfrom
wiketool:main
Open

fix: include vocab sizes in EAGLE3 vocab mapping cache key#602
wiketool wants to merge 1 commit into
sgl-project:mainfrom
wiketool:main

Conversation

@wiketool

Copy link
Copy Markdown

Motivation

draft_model_config.draft_vocab_size and draft_model_config.vocab_size affect vocab mapping generation. But the current vocab mapping cache key only follows the dataset cache key. This can incorrectly reuse a stale mapping when dataset/tokenizer inputs are unchanged but vocab dimensions differ.

Modifications

  • Keep the existing processed dataset cache key unchanged.
  • Add a vocab-mapping-specific cache key by appending draft_vocab_size and vocab_size to the existing dataset cache params string.

Checklist

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the cache key generation in scripts/train_eagle3.py by separating the dataset cache key from the vocabulary mapping cache key. It introduces a new vocab_cache_key that incorporates the draft and target model vocabulary sizes, ensuring that vocabulary mapping caches are correctly invalidated when vocabulary sizes change. There are no review comments to evaluate, and the changes look correct.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@wiketool wiketool changed the title Include vocab sizes in EAGLE3 vocab mapping cache key fix: include vocab sizes in EAGLE3 vocab mapping cache key Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant