diff --git a/configs/loom.yaml.example b/configs/loom.yaml.example index 0432b50a..1f7a3bfb 100644 --- a/configs/loom.yaml.example +++ b/configs/loom.yaml.example @@ -22,12 +22,12 @@ plugins: - imitater: name: "imitater" logdir: "/media/gpt4-pdf-chatbot-langchain/langchain-chatchat-archive/logs" - worker_name: "worker1" + worker_name: "qwen-worker1" run_openai_api: host: "127.0.0.1" port: 30000 imitate_model_workers: - - worker1: + - qwen-worker1: model: name: "Qwen-1_8B-Chat" chat_model_path: "/media/checkpoint/Qwen-1_8B" diff --git a/openai_plugins/imitater/templates/qwen.jinja b/openai_plugins/imitater/templates/qwen.jinja index 5debc9ad..1ac25602 100644 --- a/openai_plugins/imitater/templates/qwen.jinja +++ b/openai_plugins/imitater/templates/qwen.jinja @@ -8,13 +8,13 @@ {%- set loop_messages = messages -%} {%- set system_message = 'You are a helpful assistant.' -%} {%- endif -%} -{{ '<|im_start|>' + 'system' + '\\n' + system_message + '<|im_end|>' + '\\n' }} +{{ '<|im_start|>' + 'system' + '\n' + system_message + '<|im_end|>' + '\n' }} {%- for message in loop_messages -%} - {{ '<|im_start|>' + message['role'] + '\\n' + message['content']}} + {{ '<|im_start|>' + message['role'] + '\n' + message['content']}} {%- if (loop.last and add_generation_prompt) or not loop.last -%} - {{ '<|im_end|>' + '\\n' }} + {{ '<|im_end|>' + '\n' }} {%- endif -%} {%- endfor -%} {%- if add_generation_prompt and messages[-1]['role'] != 'assistant' -%} - {{ '<|im_start|>' + 'assistant' + '\\n' }} + {{ '<|im_start|>' + 'assistant' + '\n' }} {%- endif -%}