Llama 4 vs Llama 3 Special Tokens: Exact Prompt Format
According to Meta's official model cards, Llama 3 used <|start_header_id|>{role}<|end_header_id|> and <|eot_id|>, whereas Llama 4 uses <|header_start|>{role}<|header_end|> to enclose the role (system, user, assistant, ipython) and <|eot|> as the End of Turn token. Proper BOS (<|begin_of_text|>) and EOS/EOT token handling is critical so the model knows when to stop generating.
<|begin_of_text|><|header_start|>system<|header_end|> You are a helpful coding assistant.<|eot|> <|header_start|>user<|header_end|> Write a binary search function in Python.<|eot|> <|header_start|>assistant<|header_end|>Nobody has confirmed this prompt yet. If you try it, tell others whether it worked.
No comments yet.