Update README.md
Browse files
README.md
CHANGED
@@ -14,9 +14,7 @@ library_name: transformers
|
|
14 |
---
|
15 |
# Model Card for Model ID
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
This modelcard aims to be a base template for new models. It has been generated using [this raw template](https://github.com/huggingface/huggingface_hub/blob/main/src/huggingface_hub/templates/modelcard_template.md?plain=1).
|
20 |
|
21 |
## Model Details
|
22 |
|
@@ -26,59 +24,33 @@ This modelcard aims to be a base template for new models. It has been generated
|
|
26 |
|
27 |
|
28 |
|
29 |
-
- **Developed by:** [
|
30 |
-
- **
|
31 |
-
- **
|
32 |
-
- **
|
33 |
-
- **
|
34 |
-
- **License:** [More Information Needed]
|
35 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
36 |
-
|
37 |
-
### Model Sources [optional]
|
38 |
-
|
39 |
-
<!-- Provide the basic links for the model. -->
|
40 |
-
|
41 |
-
- **Repository:** [More Information Needed]
|
42 |
-
- **Paper [optional]:** [More Information Needed]
|
43 |
-
- **Demo [optional]:** [More Information Needed]
|
44 |
-
|
45 |
-
## Uses
|
46 |
-
|
47 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
48 |
-
|
49 |
-
### Direct Use
|
50 |
-
|
51 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
52 |
-
|
53 |
-
[More Information Needed]
|
54 |
-
|
55 |
-
### Downstream Use [optional]
|
56 |
-
|
57 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
58 |
-
|
59 |
-
[More Information Needed]
|
60 |
-
|
61 |
-
### Out-of-Scope Use
|
62 |
|
63 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
64 |
|
65 |
-
[More Information Needed]
|
66 |
-
|
67 |
-
## Bias, Risks, and Limitations
|
68 |
-
|
69 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
70 |
-
|
71 |
-
[More Information Needed]
|
72 |
|
73 |
-
|
74 |
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
-
|
|
|
|
|
78 |
|
79 |
-
|
80 |
|
81 |
-
|
|
|
|
|
82 |
|
83 |
[More Information Needed]
|
84 |
|
@@ -86,123 +58,61 @@ Use the code below to get started with the model.
|
|
86 |
|
87 |
### Training Data
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
[More Information Needed]
|
92 |
-
|
93 |
-
### Training Procedure
|
94 |
-
|
95 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
96 |
|
97 |
#### Preprocessing [optional]
|
98 |
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
105 |
-
|
106 |
-
#### Speeds, Sizes, Times [optional]
|
107 |
-
|
108 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
109 |
-
|
110 |
-
[More Information Needed]
|
111 |
-
|
112 |
-
## Evaluation
|
113 |
|
114 |
-
|
|
|
|
|
115 |
|
116 |
-
###
|
|
|
117 |
|
118 |
-
|
|
|
|
|
|
|
|
|
119 |
|
120 |
-
|
121 |
|
122 |
-
[More Information Needed]
|
123 |
|
124 |
-
#### Factors
|
125 |
|
126 |
-
|
127 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
[More Information Needed]
|
129 |
|
130 |
-
#### Metrics
|
131 |
|
132 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
133 |
-
|
134 |
-
[More Information Needed]
|
135 |
|
136 |
-
### Results
|
137 |
-
|
138 |
-
[More Information Needed]
|
139 |
|
140 |
#### Summary
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
## Model Examination [optional]
|
145 |
-
|
146 |
-
<!-- Relevant interpretability work for the model goes here -->
|
147 |
-
|
148 |
-
[More Information Needed]
|
149 |
-
|
150 |
-
## Environmental Impact
|
151 |
-
|
152 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
153 |
-
|
154 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
155 |
-
|
156 |
-
- **Hardware Type:** [More Information Needed]
|
157 |
-
- **Hours used:** [More Information Needed]
|
158 |
-
- **Cloud Provider:** [More Information Needed]
|
159 |
-
- **Compute Region:** [More Information Needed]
|
160 |
-
- **Carbon Emitted:** [More Information Needed]
|
161 |
-
|
162 |
-
## Technical Specifications [optional]
|
163 |
-
|
164 |
-
### Model Architecture and Objective
|
165 |
-
|
166 |
-
[More Information Needed]
|
167 |
-
|
168 |
-
### Compute Infrastructure
|
169 |
-
|
170 |
-
[More Information Needed]
|
171 |
|
172 |
#### Hardware
|
173 |
|
174 |
-
|
175 |
-
|
176 |
-
#### Software
|
177 |
-
|
178 |
-
[More Information Needed]
|
179 |
-
|
180 |
-
## Citation [optional]
|
181 |
-
|
182 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
183 |
-
|
184 |
-
**BibTeX:**
|
185 |
-
|
186 |
-
[More Information Needed]
|
187 |
-
|
188 |
-
**APA:**
|
189 |
-
|
190 |
-
[More Information Needed]
|
191 |
-
|
192 |
-
## Glossary [optional]
|
193 |
-
|
194 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
195 |
-
|
196 |
-
[More Information Needed]
|
197 |
-
|
198 |
-
## More Information [optional]
|
199 |
-
|
200 |
-
[More Information Needed]
|
201 |
|
202 |
## Model Card Authors [optional]
|
203 |
|
204 |
-
|
205 |
|
206 |
## Model Card Contact
|
207 |
|
208 |
-
[
|
|
|
14 |
---
|
15 |
# Model Card for Model ID
|
16 |
|
17 |
+
Medical reasoning llm
|
|
|
|
|
18 |
|
19 |
## Model Details
|
20 |
|
|
|
24 |
|
25 |
|
26 |
|
27 |
+
- **Developed by:** [Melody Zhao](https://github.com/Melody-coder923)
|
28 |
+
- **Model type:** LLM
|
29 |
+
- **Language(s) (NLP):** English
|
30 |
+
- **License:** Mit
|
31 |
+
- **Finetuned from model [optional]:** unsloth/DeepSeek-R1-Distill-Llama-8B
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
|
|
33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
## How to Get Started with the Model
|
36 |
|
37 |
+
```
|
38 |
+
question = """A patient with acute appendicitis has been
|
39 |
+
ill for 5 days, with slightly relieved abdominal pain
|
40 |
+
but still feverish.
|
41 |
+
A tender mass was found in the lower right abdomen
|
42 |
+
during a physical examination. How should this be handled at this point?
|
43 |
+
"""
|
44 |
|
45 |
+
FastLanguageModel.for_inference(model) # Unsloth has 2x faster inference!
|
46 |
+
inputs = tokenizer([prompt_style.format(question, "")],
|
47 |
+
return_tensors="pt").to("cuda")
|
48 |
|
49 |
+
from transformers import TextStreamer
|
50 |
|
51 |
+
text_streamer = TextStreamer(tokenizer)
|
52 |
+
_ = model.generate(**inputs, streamer=text_streamer, max_new_tokens=2048)
|
53 |
+
```python
|
54 |
|
55 |
[More Information Needed]
|
56 |
|
|
|
58 |
|
59 |
### Training Data
|
60 |
|
61 |
+
[FreedomIntelligence/medical-o1-reasoning-SFT](https://huggingface.co/datasets/FreedomIntelligence/medical-o1-reasoning-SFT)
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
|
63 |
#### Preprocessing [optional]
|
64 |
|
65 |
+
```
|
66 |
+
train_prompt_style = """Below is an instruction that describes a task, paired with an input that provides further context.
|
67 |
+
Write a response that appropriately completes the request.
|
68 |
+
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
69 |
|
70 |
+
### Instruction:
|
71 |
+
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.
|
72 |
+
Please answer the following medical question.
|
73 |
|
74 |
+
### Question:
|
75 |
+
{}
|
76 |
|
77 |
+
### Response:
|
78 |
+
<think>
|
79 |
+
{}
|
80 |
+
</think>
|
81 |
+
{}"""
|
82 |
|
83 |
+
```python
|
84 |
|
|
|
85 |
|
|
|
86 |
|
87 |
+
#### Training Hyperparameters
|
88 |
|
89 |
+
- **Training regime:**
|
90 |
+
- fp16
|
91 |
+
- optim="adamw_8bit",
|
92 |
+
- weight_decay=0.01,
|
93 |
+
- lr_scheduler_type="linear",
|
94 |
+
- per_device_train_batch_size=2,
|
95 |
+
- gradient_accumulation_steps=4,
|
96 |
+
- warmup_steps=5,
|
97 |
+
- max_steps=60,
|
98 |
+
- learning_rate=1e-4,
|
99 |
+
|
100 |
[More Information Needed]
|
101 |
|
|
|
102 |
|
|
|
|
|
|
|
103 |
|
|
|
|
|
|
|
104 |
|
105 |
#### Summary
|
106 |
+
This is fine tuned model on Medical dataset with Deepseek llama 3-8b distill
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
|
108 |
#### Hardware
|
109 |
|
110 |
+
nvidia L4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
## Model Card Authors [optional]
|
113 |
|
114 |
+
Melody Zhao
|
115 |
|
116 |
## Model Card Contact
|
117 |
|
118 |
+
[Github](https://github.com/Melody-coder923)
|