Skip to content

Commit

Permalink
Phi 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhanchen committed Aug 20, 2024
1 parent 647bbdb commit be8b3d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<a href="https://discord.gg/unsloth"><img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/Discord button.png" height="48"></a>
<a href="https://ko-fi.com/unsloth"><img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/buy me a coffee button.png" height="48"></a>

### Finetune Llama 3.1, Mistral, Phi-3 & Gemma 2-5x faster with 80% less memory!
### Finetune Llama 3.1, Mistral, Phi-3.5 & Gemma 2-5x faster with 80% less memory!

![](https://i.ibb.co/sJ7RhGG/image-41.png)

Expand Down
6 changes: 4 additions & 2 deletions unsloth/chat_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@

# =========================================== Phi-3
phi3_template = \
"{{ bos_token }}"\
# "{{ bos_token }}"\ # Phi-3.5 removes BOS?
"{% for message in messages %}"\
"{% if message['role'] == 'user' %}"\
"{{'<|user|>\n' + message['content'] + '<|end|>\n'}}"\
Expand Down Expand Up @@ -505,7 +505,9 @@
'''

phi3_template_eos_token = "<|end|>"
CHAT_TEMPLATES["phi-3"] = (phi3_template, phi3_template_eos_token, False, phi3_ollama,)
CHAT_TEMPLATES["phi-3"] = (phi3_template, phi3_template_eos_token, False, phi3_ollama,)
CHAT_TEMPLATES["phi-35"] = CHAT_TEMPLATES["phi-3"]
CHAT_TEMPLATES["phi-3.5"] = CHAT_TEMPLATES["phi-3"]
pass

# =========================================== Llama-3.1
Expand Down

0 comments on commit be8b3d8

Please sign in to comment.