🚀 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},
}