Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston committed Nov 23, 2023
1 parent bf4f163 commit f528d66
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1021,14 +1021,19 @@ def get_conv_template(name: str) -> Conversation:
)
)


# source: https://huggingface.co/01-ai/Yi-34B-Chat/blob/main/tokenizer_config.json#L60
register_conv_template(
Conversation(
name="Yi-34b-chat",
roles=("<|im_start|>user", "<|im_start|>assistant"),
sep_style=SeparatorStyle.CHATML,
sep="<|im_end|>",
stop_token_ids=[2, 6, 7, 8], # "<|endoftext|>", "<|im_start|>", "<|im_end|>", "<|im_sep|>"
stop_token_ids=[
2,
6,
7,
8,
], # "<|endoftext|>", "<|im_start|>", "<|im_end|>", "<|im_sep|>"
stop_str="<|endoftext|>",
)
)
Expand Down

0 comments on commit f528d66

Please sign in to comment.