gpt_academic/request_llm
binary-husky 7662196514 update tests 2023-08-12 14:09:19 +08:00
..
README.md change claude model name to stack-claude 2023-05-19 10:46:12 +08:00
bridge_all.py 我是来自达摩院的大规模语言模型,我叫通义千问。 2023-08-07 01:58:35 +08:00
bridge_chatglm.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_chatglmft.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_chatglmonnx.py interface with qwen 2023-08-07 01:24:41 +08:00
bridge_chatgpt.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_claude.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_internlm.py interface with qwen 2023-08-07 01:24:41 +08:00
bridge_jittorllms_llama.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_jittorllms_pangualpha.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_jittorllms_rwkv.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_moss.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_newbingfree.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_qwen.py handle local llm dependency error properly 2023-08-07 02:11:48 +08:00
bridge_stackclaude.py add clear history tips 2023-07-27 23:07:59 +08:00
bridge_tgui.py add clear history tips 2023-07-27 23:07:59 +08:00
chatglmoonx.py fix minor bug in chatglm-onnx 2023-08-07 01:07:55 +08:00
edge_gpt_free.py fix msg.data.split(DELIMITER) exception when msg.data is int 2023-07-21 03:51:33 +08:00
local_llm_class.py handle local llm dependency error properly 2023-08-07 02:11:48 +08:00
requirements_chatglm.txt introduce unified base class for local llm models 2023-08-07 00:57:52 +08:00
requirements_chatglm_onnx.txt introduce unified base class for local llm models 2023-08-07 00:57:52 +08:00
requirements_jittorllms.txt merge jittor branch 2023-05-06 23:39:57 +08:00
requirements_moss.txt 添加对复旦大学MOSS的支持 2023-05-07 01:04:59 +08:00
requirements_newbing.txt 实现Newbing聊天功能 2023-04-22 21:18:35 +08:00
requirements_qwen.txt interface with qwen 2023-08-07 01:24:41 +08:00
requirements_slackclaude.txt 捕获缺少依赖时的异常 2023-05-19 10:55:50 +08:00

README.md

如何使用其他大语言模型

ChatGLM

  • 安装依赖 pip install -r request_llm/requirements_chatglm.txt
  • 修改配置在config.py中将LLM_MODEL的值改为"chatglm"
LLM_MODEL = "chatglm"
  • 运行!
`python main.py`

Claude-Stack

Newbing

  • 使用cookie editor获取cookiejson
  • 把cookiejson加入config.py NEWBING_COOKIES

Moss

  • 使用docker-compose

RWKV

  • 使用docker-compose

LLAMA

  • 使用docker-compose

盘古

  • 使用docker-compose

Text-Generation-UI (TGUI调试中暂不可用)

1. 部署TGUI

# 1 下载模型
git clone https://github.com/oobabooga/text-generation-webui.git
# 2 这个仓库的最新代码有问题,回滚到几周之前
git reset --hard fcda3f87767e642d1c0411776e549e1d3894843d
# 3 切换路径
cd text-generation-webui
# 4 安装text-generation的额外依赖
pip install accelerate bitsandbytes flexgen gradio llamacpp markdown numpy peft requests rwkv safetensors sentencepiece tqdm datasets git+https://github.com/huggingface/transformers
# 5 下载模型
python download-model.py facebook/galactica-1.3b
# 其他可选如 facebook/opt-1.3b
#           facebook/galactica-1.3b
#           facebook/galactica-6.7b
#           facebook/galactica-120b
#           facebook/pygmalion-1.3b 等
# 详情见 https://github.com/oobabooga/text-generation-webui

# 6 启动text-generation
python server.py --cpu --listen --listen-port 7865 --model facebook_galactica-1.3b

2. 修改config.py

# LLM_MODEL格式:   tgui:[模型]@[ws地址]:[ws端口] ,   端口要和上面给定的端口一致
LLM_MODEL = "tgui:galactica-1.3b@localhost:7860"

3. 运行!

cd chatgpt-academic
python main.py