Co-creation-projects/Apricity-InnocoreAI/docs/MODEL_GUIDE.md
优点: 稳定、API 简单、效果好 缺点: 需要国际网络、按 token 计费
# .env 配置
OPENAI_API_KEY=sk-your-key-here
OPENAI_BASE_URL=https://api.openai.com/v1
LLM_PROVIDER=openai
LLM_MODEL=gpt-3.5-turbo # 或 gpt-4
模型选择:
gpt-3.5-turbo - 快速、便宜,适合日常使用gpt-4 - 更强大,适合复杂分析gpt-4-turbo-preview - 最新版本,上下文更长优点: 国内访问快、中文理解好、价格实惠 缺点: 需要阿里云账号
# .env 配置
DASHSCOPE_API_KEY=sk-your-dashscope-key
LLM_PROVIDER=dashscope
LLM_MODEL=qwen-turbo
模型选择:
qwen-turbo - 快速响应,适合实时交互(推荐)qwen-plus - 平衡性能和成本qwen-max - 最强性能,适合复杂任务获取 API Key:
优点: 完全免费、数据隐私、可定制 缺点: 需要 GPU、部署复杂
文本分析(当前需求):
Qwen2.5-7B-Instruct - 7B 参数,需要 16GB 显存Qwen2.5-14B-Instruct - 14B 参数,需要 32GB 显存GLM-4-9B - 9B 参数,中文理解好多模态(图表理解):
Qwen2-VL-7B-Instruct - 能理解论文图表InternVL2-8B - 学术场景表现好本地部署步骤:
# 1. 安装依赖
pip install modelscope transformers torch
# 2. 下载模型
from modelscope import snapshot_download
model_dir = snapshot_download('qwen/Qwen2.5-7B-Instruct')
# 3. 启动推理服务(使用 vLLM 或 FastChat)
python -m vllm.entrypoints.openai.api_server \
--model qwen/Qwen2.5-7B-Instruct \
--host 0.0.0.0 \
--port 8001
# 4. 配置 .env
OPENAI_BASE_URL=http://localhost:8001/v1
OPENAI_API_KEY=dummy # 本地部署不需要真实 key
LLM_MODEL=qwen/Qwen2.5-7B-Instruct
推荐: OpenAI gpt-3.5-turbo
推荐: DashScope qwen-turbo ⭐⭐⭐
推荐: 本地部署 Qwen2.5-7B
推荐: Qwen2-VL-7B-Instruct
| 模型 | 中文能力 | 英文能力 | 速度 | 成本 | 推荐度 |
|---|---|---|---|---|---|
| GPT-3.5-turbo | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 快 | 中 | ⭐⭐⭐⭐ |
| GPT-4 | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 慢 | 高 | ⭐⭐⭐⭐ |
| Qwen-turbo | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐ | 快 | 低 | ⭐⭐⭐⭐⭐ |
| Qwen-max | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | 中 | 中 | ⭐⭐⭐⭐⭐ |
| Qwen2.5-7B (本地) | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | 中 | 免费 | ⭐⭐⭐⭐ |
.env 文件:OPENAI_API_KEY=sk-your-key-here
.env 文件:DASHSCOPE_API_KEY=sk-your-key-here
LLM_PROVIDER=dashscope
LLM_MODEL=qwen-turbo
pip install dashscope
Q: 哪个模型最适合科研论文分析? A: 推荐 Qwen-max(DashScope)或 GPT-4,它们对学术文本理解最好。
Q: 如何降低成本? A: 使用 qwen-turbo 或本地部署 Qwen2.5-7B。
Q: 需要处理论文中的图表怎么办? A: 使用多模态模型如 Qwen2-VL-7B-Instruct。
Q: 本地部署需要什么配置? A: 最低 16GB 显存的 GPU(如 RTX 4090、A100)。