Skip to content

Commit

Permalink
fix(model): Fix some model missing stop tokens bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyinc committed Oct 26, 2023
1 parent 5500590 commit 343c9e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pilot/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ def model_adaptation(

# Overwrite model params:
params["stop"] = conv.stop_str
params["stop_token_ids"] = conv.stop_token_ids

return params, model_context

Expand Down
2 changes: 1 addition & 1 deletion pilot/scene/chat_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def get_implementation(chat_mode, **kwargs):
implementation = None
for cls in chat_classes:
if cls.chat_scene == chat_mode:
metadata = {"cls": str(cls), "params": kwargs}
metadata = {"cls": str(cls)}
with root_tracer.start_span(
"get_implementation_of_chat", metadata=metadata
):
Expand Down

0 comments on commit 343c9e8

Please sign in to comment.