🚀 FineMedLM-o1
FineMedLM-o1是一款專門為高級醫學推理設計的醫學大語言模型。它採用多步推理過程,在給出最終答案之前,會反覆思考並完善推理過程。
🚀 快速開始
FineMedLM-o1可按照與Llama-3.1-8B-Instruct
相同的方式使用:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("hongzhouyu/FineMedLM-o1")
tokenizer = AutoTokenizer.from_pretrained("hongzhouyu/FineMedLM-o1")
prompt = "How do the interactions between neuronal activity, gonadal hormones, and neurotrophins influence axon regeneration post-injury, and what are the potential therapeutic implications of this research? Please think step by step."
messages = [
{"role": "system", "content": "You are a helpful professional doctor."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt")
generated_ids = model.generate(
model_inputs.input_ids,
max_new_tokens=4096
)
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]
print(response)
FineMedLM-o1採用“慢思考”方式,輸出格式如下:
**Thought**
[推理過程]
**Summarization**
[輸出內容]
✨ 主要特性
FineMedLM-o1是專門為高級醫學推理設計的醫學大語言模型,它採用多步推理過程,在給出最終答案之前,會反覆思考並完善推理過程。
📚 詳細文檔
如需更多信息,請訪問我們的GitHub倉庫和論文。
📄 許可證
本項目採用MIT許可證。
📦 相關信息
屬性 |
詳情 |
基礎模型 |
meta-llama/Llama-3.1-8B、hongzhouyu/FineMedLM |
訓練數據集 |
hongzhouyu/FineMed-SFT、hongzhouyu/FineMed-DPO |
庫名稱 |
transformers |
標籤 |
medical |
📖 引用
@misc{yu2025finemedlmo1enhancingmedicalreasoning,
title={FineMedLM-o1: Enhancing the Medical Reasoning Ability of LLM from Supervised Fine-Tuning to Test-Time Training},
author={Hongzhou Yu and Tianhao Cheng and Ying Cheng and Rui Feng},
year={2025},
eprint={2501.09213},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2501.09213},
}