Skip to content

Commit

Permalink
fixup! fixup! feat: add Llama3 support based on lm-sys#3259
Browse files Browse the repository at this point in the history
Signed-off-by: Harikrishnan Balagopal <[email protected]>
  • Loading branch information
HarikrishnanBalagopal committed Jul 1, 2024
1 parent f5c64d2 commit c209d78
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def register_conv_template(template: Conversation, override: bool = False):

def get_conv_template(name: str) -> Conversation:
"""Get a conversation template."""
print("DEBUG get_conv_template x4 name", name)
print("DEBUG get_conv_template x4 name", name, "conv_templates", conv_templates)
t2 = conv_templates[name].copy()
print("DEBUG get_conv_template x4 t2", t2)
return t2
Expand Down
4 changes: 2 additions & 2 deletions fastchat/model/model_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ def load_compress_model(self, model_path, device, torch_dtype, revision="main"):
)

def get_default_conv_template(self, model_path: str) -> Conversation:
print("DEBUG x3 get_default_conv_template model_path", model_path)
print("DEBUG x3 BaseModelAdapter.get_default_conv_template(one_shot) model_path", model_path)
t1 = get_conv_template("one_shot")
print("DEBUG x3 get_default_conv_template t1", t1)
print("DEBUG x3 BaseModelAdapter.get_default_conv_template t1", t1)
return t1
# return get_conv_template("one_shot")

Expand Down
10 changes: 2 additions & 8 deletions fastchat/serve/base_model_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@ def __init__(
self.model_names = model_names or [model_path.split("/")[-1]]
self.limit_worker_concurrency = limit_worker_concurrency
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('================== DEBUG ==================')
print('conv_template, model_path', conv_template, model_path)
print('================== DEBUG ==================')
self.conv = self.make_conv_template(conv_template, model_path)
Expand Down Expand Up @@ -89,9 +81,11 @@ def make_conv_template(
if conv_template:
print("DEBUG make_conv_template if x1")
conv = get_conv_template(conv_template)
print("DEBUG make_conv_template if x1 conv", conv)
else:
print("DEBUG make_conv_template else x1")
conv = get_conversation_template(model_path)
print("DEBUG make_conv_template else x1 conv", conv)
return conv

def init_heart_beat(self):
Expand Down

0 comments on commit c209d78

Please sign in to comment.