Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
yuanlehome committed Jun 21, 2024
1 parent 827f351 commit e40bdf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llm/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ def create_predictor(

# TODO(wj-Mcat): fix llama tokenzier pad_token bug
if (isinstance(tokenizer, LlamaTokenizer) or isinstance(tokenizer, Llama3Tokenizer)) and not tokenizer.pad_token:
tokenizer.pad_token = tokenizer.unk_token
tokenizer.pad_token = tokenizer.bos_token

config = AutoConfig.from_pretrained(predictor_args.model_name_or_path)

Expand Down
2 changes: 1 addition & 1 deletion paddlenlp/experimental/transformers/llama/modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ def get_cache_kvs_shape(
[
2,
max_batch_size,
config.num_attention_heads // max(config.tensor_parallel_degree, 1),
config.num_key_value_heads // max(config.tensor_parallel_degree, 1),
max_length,
config.hidden_size // config.num_attention_heads,
]
Expand Down

0 comments on commit e40bdf1

Please sign in to comment.