Skip to content

refactor(recipes): add typed tokenizer construction#3009

Draft
akoumpa wants to merge 1 commit into
akoumpa/refactor/llm-packing-policyfrom
akoumpa/refactor/typed-tokenizer-config
Draft

refactor(recipes): add typed tokenizer construction#3009
akoumpa wants to merge 1 commit into
akoumpa/refactor/llm-packing-policyfrom
akoumpa/refactor/typed-tokenizer-config

Conversation

@akoumpa

@akoumpa akoumpa commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What

  • add TokenizerConfig.build() for tokenizer and multimodal processor factories
  • resolve dataset overrides, explicit null, top-level factories, model fallback, and trust policy at the RecipeConfig boundary
  • remove the private, signature-inspecting _build_tokenizer helper and its cross-recipe import
  • move LLM, sequence-classification, and retrieval recipes onto the typed build API
  • replace retrieval processor type dispatch with capability-based tokenizer access

Why

This is the second follow-up layer on #2390 and depends on #3008. It keeps declarative tokenizer construction out of recipe bodies and preserves config state across builds.

Validation

  • focused stack suite: 159 passed, 7 skipped
  • tokenizer boundary suite: 6 passed
  • uv run ruff format .
  • uv run ruff check --fix .
  • uv run lint-imports
  • uv run python -m compileall -q nemo_automodel

Stack

Checklist

  • Followed the contributor and repository review guidance
  • Added focused tests
  • No documentation change is required for this internal construction refactor

@copy-pr-bot

copy-pr-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@akoumpa akoumpa changed the title akoumpa/refactor/typed tokenizer config refactor(recipes): add typed tokenizer construction Jul 10, 2026
@akoumpa

akoumpa commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test 90f69ef

Signed-off-by: Alexandros Koumparoulis <akoumparouli@nvidia.com>
@akoumpa akoumpa force-pushed the akoumpa/refactor/llm-packing-policy branch from 59212e4 to e8a8666 Compare July 13, 2026 14:03
@akoumpa akoumpa force-pushed the akoumpa/refactor/typed-tokenizer-config branch from 90f69ef to fe566cc Compare July 13, 2026 14:03
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