Python 3.11 requires CUDA version 12 or above
$ cd 2024lmcbise $ pip install -r requirements.txt
Required models include:
chatGLM2-6b text2vec You can download common open-source LLM and embedding models from the HuggingFace mirror website hf-mirror.com. To download models, you need to install Git LFS first, and then run the following commands:
$ git lfs install $ git clone https://hf-mirror.com/THUDM/chatglm2-6b $ git clone https://hf-mirror.com/GanymedeNil/text2vec-large-chinese
Add the absolute path of the model in model_config.py.
cd 2024lmcbise
Execute the cli_demo.py script to experience command-line interaction:
$ python cli_demo.py
Or execute the webui.py script to experience Web interaction:
$ python webui.py
Or deploy an API using fastapi:
$ python api.py
Experience the VUE-based front-end page after successfully deploying the API:
$ cd views $ pnpm i $ npm run dev
Project Reference: https://github.com/chatchat-space/Langchain-Chatchat
python 3.11 cuda版本需要12及以上
$ cd 2024lmcbise $ pip install -r requirements.txt
需要用到的模型有 chatGLM2-6b text2vec #可以去通常开源 LLM 与 Embedding 模型可以从 HuggingFace 的镜像网站hf-mirror.com下载。 #下载模型需要先安装 Git LFS ,然后运行
$ git lfs install $ git clone https://hf-mirror.com/THUDM/chatglm2-6b $ git clone https://hf-mirror.com/GanymedeNil/text2vec-large-chinese
#在model_config.py中添加模型绝对目录。
cd 2024lmcbise
执行 cli_demo.py 脚本体验命令行交互:
$ python cli_demo.py
或执行 webui.py 脚本体验 Web 交互
$ python webui.py
或执行 api.py 利用 fastapi 部署 API
$ python api.py
$ cd views
$ pnpm i
$ npm run dev