Skip to content

Commit

Permalink
Fix Hermes2Adapter (lm-sys#2727)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewtun authored Nov 26, 2023
1 parent a754c48 commit c199c8d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1481,9 +1481,9 @@ class Hermes2Adapter(BaseModelAdapter):
use_fast_tokenizer = False

def match(self, model_path: str):
return (
"openhermes-2.5-mistral-7b"
or "openhermes-2-mistral-7b" in model_path.lower()
return any(
model_str in model_path.lower()
for model_str in ["openhermes-2.5-mistral-7b", "openhermes-2-mistral-7b"]
)

def load_model(self, model_path: str, from_pretrained_kwargs: dict):
Expand Down

0 comments on commit c199c8d

Please sign in to comment.