mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-27 18:50:41 +00:00
fix: meta reference + llama4 tokenizer fix
This commit is contained in:
parent
10882bf478
commit
8001c30a4f
2 changed files with 5 additions and 3 deletions
|
@ -56,9 +56,11 @@ LLAMA4_TEXT_POST_TRAIN_SPECIAL_TOKENS = [
|
||||||
"<|text_post_train_reserved_special_token_3|>",
|
"<|text_post_train_reserved_special_token_3|>",
|
||||||
"<|text_post_train_reserved_special_token_4|>",
|
"<|text_post_train_reserved_special_token_4|>",
|
||||||
"<|text_post_train_reserved_special_token_5|>",
|
"<|text_post_train_reserved_special_token_5|>",
|
||||||
|
"<|text_post_train_reserved_special_token_6|>",
|
||||||
|
"<|text_post_train_reserved_special_token_7|>",
|
||||||
"<|finetune_right_pad|>",
|
"<|finetune_right_pad|>",
|
||||||
] + get_reserved_special_tokens(
|
] + get_reserved_special_tokens(
|
||||||
"text_post_train", 61, 6
|
"text_post_train", 61, 8
|
||||||
) # <|text_post_train_reserved_special_token_6|>, ..., <|text_post_train_reserved_special_token_66|>
|
) # <|text_post_train_reserved_special_token_6|>, ..., <|text_post_train_reserved_special_token_66|>
|
||||||
|
|
||||||
# 200080, ..., 201133
|
# 200080, ..., 201133
|
||||||
|
|
|
@ -259,7 +259,7 @@ class Llama3Generator:
|
||||||
|
|
||||||
temperature, top_p = _infer_sampling_params(sampling_params)
|
temperature, top_p = _infer_sampling_params(sampling_params)
|
||||||
for result in self.inner_generator.generate(
|
for result in self.inner_generator.generate(
|
||||||
llm_inputs=[self.formatter.encode_content(request.content)],
|
model_inputs=[self.formatter.encode_content(request.content)],
|
||||||
max_gen_len=max_gen_len,
|
max_gen_len=max_gen_len,
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
top_p=top_p,
|
top_p=top_p,
|
||||||
|
@ -284,7 +284,7 @@ class Llama3Generator:
|
||||||
|
|
||||||
temperature, top_p = _infer_sampling_params(sampling_params)
|
temperature, top_p = _infer_sampling_params(sampling_params)
|
||||||
for result in self.inner_generator.generate(
|
for result in self.inner_generator.generate(
|
||||||
llm_inputs=[self.formatter.encode_dialog_prompt(request.messages, _infer_tool_prompt_format(request))],
|
model_inputs=[self.formatter.encode_dialog_prompt(request.messages, _infer_tool_prompt_format(request))],
|
||||||
max_gen_len=max_gen_len,
|
max_gen_len=max_gen_len,
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
top_p=top_p,
|
top_p=top_p,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue