NVIDIA/Megatron-LM

[BUG] GPT2BPETokenizer (and possibly others) missing decode and offsets methods

Open

#1633 aperta il 13 giu 2025

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)Python (1723 fork)batch import
bugcommunity-requestgood first issuemodule: data pipelinewaiting-on-customer

Metriche repository

Star
 (7565 star)
Metriche merge PR
 (Merge medio 12g 9h) (245 PR mergiate in 30 g)

Descrizione

I've encountered an issue when running text generation with Megatron-LM. Apologies in advance if there are any mistakes — I'm a new user.

After successfully preprocessing the data using:

python tools/preprocess_data.py --tokenizer-type GPT2BPETokenizer

and completing pretraining, I tried running text generation using:

tools/run_text_generation_server.py

However, I received the following errors:

AttributeError: '_GPT2BPETokenizer' object has no attribute 'decode'
AttributeError: '_GPT2BPETokenizer' object has no attribute 'offsets'

These errors seem to originate from:

It seems like _GPT2BPETokenizer may be missing decode and offsets methods required by the inference script. Any guidance on how to resolve this would be greatly appreciated.

Guida contributor