Unverified Commit f06db80d authored by Lyu Han's avatar Lyu Han Committed by GitHub
Browse files

remove chat template (#252)

parent e50387cc
......@@ -113,36 +113,6 @@ class InternLMChat7B8K(InternLMChat7B):
self.session_len = 8192
@MODELS.register_module(name='puyu')
class Puyu(BaseModel):
"""Chat template of puyu model.This is only for internal usage in Shanghai
AI Laboratory."""
def __init__(self):
super().__init__()
self.system = """meta instruction
You are an AI assistant whose name is InternLM (书生·浦语).
- 书生·浦语 is a conversational language model that is developed by Shanghai AI Laboratory (上海人工智能实验室). It is designed to be helpful, honest, and harmless.
- 书生·浦语 can understand and communicate fluently in the language chosen by the user such as English and 中文.
conversation""" # noqa: E501
self.user = '<|Human|>'
self.eoh = 'െ'
self.assistant = '<|Assistant|>'
def get_prompt(self, prompt, sequence_start=True):
if sequence_start:
return f'<BOS>{self.system}\n' \
f'{self.user}:{prompt}{self.eoh}\n' \
f'{self.assistant}:'
else:
return f'\n{self.user}:{prompt}{self.eoh}\n{self.assistant}:'
@property
def stop_words(self):
"""Return the stop-words' token ids."""
return [45623]
@MODELS.register_module(name='baichuan-7b')
class Baichuan7B(BaseModel):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment