Skip to content

NemotronHBridge missing get_hf_tokenizer_kwargs causes checkpoint conversion failure #2663

@shanecmoran

Description

@shanecmoran

Description

Nemotron Nano v2 models (nvidia/NVIDIA-Nemotron-Nano-9B-v2, nvidia/NVIDIA-Nemotron-Nano-12B-v2) fail during convert_checkpoints.py import at the tokenizer-save step:

AttributeError: 'bool' object has no attribute 'chat_template'

self.tokenizer is False instead of a HuggingFace tokenizer object.

Root Cause

Three factors combine:

  1. The nvcr.io/nvidia/nemo:26.02 container's megatron-core (core_r0.16.0) defaults HuggingFaceTokenizer.__init__ to use_fast=False
  2. Nemotron Nano v2 only ships a fast tokenizer (tokenizer.json, no tokenizer.model), so AutoTokenizer.from_pretrained(..., use_fast=False) silently returns False
  3. NemotronHBridge does not implement get_hf_tokenizer_kwargs() to override this default

GLM45VBridge already solves this exact problem by implementing get_hf_tokenizer_kwargs() returning {"use_fast": True}.

Fix

Add get_hf_tokenizer_kwargs to NemotronHBridge, following the GLM45VBridge pattern. The call site in auto_bridge.py:768 already checks for this method via hasattr — no other changes needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ckptCheckpoint conversion, loading, export, and save pathsarea:modelModel implementations and HF bridge logicbugSomething isn't workingcommunity-requestneeds-follow-upIssue needs follow-up

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions