Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cppowboy committed Oct 28, 2024
1 parent 132eeeb commit 0f10942
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from bfcl.model_handler.oss_model.base_oss_handler import OSSHandler


class MiniCPMHandler(OSSHandler):
def __init__(self, model_name, temperature) -> None:
super().__init__(model_name, temperature)
Expand All @@ -11,7 +12,9 @@ def _format_prompt(self, messages, function):
formatted_prompt = ""

for message in messages:
formatted_prompt += f"<|im_start|>{message['role']}\n{message['content']}<|im_end|>\n"
formatted_prompt += (
f"<|im_start|>{message['role']}\n{message['content']}<|im_end|>\n"
)

formatted_prompt += f"<|im_start|>assistant\n"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
class MiniCPMFCHandler(OSSHandler):
def __init__(self, model_name, temperature) -> None:
super().__init__(model_name, temperature)
self.model_name_huggingface = "/user/panyinxu/models/minicpm3-4b"
self.stop_token_ids = [2, 73440]

@overrides
Expand Down

0 comments on commit 0f10942

Please sign in to comment.