Fix bos/eos token ids to match the Llama tokenizer (1/2)
#1
by UncleanCode - opened
Fixes huggingface/optimum-executorch#28.
The bundled LlamaTokenizer uses the standard Llama special tokens (<s>=1, </s>=2), but config.json and generation_config.json declared bos_token_id=0, eos_token_id=1. optimum-executorch exports get_bos_id/get_eos_id from the config, so the .pte carried 0/1 and ExecuTorchModelForCausalLM.text_generation correctly rejected the mismatch:
ValueError: The tokenizer's bos_token_id=1 must be the same as the model's bos_token_id=0.
This sets bos_token_id=1, eos_token_id=2 in both files. No weights or tokenizer files changed. A companion PR updates the executorch revision (configs + regenerated model.pte).