Skip to content

Commit 7dcdafe

Browse files
jondurbinj-durbin
andauthored
Spicyboros + airoboros 2.2 template update. (#2392)
Co-authored-by: Jon Durbin <[email protected]>
1 parent a6167db commit 7dcdafe

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

fastchat/conversation.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,17 @@ def get_conv_template(name: str) -> Conversation:
357357
)
358358
)
359359

360+
register_conv_template(
361+
Conversation(
362+
name="airoboros_v2",
363+
system_message="A chat.",
364+
roles=("USER", "ASSISTANT"),
365+
sep_style=SeparatorStyle.ADD_COLON_TWO,
366+
sep="\n",
367+
sep2="</s>",
368+
)
369+
)
370+
360371
# Koala default template
361372
register_conv_template(
362373
Conversation(

fastchat/model/model_adapter.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import math
44
import os
5+
import re
56
import sys
67
from typing import Dict, List, Optional
78
import warnings
@@ -561,9 +562,13 @@ class AiroborosAdapter(BaseModelAdapter):
561562
"""The model adapter for jondurbin/airoboros-*"""
562563

563564
def match(self, model_path: str):
564-
return "airoboros" in model_path.lower()
565+
if re.search(r"airoboros|spicyboros", model_path, re.I):
566+
return True
567+
return False
565568

566569
def get_default_conv_template(self, model_path: str) -> Conversation:
570+
if "spicyboros" in model_path or re.search(r"-(2\.[2-9]+)", model_path):
571+
return get_conv_template("airoboros_v2")
567572
return get_conv_template("airoboros_v1")
568573

569574
def load_model(self, model_path: str, from_pretrained_kwargs: dict):

fastchat/model/model_registry.py

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,15 +214,25 @@ def get_model_info(name: str) -> ModelInfo:
214214
)
215215
register_model_info(
216216
[
217-
"airoboros-7b-gpt4-1.4",
218-
"airoboros-13b-gpt4-1.4",
219-
"airoboros-33b-gpt4-1.4",
220-
"airoboros-65b-gpt4-1.4",
217+
"airoboros-l2-7b-2.1",
218+
"airoboros-l2-13b-2.1",
219+
"airoboros-c34b-2.1",
220+
"airoboros-l2-70b-2.1",
221221
],
222222
"airoboros",
223-
"https://huggingface.co/jondurbin/airoboros-33b-gpt4-1.4",
223+
"https://huggingface.co/jondurbin/airoboros-l2-70b-2.1",
224224
"an instruction-tuned LlaMa model tuned with 100% synthetic instruction-response pairs from GPT4",
225225
)
226+
register_model_info(
227+
[
228+
"spicyboros-7b-2.2",
229+
"spicyboros-13b-2.2",
230+
"spicyboros-70b-2.2",
231+
],
232+
"spicyboros",
233+
"https://huggingface.co/jondurbin/spicyboros-70b-2.2",
234+
"de-aligned versions of the airoboros models",
235+
)
226236
register_model_info(
227237
["Robin-7b-v2", "Robin-13b-v2", "Robin-33b-v2"],
228238
"Robin-v2",

0 commit comments

Comments
 (0)