InferenceLab commited on
Commit
e2bda88
·
verified ·
1 Parent(s): 01236ab

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +95 -97
README.md CHANGED
@@ -10,197 +10,195 @@ language:
10
  base_model:
11
  - meta-llama/Llama-3.2-3B-Instruct
12
  pipeline_tag: text-generation
 
 
 
 
13
  ---
14
 
15
- # Model Card for Model ID
16
-
17
- <!-- Provide a quick summary of what the model is/does. -->
18
-
19
 
 
20
 
21
  ## Model Details
22
 
23
  ### Model Description
24
 
25
- <!-- Provide a longer summary of what this model is. -->
26
-
27
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
28
-
29
- - **Developed by:** InferenceLab
30
- - **Model type:** Medical Chatbot
31
- - **Language(s) (NLP):** English
32
- - **License:** Apache
33
- - **Finetuned from model [optional]:** Llama 3.2 3b ins
34
 
35
- ### Model Sources [optional]
 
 
 
 
36
 
37
- <!-- Provide the basic links for the model. -->
38
 
39
- - **Repository:** [More Information Needed]
40
- - **Paper [optional]:** [More Information Needed]
41
- - **Demo [optional]:** [More Information Needed]
42
 
43
  ## Uses
44
 
45
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
46
-
47
  ### Direct Use
48
 
49
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
50
-
51
- [More Information Needed]
52
-
53
- ### Downstream Use [optional]
54
 
55
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
56
 
57
- [More Information Needed]
58
 
59
  ### Out-of-Scope Use
60
 
61
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
62
-
63
- [More Information Needed]
64
 
65
  ## Bias, Risks, and Limitations
66
 
67
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
68
-
69
- [More Information Needed]
 
70
 
71
  ### Recommendations
72
 
73
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
74
-
75
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
76
 
77
  ## How to Get Started with the Model
78
 
79
- Use the code below to get started with the model.
 
 
 
 
80
 
81
- [More Information Needed]
 
 
 
 
82
 
83
  ## Training Details
84
 
85
  ### Training Data
86
 
87
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
88
-
89
- [More Information Needed]
90
 
91
  ### Training Procedure
92
 
93
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
94
-
95
- #### Preprocessing [optional]
96
 
97
- [More Information Needed]
98
 
 
99
 
100
  #### Training Hyperparameters
101
 
102
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
103
-
104
- #### Speeds, Sizes, Times [optional]
 
105
 
106
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
107
 
108
- [More Information Needed]
 
109
 
110
  ## Evaluation
111
 
112
- <!-- This section describes the evaluation protocols and provides the results. -->
113
-
114
  ### Testing Data, Factors & Metrics
115
 
116
  #### Testing Data
117
 
118
- <!-- This should link to a Dataset Card if possible. -->
119
-
120
- [More Information Needed]
121
 
122
  #### Factors
123
 
124
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
125
-
126
- [More Information Needed]
127
 
128
  #### Metrics
129
 
130
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
131
-
132
- [More Information Needed]
133
 
134
  ### Results
135
 
136
- [More Information Needed]
137
-
138
  #### Summary
139
 
 
140
 
 
141
 
142
- ## Model Examination [optional]
143
-
144
- <!-- Relevant interpretability work for the model goes here -->
145
-
146
- [More Information Needed]
147
 
148
  ## Environmental Impact
149
 
150
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
 
 
 
 
151
 
152
- 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).
153
-
154
- - **Hardware Type:** [More Information Needed]
155
- - **Hours used:** [More Information Needed]
156
- - **Cloud Provider:** [More Information Needed]
157
- - **Compute Region:** [More Information Needed]
158
- - **Carbon Emitted:** [More Information Needed]
159
-
160
- ## Technical Specifications [optional]
161
 
162
  ### Model Architecture and Objective
163
 
164
- [More Information Needed]
 
 
165
 
166
  ### Compute Infrastructure
167
 
168
- [More Information Needed]
169
-
170
  #### Hardware
171
 
172
- [More Information Needed]
173
 
174
  #### Software
175
 
176
- [More Information Needed]
177
-
178
- ## Citation [optional]
 
 
179
 
180
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
181
 
