🧠 AlphaMed

This is the official model checkpoint for the paper:
AlphaMed: Incentivizing Medical Reasoning with minimalist Rule-Based RL
AlphaMed is a medical large language model trained without supervised fine-tuning on chain-of-thought (CoT) data, relying solely on reinforcement learning to elicit step-by-step reasoning in complex medical tasks.

πŸš€ Usage

To use the model, format your input prompt as:

Question: [your medical question here]
Please reason step by step, and put the final answer in \boxed{}

πŸ”¬ Example

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

# Load model and tokenizer
model_id = "che111/AlphaMed-3B-instruct-rl"  # Replace with actual repo path
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)

# Format question
prompt = (
    "Question: A 45-year-old patient presents with chest pain radiating to the left arm and elevated troponin levels. "
    "What is the most likely diagnosis?\n"
    "Please reason step by step, and put the final answer in \\boxed{}"
)

# Generate output
max_new_tokens=8196
output = pipe(prompt, max_new_tokens=max_new_tokens, do_sample=False)[0]["generated_text"]
print(output)
Downloads last month
12
Safetensors
Model size
7.62B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for che111/AlphaMed-7B-instruct-rl

Quantizations
2 models

Collection including che111/AlphaMed-7B-instruct-rl