2929
3030支持多种开源大模型
3131
32- |  Model   |   Backbone |  #Params |  Open-source model  |  Open-source data  |   Claimed language |  Post -training (instruction)  |  Post -training (conversation)  |  Release date  | 
33- | ------------------------------------------------------------------------- | ----------| ---------:| ------------------: | -----------------: | -----------------: | ----------------------------: | -----------------------------: | -------------:| 
34- |  [ ChatGLM] ( https://github.com/THUDM/ChatGLM-6B )    |  GLM  |      6B |     ✅  |  ❌  |  en, zh  |  |  |  03/16/23  | 
35- |  [ BELLE] ( https://github.com/LianjiaTech/BELLE )    |   BLOOMZ |  7B  |  ✅  |     ✅  |  zh  |  1.5M, zh  |   ❌  |  03/26/23  | 
36- |  [ Chinese-LLaMA-Alpaca] ( https://github.com/ymcui/Chinese-LLaMA-Alpaca )    |   LLaMA |    7/13B |  ✅  |   ✅  |   en, zh |    2M/3M, en/zh |  ❌  |   03/28/23  | 
37- |  [ BAIZE] ( https://github.com/project-baize/baize-chatbot )    |   LLaMA |  7/13/30B |  ✅  |  ✅  |    en |  ❌  |   111.5K, en  |  04/04/23  | 
38- |  [ Phoenix] ( https://github.com/FreedomIntelligence/LLMZoo )    |   BLOOMZ |    7B |  ✅  |  ✅  |   multi  |    40+ |   40+  |  04/08/23  | 
39- |  [ MOSS] ( https://github.com/OpenLMLab/MOSS )    |   CodeGen |    16B |     ✅  |  ✅  |   en, zh  |    |    |  04/21/23  | 
32+ |  Model |   Backbone   |  #Params   |   Claimed language   |  Instruction -training |  Conversation -training |   checkpoint link   | 
33+ | : -----------------------------------------------------------------------| : ----------: | : ---------:| : -----------------: | : ---------------------: | : ----------------------: | : ----------------------------------------------------------------------------------------------- -------------:| 
34+ |  [ ChatGLM] ( https://github.com/THUDM/ChatGLM-6B )  |    GLM    |  6B |  en, zh  |     |     |  [ THUDM/chatglm-6b ] ( https://huggingface.co/THUDM/chatglm-6b )     | 
35+ |  [ BELLE] ( https://github.com/LianjiaTech/BELLE )  |   BLOOMZ |  7B    |  zh  |  1.5M, zh  |  ❌     |     [ BelleGroup/BELLE-7B-2M ] ( https://huggingface.co/BelleGroup/BELLE-7B-2M )  | 
36+ |  [ Chinese-LLaMA-Alpaca] ( https://github.com/ymcui/Chinese-LLaMA-Alpaca )  |   LLaMA |  7/13B   |  en, zh |  2M/3M, en/zh |  ❌  |  [ ziqingyang/chinese-alpaca-plus-lora-7b ] ( https://huggingface.co/ziqingyang/chinese-alpaca-plus-lora-7b )    | 
37+ |  [ BAIZE] ( https://github.com/project-baize/baize-chatbot )  |   LLaMA |  7/13/30B   |  en  |  ❌     |  111.5K,  en |  [ project-baize/baize-lora-7B ] ( https://huggingface.co/project-baize/baize-lora-7B )     | 
38+ |  [ Phoenix] ( https://github.com/FreedomIntelligence/LLMZoo )  |   BLOOMZ |  7B |  multi  |  40+     |  40+ |   [ FreedomIntelligence/phoenix-inst-chat-7b ] ( https://huggingface.co/FreedomIntelligence/phoenix-inst-chat-7b )    | 
39+ |  [ MOSS] ( https://github.com/OpenLMLab/MOSS )  |   CodeGen   |  16B |  en, zh  |     |  |  [ fnlp/moss-moon-003-sft-int4 ] ( https://huggingface.co/fnlp/moss-moon-003-sft-int4 )  | 
4040
4141
4242## 🐳 环境配置  
@@ -112,12 +112,14 @@ python api/app.py \
112112``` shell 
113113cd  applications/chat
114114
115- python client.py --model_name chatglm
115+ python client.py --api_base http://192.168.0.xx:80/v1 -- model_name chatglm
116116``` 
117117
118+ ![ chat] ( images/chat.png ) 
119+ 
118120### [ openai-python] ( https://github.com/openai/openai-python )  
119121
120- #### Chat Completions  
122+ #### 1.  Chat Completions 
121123
122124``` python 
123125import  openai
@@ -140,7 +142,7 @@ print(completion.choices[0].message.content)
140142#  你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你,欢迎问我任何问题。
141143``` 
142144
143- #### Completions  
145+ #### 2.  Completions 
144146
145147``` python 
146148import  openai
@@ -157,7 +159,7 @@ print(completion.choices[0].text)
157159#  你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你,欢迎问我任何问题。
158160``` 
159161
160- #### Embeddings  
162+ #### 3.  Embeddings 
161163
162164``` python 
163165import  openai
@@ -178,7 +180,7 @@ print(embedding['data'][0]['embedding'])
178180
179181### [ langchain] ( https://github.com/hwchase17/langchain )  
180182
181- #### Chat Completions  
183+ #### 1.  Chat Completions 
182184
183185``` python 
184186import  os
@@ -194,7 +196,7 @@ print(chat([HumanMessage(content="你好")]))
194196#  content='你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你,欢迎问我任何问题。' additional_kwargs={}
195197``` 
196198
197- #### Completions  
199+ #### 2.  Completions 
198200
199201``` python 
200202import  os
@@ -209,7 +211,7 @@ print(llm("你好"))
209211#  你好👋!我是人工智能助手 ChatGLM-6B,很高兴见到你,欢迎问我任何问题。
210212``` 
211213
212- #### Embeddings  
214+ #### 3.  Embeddings 
213215
214216``` python 
215217import  os
0 commit comments