Skip to content

Commit bb8aae5

Browse files
authored
Bump the version to 0.2.35 (#2927)
1 parent d6ca36a commit bb8aae5

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

fastchat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.34"
1+
__version__ = "0.2.35"

fastchat/conversation.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1434,9 +1434,9 @@ def get_conv_template(name: str) -> Conversation:
14341434
)
14351435

14361436

1437-
#yuan 2.0 template
1438-
#reference:https://github.com/IEIT-Yuan/Yuan-2.0
1439-
#reference:https://huggingface.co/IEITYuan
1437+
# yuan 2.0 template
1438+
# reference:https://github.com/IEIT-Yuan/Yuan-2.0
1439+
# reference:https://huggingface.co/IEITYuan
14401440
register_conv_template(
14411441
Conversation(
14421442
name="yuan",
@@ -1445,7 +1445,6 @@ def get_conv_template(name: str) -> Conversation:
14451445
sep_style=SeparatorStyle.NO_COLON_SINGLE,
14461446
sep="<sep>",
14471447
stop_str="<eod>",
1448-
14491448
)
14501449
)
14511450

fastchat/model/model_adapter.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2130,23 +2130,41 @@ def match(self, model_path: str):
21302130
def get_default_conv_template(self, model_path: str) -> Conversation:
21312131
return get_conv_template("solar")
21322132

2133+
21332134
class Yuan2Adapter(BaseModelAdapter):
2134-
"""The model adapter for Yuan """
2135+
"""The model adapter for Yuan"""
21352136

21362137
def match(self, model_path: str):
21372138
return "yuan" in model_path.lower()
21382139

21392140
def load_model(self, model_path: str, from_pretrained_kwargs: dict):
21402141
model, tokenizer = super().load_model(model_path, from_pretrained_kwargs)
21412142
tokenizer.add_tokens(
2142-
['<sep>', '<pad>', '<mask>', '<predict>', '<FIM_SUFFIX>', '<FIM_PREFIX>', '<FIM_MIDDLE>', '<commit_before>',
2143-
'<commit_msg>', '<commit_after>', '<jupyter_start>', '<jupyter_text>', '<jupyter_code>',
2144-
'<jupyter_output>', '<empty_output>'], special_tokens=True)
2143+
[
2144+
"<sep>",
2145+
"<pad>",
2146+
"<mask>",
2147+
"<predict>",
2148+
"<FIM_SUFFIX>",
2149+
"<FIM_PREFIX>",
2150+
"<FIM_MIDDLE>",
2151+
"<commit_before>",
2152+
"<commit_msg>",
2153+
"<commit_after>",
2154+
"<jupyter_start>",
2155+
"<jupyter_text>",
2156+
"<jupyter_code>",
2157+
"<jupyter_output>",
2158+
"<empty_output>",
2159+
],
2160+
special_tokens=True,
2161+
)
21452162
return model, tokenizer
21462163

21472164
def get_default_conv_template(self, model_path: str) -> Conversation:
21482165
return get_conv_template("yuan")
21492166

2167+
21502168
# Note: the registration order matters.
21512169
# The one registered earlier has a higher matching priority.
21522170
register_model_adapter(PeftModelAdapter)

fastchat/model/model_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ def get_model_info(name: str) -> ModelInfo:
545545
)
546546

547547
register_model_info(
548-
["Yuan2-2B-hf","Yuan2-51B-hf","Yuan2-102B-hf"],
548+
["Yuan2-2B-hf", "Yuan2-51B-hf", "Yuan2-102B-hf"],
549549
"IEIYuan",
550550
"https://huggingface.co/IEITYuan",
551551
"Yuan2 is a Basemodel developed by IEI.",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fschat"
7-
version = "0.2.34"
7+
version = "0.2.35"
88
description = "An open platform for training, serving, and evaluating large language model based chatbots."
99
readme = "README.md"
1010
requires-python = ">=3.8"

0 commit comments

Comments
 (0)