Instructions to use DUTIR-BioNLP/Taiyi-LLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DUTIR-BioNLP/Taiyi-LLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DUTIR-BioNLP/Taiyi-LLM", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("DUTIR-BioNLP/Taiyi-LLM", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DUTIR-BioNLP/Taiyi-LLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DUTIR-BioNLP/Taiyi-LLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DUTIR-BioNLP/Taiyi-LLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DUTIR-BioNLP/Taiyi-LLM
- SGLang
How to use DUTIR-BioNLP/Taiyi-LLM 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 "DUTIR-BioNLP/Taiyi-LLM" \ --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": "DUTIR-BioNLP/Taiyi-LLM", "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 "DUTIR-BioNLP/Taiyi-LLM" \ --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": "DUTIR-BioNLP/Taiyi-LLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DUTIR-BioNLP/Taiyi-LLM with Docker Model Runner:
docker model run hf.co/DUTIR-BioNLP/Taiyi-LLM
Commit ·
741538b
1
Parent(s): 064a12c
Upload README.md
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ license: apache-2.0
|
|
| 4 |
|
| 5 |
# Taiyi (太一): A Bilingual (Chinese and English) Fine-Tuned Large Language Model for Diverse Biomedical Tasks
|
| 6 |
|
| 7 |
-
[Demo](https://u230271-8d67-862a10ff.westb.seetacloud.com:8443/) | [Github](https://github.com/DUTIR-BioNLP/Taiyi-LLM)
|
| 8 |
|
| 9 |
This is the model of Taiyi using Qwen-7b-base as the base model, developed by [DUTIR](http://ir.dlut.edu.cn/) lab.
|
| 10 |
|
|
@@ -93,12 +93,10 @@ We provide two test codes for dialogue. You can use the code in [dialogue_one_tr
|
|
| 93 |
## Citation
|
| 94 |
If you use the repository of this project, please cite it.
|
| 95 |
```
|
| 96 |
-
@
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
journal = {GitHub repository}
|
| 102 |
-
howpublished = {\url{https://github.com/DUTIR-BioNLP/Taiyi-LLM}}
|
| 103 |
}
|
| 104 |
```
|
|
|
|
| 4 |
|
| 5 |
# Taiyi (太一): A Bilingual (Chinese and English) Fine-Tuned Large Language Model for Diverse Biomedical Tasks
|
| 6 |
|
| 7 |
+
[Demo](https://u230271-8d67-862a10ff.westb.seetacloud.com:8443/) | [Github](https://github.com/DUTIR-BioNLP/Taiyi-LLM) | [arXiv](https://arxiv.org/abs/2311.11608)
|
| 8 |
|
| 9 |
This is the model of Taiyi using Qwen-7b-base as the base model, developed by [DUTIR](http://ir.dlut.edu.cn/) lab.
|
| 10 |
|
|
|
|
| 93 |
## Citation
|
| 94 |
If you use the repository of this project, please cite it.
|
| 95 |
```
|
| 96 |
+
@article{Taiyi,
|
| 97 |
+
title="{Taiyi: A Bilingual Fine-Tuned Large Language Model for Diverse Biomedical Tasks}",
|
| 98 |
+
author={Ling Luo, Jinzhong Ning, Yingwen Zhao, Zhijun Wang, Zeyuan Ding, Peng Chen, Weiru Fu, Qinyu Han, Guangtao Xu, Yunzhi Qiu, Dinghao Pan, Jiru Li, Hao Li, Wenduo Feng, Senbo Tu, Yuqi Liu, Zhihao Yang, Jian Wang, Yuanyuan Sun, Hongfei Lin},
|
| 99 |
+
journal={arXiv preprint arXiv:2311.11608},
|
| 100 |
+
year={2023},
|
|
|
|
|
|
|
| 101 |
}
|
| 102 |
```
|