che111 commited on
Commit
f7785a6
·
verified ·
1 Parent(s): 2de3b84

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +39 -3
README.md CHANGED
@@ -1,3 +1,39 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ ---
4
+
5
+ # 🧠 AlphaMed
6
+
7
+ This is the official model checkpoint for the paper:
8
+ **[AlphaMed: Incentivizing Medical Reasoning with Reinforcement Learning Only](https://www.arxiv.org/abs/2505.17952)**
9
+ AlphaMed is a medical large language model trained **without supervised fine-tuning or chain-of-thought (CoT) data**, relying solely on reinforcement learning to elicit step-by-step reasoning in complex medical tasks.
10
+
11
+ ## 🚀 Usage
12
+
13
+ To use the model, format your input prompt as:
14
+
15
+ > **Question:** [your medical question here]
16
+ > **Please reason step by step, and put the final answer in \boxed{}**
17
+
18
+ ### 🔬 Example
19
+
20
+ ```python
21
+ from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
22
+
23
+ # Load model and tokenizer
24
+ model_id = "your-hf-username/med-r1-zero" # Replace with actual repo path
25
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
26
+ model = AutoModelForCausalLM.from_pretrained(model_id)
27
+
28
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
29
+
30
+ # Format question
31
+ prompt = (
32
+ "Question: A 45-year-old patient presents with chest pain radiating to the left arm and elevated troponin levels. "
33
+ "What is the most likely diagnosis?\n"
34
+ "Please reason step by step, and put the final answer in \\boxed{}"
35
+ )
36
+
37
+ # Generate output
38
+ output = pipe(prompt, max_new_tokens=256, do_sample=False)[0]["generated_text"]
39
+ print(output)