AttributeError: 'MegatronHFTokenizer' object has no attribute 'additional_special_tokens' — all T5 / BertWordPieceCase nightlies broken
Every T5 functional test in the nightly pipeline currently dies during dataset construction with an AttributeError on the MegatronHFTokenizer wrapper. The training process never reaches step 0; the failure is deterministic and reproduces on every rank.
The error is triggered from T5MaskedWordPieceDatasetConfig.post_init when it dereferences tokenizer.additional_special_tokens_ids, which transitively reads self.additional_special_tokens on the wrapper — an attribute that the wrapper never sets in init. It used to get set as a side-effect of add_special_tokens() copying attributes from the underlying HuggingFace tokenizer's SPECIAL_TOKENS_ATTRIBUTES list, but that side effect no longer fires under the transformers version installed in the current mcore-pyt-dev / mcore-pyt-lts containers.
Affected scope All T5 pretraining functional tests (e.g. t5_11b_mcore_tp4_pp1, t5_mcore_tp1_pp1_vp1, t5_mcore_tp4_pp1, t5_mcore_te_tp4_pp1, etc.). Any other recipe whose training path goes through MegatronHFTokenizer and reaches additional_special_tokens_ids — primarily anything that uses --tokenizer-type BertWordPieceCase (T5 sentinel tokens) or BertWordPieceLowerCase. BERT pretraining recipes are not affected because they don't read additional_special_tokens_ids during dataset init. Reproducer Run any T5 pretraining functional test on the current ci-nightly ref using the current mcore-pyt-dev (or mcore-pyt-lts) container — for example t5_11b_mcore_tp4_pp1 on dgxh100_coreweave or t5_mcore_tp1_pp1_vp1 on dgxa100_dracooci-ord. Job fails on rank 0 (and all other ranks) immediately after tokenizer initialization, before any training step. Outer job duration ~20-30 minutes (most of it spent in JET pipeline retries). Stack trace (verbatim from rank 0 stderr)
[rank0]: Traceback (most recent call last):
[rank0]: File "/opt/megatron-lm/pretrain_t5.py", line 275, in
Steps/Code to reproduce bug
Please list minimal steps or code snippet for us to be able to reproduce the bug.
A helpful guide on on how to craft a minimal bug report http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports.
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.