Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,17 @@ def get_conv_template(name: str) -> Conversation:
)
)

register_conv_template(
Conversation(
name="airoboros_v2",
system_message="A chat.",
roles=("USER", "ASSISTANT"),
sep_style=SeparatorStyle.ADD_COLON_TWO,
sep="\n",
sep2="</s>",
)
)

# Koala default template
register_conv_template(
Conversation(
Expand Down
7 changes: 6 additions & 1 deletion fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import math
import os
import re
import sys
from typing import Dict, List, Optional
import warnings
Expand Down Expand Up @@ -561,9 +562,13 @@ class AiroborosAdapter(BaseModelAdapter):
"""The model adapter for jondurbin/airoboros-*"""

def match(self, model_path: str):
return "airoboros" in model_path.lower()
if re.search(r"airoboros|spicyboros", model_path, re.I):
return True
return False

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

def load_model(self, model_path: str, from_pretrained_kwargs: dict):
Expand Down
20 changes: 15 additions & 5 deletions fastchat/model/model_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,15 +214,25 @@ def get_model_info(name: str) -> ModelInfo:
)
register_model_info(
[
"airoboros-7b-gpt4-1.4",
"airoboros-13b-gpt4-1.4",
"airoboros-33b-gpt4-1.4",
"airoboros-65b-gpt4-1.4",
"airoboros-l2-7b-2.1",
"airoboros-l2-13b-2.1",
"airoboros-c34b-2.1",
"airoboros-l2-70b-2.1",
],
"airoboros",
"https://huggingface.co/jondurbin/airoboros-33b-gpt4-1.4",
"https://huggingface.co/jondurbin/airoboros-l2-70b-2.1",
"an instruction-tuned LlaMa model tuned with 100% synthetic instruction-response pairs from GPT4",
)
register_model_info(
[
"spicyboros-7b-2.2",
"spicyboros-13b-2.2",
"spicyboros-70b-2.2",
],
"spicyboros",
"https://huggingface.co/jondurbin/spicyboros-70b-2.2",
"de-aligned versions of the airoboros models",
)
register_model_info(
["Robin-7b-v2", "Robin-13b-v2", "Robin-33b-v2"],
"Robin-v2",
Expand Down