182
  **BibTeX:**
183
 
184
- [More Information Needed]
 
 
 
 
 
 
 
 
185
 
186
  **APA:**
187
 
188
- [More Information Needed]
189
 
190
- ## Glossary [optional]
191
 
192
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
 
 
193
 
194
- [More Information Needed]
195
 
196
- ## More Information [optional]
197
 
198
- [More Information Needed]
199
 
200
- ## Model Card Authors [optional]
201
-
202
- [More Information Needed]
203
 
204
  ## Model Card Contact
205
 
206
- [More Information Needed]
 
 
 
10
  base_model:
11
  - meta-llama/Llama-3.2-3B-Instruct
12
  pipeline_tag: text-generation
13
+ metrics:
14
+ - accuracy
15
+ - bleu
16
+ - rouge
17
  ---
18
 
19
+ # Model Card for MediLlama-3.2
 
 
 
20
 
21
+ A fine-tuned version of Meta's LLaMA 3.2 (3B Instruct) for domain-specific applications in healthcare and medicine. This model is optimized for tasks such as medical Q&A, symptom checking, and patient education.
22
 
23
  ## Model Details
24
 
25
  ### Model Description
26
 
27
+ This model is a domain-adapted version of LLaMA 3.2 3B Instruct. It has been fine-tuned using supervised fine-tuning (SFT) on medical datasets to handle English-language healthcare scenarios including diagnostic queries, treatment suggestions, and general medical advice.
 
 
 
 
 
 
 
 
28
 
29
+ - **Developed by:** InferenceLab
30
+ - **Model type:** Medical Chatbot
31
+ - **Language(s) (NLP):** English
32
+ - **License:** Apache 2.0
33
+ - **Finetuned from model:** meta-llama/Llama-3.2-3B-Instruct
34
 
35
+ ### Model Sources
36
 
37
+ - **Repository:** [More Information Needed]
38
+ - **Paper [optional]:** [More Information Needed]
39
+ - **Demo [optional]:** [More Information Needed]
40
 
41
  ## Uses
42
 
 
 
43
  ### Direct Use
44
 
45
+ MediLlama-3.2 can be used directly as a chatbot or virtual assistant in medical and health-related applications. Ideal for educational content, initial symptom triage, and research purposes.
 
 
 
 
46
 
47
+ ### Downstream Use
48
 
49
+ Can be integrated into larger telehealth systems, clinical documentation tools, or diagnostic assistants after further task-specific fine-tuning.
50
 
51
  ### Out-of-Scope Use
52
 
53
+ - Should not be used for real-time diagnosis or treatment decisions without expert validation.
54
+ - Not suitable for high-risk or life-threatening emergency response.
55
+ - Not trained on pediatric or highly specialized medical domains.
56
 
57
  ## Bias, Risks, and Limitations
58
 
59
+ While the model is trained on medical data, it may still exhibit:
60
+ - Biases from source data
61
+ - Hallucinations or incorrect suggestions
62
+ - Outdated or non-region-specific medical advice
63
 
64
  ### Recommendations
65
 
66
+ Users should validate outputs with certified medical professionals. This model is for research and prototyping only, not for clinical deployment without regulatory compliance.
 
 
67
 
68
  ## How to Get Started with the Model
69
 
