yuxianglai117 commited on
Commit
9a087aa
·
verified ·
1 Parent(s): c666f6c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md CHANGED
@@ -21,4 +21,20 @@ Med-R1 is a reinforcement learning (RL)-enhanced vision-language model (VLM) des
21
  - **Cross-Task Learning**: We provide checkpoints trained separately on the following tasks:
22
  - **Anatomy Identification**, **Disease Diagnosis**, **Lesion Grading**, **Modality Recognition**, and **Biological Attribute Analysis**.
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  ## Citation
 
21
  - **Cross-Task Learning**: We provide checkpoints trained separately on the following tasks:
22
  - **Anatomy Identification**, **Disease Diagnosis**, **Lesion Grading**, **Modality Recognition**, and **Biological Attribute Analysis**.
23
 
24
+ ## Use of Models
25
+ ```
26
+ from transformers import Qwen2VLForConditionalGeneration, AutoProcessor
27
+
28
+ MODEL_PATH = "yuxianglai117/Med-R1"
29
+
30
+ model = Qwen2VLForConditionalGeneration.from_pretrained(
31
+ MODEL_PATH,
32
+ torch_dtype=torch.bfloat16,
33
+ attn_implementation="flash_attention_2",
34
+ device_map="auto",
35
+ )
36
+
37
+ processor = AutoProcessor.from_pretrained(MODEL_PATH)
38
+ ```
39
+
40
  ## Citation