Add library name and link to paper page
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
language:
|
| 4 |
- en
|
| 5 |
-
|
| 6 |
-
- FreedomIntelligence/HuatuoGPT-o1-8B
|
| 7 |
pipeline_tag: text-generation
|
|
|
|
| 8 |
tags:
|
| 9 |
- medical
|
| 10 |
- medical-reasoning
|
|
@@ -20,7 +21,7 @@ tags:
|
|
| 20 |
</div>
|
| 21 |
|
| 22 |
<div align="center">
|
| 23 |
-
<a href="https://github.com/TianYin123/Med-REFL" target="_blank">GitHub</a> | <a href="https://
|
| 24 |
</div>
|
| 25 |
|
| 26 |
# <span>Introduction</span>
|
|
@@ -38,7 +39,7 @@ The Med-REFL LoRA weights can be applied to the following base models to enhance
|
|
| 38 |
| :--- | :--- | :--- |
|
| 39 |
| **Med-REFL for Llama-3.1-8B** | Llama-3.1-8B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-Llama-3.1-8B-lora) |
|
| 40 |
| **Med-REFL for Qwen2.5-7B** | Qwen2.5-7B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-Qwen2.5-7B-lora) |
|
| 41 |
-
| **Med-REFL for Huatuo-o1-8B** | Huatuo-o1-
|
| 42 |
| **Med-REFL for MedReason-8B**| MedReason-8B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-MedReason-8B-lora) |
|
| 43 |
|
| 44 |
# <span>Usage</span>
|
|
@@ -67,8 +68,17 @@ base_model = AutoModelForCausalLM.from_pretrained(
|
|
| 67 |
model = PeftModel.from_pretrained(base_model, lora_path)
|
| 68 |
|
| 69 |
# Prepare the prompt
|
| 70 |
-
system_prompt = '''You are a helpful medical expert specializing in USMLE exam questions, and your task is to answer a multi-choice medical question. Please first think step-by-step and then choose the answer from the provided options. Your responses will be used for research purposes only, so please have a definite answer
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
messages = [
|
| 74 |
{"role": "system", "content": system_prompt},
|
|
@@ -102,4 +112,7 @@ print(tokenizer.decode(response, skip_special_tokens=True))
|
|
| 102 |
If you use these weights or the Med-REFL framework in your research, please cite our paper:
|
| 103 |
```
|
| 104 |
|
| 105 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
base_model:
|
| 3 |
+
- FreedomIntelligence/HuatuoGPT-o1-8B
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
+
license: apache-2.0
|
|
|
|
| 7 |
pipeline_tag: text-generation
|
| 8 |
+
library_name: transformers
|
| 9 |
tags:
|
| 10 |
- medical
|
| 11 |
- medical-reasoning
|
|
|
|
| 21 |
</div>
|
| 22 |
|
| 23 |
<div align="center">
|
| 24 |
+
<a href="https://github.com/TianYin123/Med-REFL" target="_blank">GitHub</a> | <a href="https://huggingface.co/papers/2506.13793" target="_blank">Paper</a>
|
| 25 |
</div>
|
| 26 |
|
| 27 |
# <span>Introduction</span>
|
|
|
|
| 39 |
| :--- | :--- | :--- |
|
| 40 |
| **Med-REFL for Llama-3.1-8B** | Llama-3.1-8B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-Llama-3.1-8B-lora) |
|
| 41 |
| **Med-REFL for Qwen2.5-7B** | Qwen2.5-7B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-Qwen2.5-7B-lora) |
|
| 42 |
+
| **Med-REFL for Huatuo-o1-8B** | Huatuo-o1-8B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-Huatuo-o1-8B-lora) |
|
| 43 |
| **Med-REFL for MedReason-8B**| MedReason-8B | [HF Link](https://huggingface.co/HANI-LAB/Med-REFL-MedReason-8B-lora) |
|
| 44 |
|
| 45 |
# <span>Usage</span>
|
|
|
|
| 68 |
model = PeftModel.from_pretrained(base_model, lora_path)
|
| 69 |
|
| 70 |
# Prepare the prompt
|
| 71 |
+
system_prompt = '''You are a helpful medical expert specializing in USMLE exam questions, and your task is to answer a multi-choice medical question. Please first think step-by-step and then choose the answer from the provided options. Your responses will be used for research purposes only, so please have a definite answer.
|
| 72 |
+
Provide your response in the following JSON format:
|
| 73 |
+
{"reason": "Step-by-step explanation of your thought process","answer": "Chosen answer from the given options"}
|
| 74 |
+
'''
|
| 75 |
+
user_prompt = "A 67-year-old man with transitional cell carcinoma of the bladder comes to the physician because of a 2-day history of ringing sensation in his ear. He received this first course of neoadjuvant chemotherapy 1 week ago. Pure tone audiometry shows a sensorineural hearing loss of 45 dB. The expected beneficial effect of the drug that caused this patient's symptoms is most likely due to which of the following actions?
|
| 76 |
+
Options:
|
| 77 |
+
A: Inhibition of thymidine synthesis
|
| 78 |
+
B: Inhibition of proteasome
|
| 79 |
+
C: Hyperstabilization of microtubules
|
| 80 |
+
D: Generation of free radicals
|
| 81 |
+
E: Cross-linking of DNA"
|
| 82 |
|
| 83 |
messages = [
|
| 84 |
{"role": "system", "content": system_prompt},
|
|
|
|
| 112 |
If you use these weights or the Med-REFL framework in your research, please cite our paper:
|
| 113 |
```
|
| 114 |
|
| 115 |
+
```
|
| 116 |
+
## Star History
|
| 117 |
+
|
| 118 |
+
[](https://www.star-history.com/#TianYin123/Med-REFL&Date)
|