Downloads · 30 days
160
4% of all-time downloads
SYNLP/ChiMed-GPT-1.0
ChiMed-GPT-1.0 is a text generation model from SYNLP. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
ChiMed-GPT is a Chinese medical large language model (LLM) built by continually training Ziya-v2 on Chinese medical data, where pre-training, supervised fine-tuning (SFT), and reinforcement learning from human feedbac…
Downloads · 30 days
160
4% of all-time downloads
All-time downloads
4.4K
Public
Repo size
52.4 GB
Likes
10
Public
Click a slice to open those files.
.bin26.2 GB · 100%
From the Hugging Face model README
ChiMed-GPT is a Chinese medical large language model (LLM) built by continually training Ziya-v2 on Chinese medical data, where pre-training, supervised fine-tuning (SFT), and reinforcement learning from human feedback (RLHF) are comprehensively performed on it. More information about the model is coming soon.
If you use or extend our work, please cite the following paper:
@article{USTC-ChiMed-GPT,
title="{ChiMed-GPT: A Chinese Medical Large Language Model with Full Training Regime and Better Alignment to Human Preferences}",
author={Yuanhe Tian, Ruyi Gan, Yan Song, Jiaxing Zhang, Yongdong Zhang},
journal={arXiv preprint arXiv:2311.06025},
year={2023},
}
from transformers import AutoTokenizer
from transformers import LlamaForCausalLM
import torch
query="[human]:感冒怎么处理?\n[bot]:"
model = LlamaForCausalLM.from_pretrained('SYNLP/ChiMed-GPT-1.0', torch_dtype=torch.float16, device_map="auto").eval()
tokenizer = AutoTokenizer.from_pretrained(ckpt)
input_ids = tokenizer(query, return_tensors="pt").input_ids.to('cuda:0')
generate_ids = model.generate(
input_ids,
max_new_tokens=512,
do_sample = True,
top_p = 0.9)
output = tokenizer.batch_decode(generate_ids)[0]
print(output)
Please note that the content generated by ChiMed-GPT, including any advice, suggestions, information, or recommendations, does not reflect our views or beliefs. The responses provided by the large language model should not be considered as endorsements, opinions, or advice from us. We do not take responsibility for the accuracy, reliability, or appropriateness of the information provided. Users should exercise their own judgment and discretion when interpreting and using the information generated by the large language model.