-
Notifications
You must be signed in to change notification settings - Fork 938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the Phi 3 mini chat format #1383
base: main
Are you sure you want to change the base?
Conversation
It's getting weird over on HF. MS has revised the Phi-3 chat format to completely ignore the system role, and are telling consumers to rewrite their prompt structures instead. https://huggingface.co/microsoft/Phi-3-mini-4k-instruct/discussions/51 |
@abetlen Is there any way I can help? Would be nice to get the phi 3 format in, now that the larger models have been released. |
@@ -1325,6 +1331,27 @@ def format_gemma( | |||
_prompt = _format_no_colon_single(system_message="", messages=_messages, sep=_sep) | |||
return ChatFormatterResponse(prompt=_prompt, stop=_sep) | |||
|
|||
@register_chat_format("phi_3_mini") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to call it just "phi-3" here and elsewhere
assistant="<|assistant|>", | ||
system="<|system|>" | ||
) | ||
_begin_token = "<s>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see <s>
in the technical report. Are you sure you need this?
Any success in merging this ? |
*my first PR :)