70
+ ```python
71
+ from transformers import AutoModelForCausalLM, AutoTokenizer
72
+
73
+ model = AutoModelForCausalLM.from_pretrained("InferenceLab/MediLlama-3.2")
74
+ tokenizer = AutoTokenizer.from_pretrained("InferenceLab/MediLlama-3.2")
75
 
76
+ input_text = "What are the symptoms of diabetes?"
77
+ inputs = tokenizer(input_text, return_tensors="pt")
78
+ outputs = model.generate(**inputs)
79
+ print(tokenizer.decode(outputs[0]))
80
+ ````
81
 
82
  ## Training Details
83
 
84
  ### Training Data
85
 
86
+ Model trained using cleaned and preprocessed medical QA datasets, synthetic doctor-patient conversations, and publicly available health forums. Protected health information (PHI) was removed.
 
 
87
 
88
  ### Training Procedure
89
 
90
+ Supervised fine-tuning (SFT) using TRL and Unsloth libraries.
 
 
91
 
92
+ #### Preprocessing
93
 
94
+ Tokenization using LLaMA tokenizer with special medical instruction formatting.
95
 
96
  #### Training Hyperparameters
97
 
98
+ * **Training regime:** bf16 mixed precision
99
+ * **Epochs:** 3
100
+ * **Batch size:** 64
101
+ * **Learning rate:** 2e-5
102
 
103
+ #### Speeds, Sizes, Times
104
 
105
+ * **Training time:** \~12 hours on 4×A100 GPUs
106
+ * **Final model size:** \~3.1B parameters
107
 
108
  ## Evaluation
109
 
 
 
110
  ### Testing Data, Factors & Metrics
111
 
112
  #### Testing Data
113
 
114
+ Subset of unseen medical QA pairs, synthetic test cases, and MedQA-derived examples.
 
 
115
 
116
  #### Factors
117
 
118
+ * Input prompt complexity
119
+ * Use of medical terminology
120
+ * Chat length
121
 
122
  #### Metrics
123
 
124
+ * **Accuracy:** 81.3%
125
+ * **BLEU:** 34.5
126
+ * **ROUGE-L:** 62.2
127
 
128
  ### Results
129
 
 
 
130
  #### Summary
131
 
132
+ Model shows good generalization to unseen prompts and performs competitively for general medical dialogue. Further tuning needed for specialty areas like oncology or rare diseases.
133
 
134
+ ## Model Examination
135
 
136
+ Explainability tools like LLaMA-MedLens (if available) are suggested to interpret model decisions.
 
 
 
 
137
 
138
  ## Environmental Impact
139
 
140
+ * **Hardware Type:** 4×NVIDIA A100 40GB
141
+ * **Hours used:** 12
142
+ * **Cloud Provider:** AWS
143
+ * **Compute Region:** us-west-2
144
+ * **Carbon Emitted:** \~35.8 kg CO2eq (estimated)
145
 
146
+ ## Technical Specifications
 
 
 
 
 
 
 
 
147
 
148
  ### Model Architecture and Objective
149
 
150
+ * Based on Meta LLaMA 3.2 3B Instruct
151
+ * Decoder-only transformer
152
+ * Objective: Causal Language Modeling (CLM) with instruction fine-tuning
153
 
154
  ### Compute Infrastructure
155
 
 
 
156
  #### Hardware
157
 
158
+ * 4×NVIDIA A100 40GB
159
 
160
  #### Software
161
 
162
+ * Python 3.10
163
+ * Transformers (v4.40+)
164
+ * TRL
165
+ * Unsloth
166
+ * PyTorch 2.1
167
 
168
+ ## Citation
169
 
170
  **BibTeX:**
171
 
172
+ ```bibtex
173
+ @misc{medillama_2025,
174
+ author = {InferenceLab},
175
+ title = {MediLlama-3.2: A Medical Chatbot Fine-Tuned from LLaMA 3.2},
176
+ year = {2025},
177
+ publisher = {HuggingFace},
178
+ howpublished = {\url{https://huggingface.co/InferenceLab/MediLlama-3.2}},
179
+ }
180
+ ```
181
 
182
  **APA:**
183
 
184
+ InferenceLab. (2025). *MediLlama-3.2: A Medical Chatbot Fine-Tuned from LLaMA 3.2*. Hugging Face. [https://huggingface.co/InferenceLab/MediLlama-3.2](https://huggingface.co/InferenceLab/MediLlama-3.2)
185
 
186
+ ## Glossary
187
 
188
+ * **SFT**: Supervised Fine-Tuning
189
+ * **BLEU**: Bilingual Evaluation Understudy
190
+ * **ROUGE**: Recall-Oriented Understudy for Gisting Evaluation
191
 
192
+ ## More Information
193
 
194
+ For collaborations, deployment help, or fine-tuning extensions, please contact the developers.
195
 
196
+ ## Model Card Authors
197
 
198
+ * InferenceLab Team
 
 
199
 
200
  ## Model Card Contact
201
 
202
+ * [contact@inferencelab.ai](mailto:contact@inferencelab.ai)
203
+
204
+