Openai style api for open large language models, using LLMs just as chatgpt! Support for LLaMA, LLaMA-2, BLOOM, Falcon, Baichuan, Qwen, Xverse, SqlCoder, CodeLLaMA, ChatGLM, ChatGLM2, ChatGLM3 etc. 开源大模型的统一后端接口
提交前必须检查以下项目 | The following items must be checked before submission
[X] 请确保使用的是仓库最新代码(git pull),一些问题已被解决和修复。 | Make sure you are using the latest code from the repository (git pull), some issues have already been addressed and fixed.
[X] 我已阅读项目文档和FAQ章节并且已在Issue中对问题进行了搜索,没有找到相似问题和解决方案 | I have searched the existing issues / discussions
========== text_ori ==========
<|im_start|>system
You are a helpful assistant<|im_end|>
<|im_start|>user
Hello, how are you?<|im_end|>
<|im_start|>assistant
========== text_api ==========
<|im_start|>user
Hello, how are you?<|im_end|>
<|im_start|>assistant
参考原始 qwen 的分词器模板,里面有这样一段:
{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}
提交前必须检查以下项目 | The following items must be checked before submission
问题类型 | Type of problem
其他问题 | Other issues
操作系统 | Operating system
None
详细描述问题 | Detailed description of the problem
使用 qwen tokenizer 的 chat_template 和 api-for-open-llm 中的 template, 如果messages中没有system信息,前面会缺一个system提示
输出:
参考原始 qwen 的分词器模板,里面有这样一段:
Dependencies
运行日志或截图 | Runtime logs or screenshots