Open drewjin opened 4 days ago
Use Llama-3.1-8B-Instruct instead of Llama-3.1-8B
meta-llama/Llama-3.1-8B
is a base model, so it doesn't have a tokenizer.apply_chat_template()
function supported as the chat template is mostly enforced during instruction tuning. Should you want to use this model, please set chat_template: null
in the pipeline config, and the input will return at L13 of pipeline/model_utils.py
as a straight copy to avoid your posted error.
Alternatively, you can just use meta-llama/Llama-3.1-8B-Instruct
as you already figured out here.
Note that Llama 3.1 has a much larger context window than Llama 3, so you might also want to adjust model_max_len
in the pipeline config accordingly. The typical LongBench fashion is to make it max (so 128k) - 500 tokens — just a reminder if this is not too extra; and do let us know if there's more we can help.
While running the code as a demo, I encountered a strange problem caused by chat template. code (in script
model_utils.py
)Traceback:
environment:
model I choose as the demo baseline: