Instructions to use ALmonster/braingpt-1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ALmonster/braingpt-1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ALmonster/braingpt-1.0", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ALmonster/braingpt-1.0", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ALmonster/braingpt-1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ALmonster/braingpt-1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ALmonster/braingpt-1.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ALmonster/braingpt-1.0
- SGLang
How to use ALmonster/braingpt-1.0 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ALmonster/braingpt-1.0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ALmonster/braingpt-1.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ALmonster/braingpt-1.0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ALmonster/braingpt-1.0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ALmonster/braingpt-1.0 with Docker Model Runner:
docker model run hf.co/ALmonster/braingpt-1.0
BrainGPT1
💻 Github Repo• 🐦 blog
华东师范大学,计算机科学与技术学院,智能教育研究院,小怪兽会微笑
介绍
BrainGPT1是一个工具调用多轮对话模型,与GPT-4o不同的是,模型通过调用多个工具模型实现了多模态的多轮对话。因此,模型具备有工具灵活更新,定制化使用的特点。模型主要具有以下能力:
通用问答:默认使用讯飞星火大模型提供的免费API(spark lite),也可以自行接入其他API或本地模型,项目中提供了接入本地ChatGLM3的API的demo。
画图能力:默认使用stable-diffusion-xl-base-1.0模型。
图片问答:默认使用InternLM-XComposer模型。
多媒体播放:默认代码查询并返回bilibili的搜索结果。
天气查询:默认使用代码查询并返回API的结果。
BrainGPT1的基座模型采用了ChatGLM3,经过全量微调获得,调用工具的实现方式与ChatGLM3类似。
项目前端使用streamlit框架,主要基于Streamlit Multimodal Chat Input和streamlit-chat 实现前端的多轮多模态对话效果。
尽管模型在训练的各个阶段都尽力确保数据的合规性和准确性,但由于缺乏实际用户下的训练数据,且模型受概率随机性因素影响,无法保证输出内容的准确。本项目不承担开源模型和代码导致的数据安全、舆情风险或发生任何模型被误导、滥用、传播、不当利用而产生的风险和责任。本项目遵循BSD 3-Clause License。
Demo
Readme_EN
Previously, an incident occurred where my application for the llama3 model on Hugging Face was not approved. As a result, this document does not have an English introduction, and future applications for the model file will not be open to regions outside of mainland China.
- Downloads last month
- 5