Repository navigation
feat(tokenizer): Enrich tokenizer metadata with backend, vocab_size, and creation time #463
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,7 +104,7 @@ impl StepExecutor<TokenizerWorkflowData> for LoadTokenizerStep { | |
| // This handles: validation, deduplication, and loading | ||
| let result = app_context | ||
| .tokenizer_registry | ||
| .load(&id, &name, &source, || { | ||
| .load(&id, &name, &source, chat_template.as_deref(), || { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Passing Useful? React with 👍 / 👎. |
||
| let source = source.clone(); | ||
| let chat_template = chat_template.clone(); | ||
| let cache_cfg = cache_config.clone(); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
Remove caller-supplied
chat_template_pathfrom registry metadata input.At Line 108,
chat_template.as_deref()is passed intotokenizer_registry.load(...). This makes registry metadata caller-driven and can drift from the actually loaded tokenizer state (notably on remote-fallback paths). Keepload()deriving metadata from the tokenizer instance/trait and avoid passing this field at the call site.♻️ Suggested call-site direction
🤖 Prompt for AI Agents