Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Update model_adapter.py
  • Loading branch information
staoxiao authored Sep 22, 2023
commit ee21ecb19cc21fb44578b95223dbc1a98bc08358
2 changes: 2 additions & 0 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,8 @@ def load_model(self, model_path: str, from_pretrained_kwargs: dict):
model.config.max_sequence_length = min(
model.config.max_position_embeddings, tokenizer.model_max_length
)
model.is_bge = True
model.eval()
return model, tokenizer

def get_default_conv_template(self, model_path: str) -> Conversation:
Expand Down