Update README.md
Browse files
README.md
CHANGED
@@ -1,112 +1,122 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: gemma
|
3 |
+
datasets:
|
4 |
+
- GBaker/MedQA-USMLE-4-options-hf
|
5 |
+
base_model:
|
6 |
+
- google/gemma-3-12b-it
|
7 |
+
library_name: transformers
|
8 |
+
tags:
|
9 |
+
- biology
|
10 |
+
- medical
|
11 |
+
---
|
12 |
+
# Gemma-3-12B-GRPO trained with GRPO via LoRA
|
13 |
+
|
14 |
+
Due to limited available computational resources, we randomly sampled 500 data points from MedQA-USMLE using a methodology and conducted preliminary GRPO experiments with LoRA using the [Unsloth](https://github.com/unslothai/unsloth) framework. We are now releasing this as a preview version. More experiments and explorations are currently underway, and a technical report is in preparation. Thank you for your patience. We conduct the experiments on one RTX-A6000 Ada (48GB VRAM).
|
15 |
+
|
16 |
+
## Evaluation Results
|
17 |
+
|
18 |
+
The model is evaluated on four benchmark datasets: MMLU, MMLU-Pro, CMMU, GSM8K, GPQA. The experimental results are summarized in Table 1, with comprehensive analyses provided in the Detailed Results section.
|
19 |
+
|
20 |
+
<center><strong>Tab.1 Evaluation results.</strong></center>
|
21 |
+
|
22 |
+
| Dataset | Gemma-3-12b-it | Gemma3-12b-GRPO |
|
23 |
+
| :-----: | :------------: | :-------------: |
|
24 |
+
| MMLU | 65.51 | 70.13 |
|
25 |
+
| MMLU-Pro | 60.17 | 59.99 |
|
26 |
+
| CMMLU | 54.81 | 57.07 |
|
27 |
+
| GSM8K | 91.58 | 91.81 |
|
28 |
+
| GPQA | 34.98 | 34.23 |
|
29 |
+
|
30 |
+
## Requirements
|
31 |
+
|
32 |
+
```shell
|
33 |
+
pip install torch==2.6.0 torchaudio==2.6.0 torchvision==0.21.0 -i --index-url https://download.pytorch.org/whl/cu124
|
34 |
+
pip install transformer vllm bitsandbytes peft
|
35 |
+
pip install flash-attn --no-build-isolation
|
36 |
+
```
|
37 |
+
|
38 |
+
## Run with vLLM
|
39 |
+
|
40 |
+
You can use the following script to run with vLLM.
|
41 |
+
|
42 |
+
```shell
|
43 |
+
vllm serve qiuxi337/gemma-3-12b-it-grpo \
|
44 |
+
--gpu-memory-utilization 0.85 \
|
45 |
+
--max-model-len 4096 \
|
46 |
+
--served-model-name gemma3-12b-grpo \
|
47 |
+
--api-key your_api_key
|
48 |
+
```
|
49 |
+
|
50 |
+
## Detail Results
|
51 |
+
|
52 |
+
### MMLU
|
53 |
+
|
54 |
+

|
55 |
+
|
56 |
+
**Fig.1 The results on the MMLU benchmark.**
|
57 |
+
|
58 |
+

|
59 |
+
|
60 |
+
**Fig.2 The results on the MMLU-Humanities**
|
61 |
+
|
62 |
+

|
63 |
+
|
64 |
+
**Fig.3 The results on the MMLU-Social Science**
|
65 |
+
|
66 |
+

|
67 |
+
|
68 |
+
**Fig.4 The results on the MMLU-STEM**
|
69 |
+
|
70 |
+

|
71 |
+
|
72 |
+
**Fig.5 The results on the MMLU-Other**
|
73 |
+
|
74 |
+
### MMLU-Pro
|
75 |
+
|
76 |
+

|
77 |
+
|
78 |
+
**Fig.6 The results on the MMLU-Pro**
|
79 |
+
|
80 |
+
### CMMLU
|
81 |
+
|
82 |
+

|
83 |
+
|
84 |
+
**Fig.7 The results on the CMMLU benchmark.**
|
85 |
+
|
86 |
+

|
87 |
+
|
88 |
+
**Fig.8 The results on the CMMLU-Humanities**
|
89 |
+
|
90 |
+

|
91 |
+
|
92 |
+
**Fig.9 The results on the CMMLU-Social Science**
|
93 |
+
|
94 |
+

|
95 |
+
|
96 |
+
**Fig.10 The results on the CMMLU-STEM**
|
97 |
+
|
98 |
+

|
99 |
+
|
100 |
+
**Fig.11 The results on the CMMLU-Other**
|
101 |
+
|
102 |
+

|
103 |
+
|
104 |
+
**Fig.12 The results on the CMMLU-China Specific**
|
105 |
+
|
106 |
+
## Acknowledge
|
107 |
+
|
108 |
+
[Gemma-3-12b-it](https://huggingface.co/google/gemma-3-12b-it)
|
109 |
+
|
110 |
+
[Unlsoth](https://github.com/unslothai/unsloth)
|
111 |
+
|
112 |
+
## Citation
|
113 |
+
|
114 |
+
```ini
|
115 |
+
@software{Qiu_Open-Medical-R1,
|
116 |
+
author = {Qiu, Zhongxi and Zhang, Zhang and Hu, Yan and Li, Heng and Liu, Jiang},
|
117 |
+
license = {MIT},
|
118 |
+
title = {{Open-Medical-R1}},
|
119 |
+
url = {https://github.com/Qsingle/open-medical-r1},
|
120 |
+
version = {0.1}
|
121 |
+
}
|
122 |
+
```
|