Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
2264580
Remove hardcode flash-attn disable setting (#2342)
Trangle Sep 1, 2023
24a8755
Document turning off proxy_buffering when api is streaming (#2337)
nathanstitt Sep 1, 2023
b039a66
Simplify huggingface api example (#2355)
merrymercy Sep 4, 2023
ea045e6
Update sponsor logos (#2367)
merrymercy Sep 5, 2023
85bec47
if LOGDIR is empty, then don't try output log to local file (#2357)
leiwen83 Sep 5, 2023
f99663c
add best_of and use_beam_search for completions interface (#2348)
leiwen83 Sep 6, 2023
3cf04c2
Extract upvote/downvote from log files (#2369)
merrymercy Sep 6, 2023
94f4dd6
Revert "add best_of and use_beam_search for completions interface" (#…
merrymercy Sep 6, 2023
dc3dd12
Improve doc (#2371)
merrymercy Sep 6, 2023
a5e6abf
add best_of and use_beam_search for completions interface (#2372)
leiwen83 Sep 7, 2023
1d703b2
update monkey patch for llama2 (#2379)
merrymercy Sep 7, 2023
56744d1
Make E5 adapter more restrict to reduce mismatch (#2381)
merrymercy Sep 7, 2023
6af0a7c
Update UI and sponsers (#2387)
merrymercy Sep 8, 2023
9b3147e
Use fsdp api for save save (#2390)
merrymercy Sep 10, 2023
a6167db
Release v0.2.27
merrymercy Sep 10, 2023
7dcdafe
Spicyboros + airoboros 2.2 template update. (#2392)
jondurbin Sep 11, 2023
b921f16
bugfix of openai_api_server for fastchat.serve.vllm_worker (#2398)
Rayrtfr Sep 11, 2023
13f40b3
Revert "bugfix of openai_api_server for fastchat.serve.vllm_worker" (…
merrymercy Sep 11, 2023
77aa4df
Revert "add best_of and use_beam_search for completions interface" (#…
merrymercy Sep 11, 2023
11b05bb
Release a v0.2.28 with bug fixes and more test cases
merrymercy Sep 11, 2023
a8088ba
Fix model_worker error (#2404)
wangxiyuan Sep 12, 2023
b49d789
Added google/flan models and fixed AutoModelForSeq2SeqLM when loading…
wangzhen263 Sep 12, 2023
7dfcf1a
Rename twitter to X (#2406)
karshPrime Sep 12, 2023
aa153d5
Update huggingface_api.py (#2409)
merrymercy Sep 12, 2023
3149253
Add support for baichuan2 models (#2408)
Sep 13, 2023
2e0e60b
Fixed character overlap issue when api streaming output (#2431)
Somezak1 Sep 18, 2023
c7e3e67
Support custom conversation template in multi_model_worker (#2434)
hi-jin Sep 18, 2023
c685951
Add Ascend NPU support (#2422)
zhangsibo1129 Sep 18, 2023
54a8353
Add raw conversation template (#2417) (#2418)
tobiabir Sep 18, 2023
1119c51
Improve docs & UI (#2436)
merrymercy Sep 18, 2023
658736f
Fix Salesforce xgen inference (#2350)
jaywonchung Sep 18, 2023
d26d9e7
Add support for Phind-CodeLlama models (#2415) (#2416)
tobiabir Sep 18, 2023
0a5f503
Add falcon 180B chat conversation template (#2384)
Btlmd Sep 18, 2023
318d070
Improve docs (#2438)
merrymercy Sep 18, 2023
9cf3c8b
add dtype and seed (#2430)
Ying1123 Sep 18, 2023
24acac1
Data cleaning scripts for dataset release (#2440)
merrymercy Sep 18, 2023
30a6ffc
merge google/flan based adapters: T5Adapter, CodeT5pAdapter, FlanAdap…
wangzhen263 Sep 18, 2023
16be5cf
Fix docs
merrymercy Sep 18, 2023
e4758da
Update UI (#2446)
merrymercy Sep 18, 2023
68f1fac
Add Optional SSL Support to controller.py (#2448)
brandonbiggs Sep 19, 2023
db8e271
Format & Improve docs
merrymercy Sep 19, 2023
c4c195c
Release v0.2.29 (#2450)
merrymercy Sep 20, 2023
a040cdc
Show terms of use as an JS alert (#2461)
merrymercy Sep 22, 2023
bcb8076
vllm worker awq quantization update (#2463)
dongxiaolong Sep 22, 2023
2855bf9
Fix falcon chat template (#2464)
merrymercy Sep 22, 2023
20cfb32
Merge commit '2855bf9' into merge_0922
renning22 Sep 23, 2023
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
Prev Previous commit
Next Next commit
Add support for baichuan2 models (lm-sys#2408)
  • Loading branch information
obitolyz authored Sep 13, 2023
commit 3149253988ee16b0945aa0a381a42a07b8a7829e
14 changes: 14 additions & 0 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,20 @@ def get_conv_template(name: str) -> Conversation:
)
)

# Baichuan2-13B-Chat template
register_conv_template(
# source: https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat/blob/c6f8592a60b4ad73c210b28dd2ab3cca51abbf93/modeling_baichuan.py#L773
# https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat/blob/main/generation_config.json
# https://github.com/baichuan-inc/Baichuan2/issues/62
Conversation(
name="baichuan2-chat",
roles=("<reserved_106>", "<reserved_107>"),
sep_style=SeparatorStyle.NO_COLON_SINGLE,
sep="",
stop_token_ids=[],
)
)

# llama2 template
# reference: https://huggingface.co/blog/codellama#conversational-instructions
# reference: https://github.com/facebookresearch/llama/blob/1a240688810f8036049e8da36b073f63d2ac552c/llama/generation.py#L212
Expand Down
2 changes: 2 additions & 0 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,8 @@ def load_model(self, model_path: str, from_pretrained_kwargs: dict):
def get_default_conv_template(self, model_path: str) -> Conversation:
# for Baichuan-13B-Chat
if "chat" in model_path.lower():
if "baichuan2" in model_path.lower():
return get_conv_template("baichuan2-chat")
return get_conv_template("baichuan-chat")
return get_conv_template("zero_shot")

Expand Down