Instructions to use DuJinHua/AiMed_PaperAbs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DuJinHua/AiMed_PaperAbs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DuJinHua/AiMed_PaperAbs", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("DuJinHua/AiMed_PaperAbs", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DuJinHua/AiMed_PaperAbs with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DuJinHua/AiMed_PaperAbs" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DuJinHua/AiMed_PaperAbs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DuJinHua/AiMed_PaperAbs
- SGLang
How to use DuJinHua/AiMed_PaperAbs 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 "DuJinHua/AiMed_PaperAbs" \ --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": "DuJinHua/AiMed_PaperAbs", "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 "DuJinHua/AiMed_PaperAbs" \ --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": "DuJinHua/AiMed_PaperAbs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DuJinHua/AiMed_PaperAbs with Docker Model Runner:
docker model run hf.co/DuJinHua/AiMed_PaperAbs
AiMed: Artificial Intelligence large language model for chinese Medicine 面向中文医学的人工智能大语言模型
🔬 介绍
AiMed 面向中文医学的人工智能大语言模型由清华大学OpenDE团队和中国医学科学院医学信息研究所(下称“医信所”)联合研发。
AiMed 期望实现有效处理医学知识问答、医学论文阅读、医学文献检索等任务和在医学科研中的应用。
AiMed 详细测试脚本请参考我们的项目:https://github.com/Du-JinHua/AiMed
⏩ 构建流程
AiMed 整个构建流程包括:
- PT增量预训练
- SFT有监督微调
- AiMed_PaperAbs是AiMed系列模型中,通过从千万医学文献中提取高质量10万条摘要进行的论文摘要大模型微调版本。
- RLHF(奖励建模、强化学习训练)
- DPO(直接偏好优化)
🌏 模型基座
| 模型名 | 模型大小 | 开源参数 |
|---|---|---|
| Baichuan | 13B | baichuan-inc/Baichuan-13B-Chat |
😜 推理和部署
推理所需的模型权重、源码、配置公开于https://github.com/Du-JinHua/AiMed
⚠️ 局限性
授权协议为 The Apache License 2.0,目前仅支持学术研究,不支持商业用途。
- Downloads last month
- 5