Skip to content

Commit

Permalink
fix: Hack for llama3 eos_token_id (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
tgaddair authored Apr 19, 2024
1 parent 2017d45 commit 3ffa99a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/lorax_server/models/flash_llama.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ def __init__(
trust_remote_code=trust_remote_code,
)

if tokenizer.eos_token_id == 128001:
# TODO(travis): hack to workaround llamam-3 chat template generating the wrong eos_token
# https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct/discussions/14
tokenizer.eos_token_id = 128009

config = LlamaConfig.from_pretrained(model_id, revision=revision, trust_remote_code=trust_remote_code)
config.quantize = quantize

Expand Down

0 comments on commit 3ffa99a

Please sign in to comment.