← Back to Projects
Medical LLM Reasoning
Fine-tuned Meta‑Llama‑3.1‑8B‑Instruct on a medical QA dataset using LoRA and 8‑bit quantization.
Pytorch
LoRA
Fine-tune
Hugging Face
Overview
This is a LoRA adapter that fine-tunes meta-llama/Meta-Llama-3.1-8B-Instruct for clinical question answering. The adapter encourages explicit chain-of-thought reasoning so the model walks through diagnostic steps before giving a final answer.
Intended Use & Limitations
Designed for educational or research explorations of medical reasoning with large language models.Not suitable for real clinical decision making without expert oversight.
Outputs may include hallucinated facts, outdated guidelines, or unsafe treatment suggestions.
Always consult licensed medical professionals before acting on any response.
Model Details
-
Base model: Meta-Llama-3.1-8B-Instruct.
-
Adapter type: PEFT LoRA (r=16, alpha=16, dropout=0.0)
-
Precision: Base weights loaded in 8-bit via BitsAndBytes during training.
-
Training data: FreedomIntelligence/medical-o1-reasoning-SFT (English split with Question, Complex_CoT, Response fields).
- Context window used in training: 2,048 tokens.
Prompt Format
Training used the following template:##
Please provide an appropriate response based on the instruction and the specific question given below.
Before answering, please think carefully about the question and demonstrate a step-by-step reasoning process to ensure the logic and accuracy of your response.
### Instruction:
You are a medical expert proficient in clinical reasoning, diagnosis, and treatment planning.
Please answer the medical question below.
### Question:
{Question}
### Answer:
{Complex_CoT}
{Response}
##
You can follow the same structure or adapt it to your use case. The
<think> tags are optional but help separate the reasoning trace from the final answer.