🚀 Diabetica-7B
Diabetica:適配大語言模型以增強糖尿病護理和管理中的多項醫療任務
🚀 快速開始
本項目是關於 Diabetica 的Hugging Face倉庫。我們的研究引入了一個可復現的框架,用於開發能夠處理各種糖尿病任務的專業大語言模型。
項目鏈接如下:
✨ 主要特性
本項目有以下三個關鍵貢獻:
- 高性能特定領域模型:與之前的通用大語言模型相比,我們的模型 Diabetica 在廣泛的糖尿病相關任務中表現出卓越的性能,包括診斷、治療建議、藥物管理、生活方式建議、患者教育等。
- 可復現的框架:我們提供了一種詳細的方法,使用開源模型、精心策劃的特定疾病數據集和微調技術來創建專業的醫療大語言模型。這種方法可以應用於其他醫療領域,有可能加速人工智能輔助醫療的發展。
- 全面評估:我們設計了全面的基準測試並進行了臨床試驗,以驗證模型在臨床應用中的有效性。這確保了我們模型的實際實用性,併為評估糖尿病護理中的人工智能工具設定了新的標準。
更多詳細信息請參考我們的 GitHub 倉庫。
📦 安裝指南
文檔未提及安裝步驟,暫不提供。
💻 使用示例
基礎用法
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
device = "cuda"
model_path = 'WaltonFuture/Diabetica-7B'
model = AutoModelForCausalLM.from_pretrained(
model_path,
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_path)
def model_output(content):
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": content}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=2048,
do_sample=True,
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
return response
prompt = "Hello! Please tell me something about diabetes."
response = model_output(prompt)
print(response)
📚 詳細文檔
文檔未提及詳細說明,暫不提供。
🔧 技術細節
文檔未提及技術實現細節,暫不提供。
📄 許可證
本項目採用 MIT 許可證。
📄 引用
@article{wei2024adapted,
title={An adapted large language model facilitates multiple medical tasks in diabetes care},
author={Wei, Lai and Ying, Zhen and He, Muyang and Chen, Yutong and Yang, Qian and Hong, Yanzhe and Lu, Jiaping and Li, Xiaoying and Huang, Weiran and Chen, Ying},
journal={arXiv preprint arXiv:2409.13191},
year={2024}
}
信息表格
屬性 |
詳情 |
庫名稱 |
transformers |
任務類型 |
文本生成 |
許可證 |
MIT |
基礎模型 |
Qwen/Qwen2-7B-Instruct |
標籤 |
medical |
數據集 |
WaltonFuture/Diabetica-SFT |