Skip to content
Merged
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
6 changes: 5 additions & 1 deletion fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,10 +370,14 @@ def get_generate_stream_function(model: torch.nn.Module, model_path: str):
from fastchat.serve.inference import generate_stream

model_type = str(type(model)).lower()
is_peft = "peft" in model_type
if is_peft:
model.set_adapter(model_path)
model_type = str(type(model.base_model.model))

is_chatglm = "chatglm" in model_type
is_falcon = "rwforcausallm" in model_type
is_codet5p = "codet5p" in model_type
is_peft = "peft" in model_type
is_exllama = "exllama" in model_type
is_xft = "xft" in model_type

Expand Down