Abeersherif commited on
Commit
172bd30
·
verified ·
1 Parent(s): 367f002

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +76 -39
README.md CHANGED
@@ -1,58 +1,95 @@
1
  ---
2
- base_model: HuggingFaceTB/SmolLM2-135M
3
  library_name: transformers
4
- model_name: smol-medical-meadow-FT
 
 
 
 
5
  tags:
6
- - generated_from_trainer
7
- - sft
8
- - trl
9
- licence: license
 
10
  ---
11
 
12
- # Model Card for smol-medical-meadow-FT
13
 
14
- This model is a fine-tuned version of [HuggingFaceTB/SmolLM2-135M](https://huggingface.co/HuggingFaceTB/SmolLM2-135M).
15
- It has been trained using [TRL](https://github.com/huggingface/trl).
16
 
17
- ## Quick start
18
 
19
- ```python
20
- from transformers import pipeline
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
- question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
23
- generator = pipeline("text-generation", model="None", device="cuda")
24
- output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
25
- print(output["generated_text"])
26
- ```
 
 
 
 
27
 
28
- ## Training procedure
 
 
29
 
30
-
31
 
 
 
 
 
 
32
 
33
- This model was trained with SFT.
34
 
35
- ### Framework versions
 
 
 
 
 
 
36
 
37
- - TRL: 0.25.1
38
- - Transformers: 4.57.1
39
- - Pytorch: 2.8.0+cu126
40
- - Datasets: 4.4.1
41
- - Tokenizers: 0.22.1
42
 
43
- ## Citations
 
44
 
 
45
 
 
 
 
 
 
 
 
46
 
47
- Cite TRL as:
48
-
49
- ```bibtex
50
- @misc{vonwerra2022trl,
51
- title = {{TRL: Transformer Reinforcement Learning}},
52
- author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
53
- year = 2020,
54
- journal = {GitHub repository},
55
- publisher = {GitHub},
56
- howpublished = {\url{https://github.com/huggingface/trl}}
57
- }
58
- ```
 
1
  ---
 
2
  library_name: transformers
3
+ pipeline_tag: text-generation
4
+ base_model: SmolAI/SmolLM2-1.7B
5
+ license: apache-2.0
6
+ language:
7
+ - en
8
  tags:
9
+ - smolllm2
10
+ - finetuned
11
+ - medical
12
+ - homework
13
+ model_type: causal-lm
14
  ---
15
 
16
+ # Medical_Homework2 Fine-Tuned SmolLM2-1.7B for Medical Reasoning
17
 
18
+ Medical_Homework2 is a fine-tuned version of SmolAI/SmolLM2-1.7B, trained specifically on structured medical question-answer data and short reasoning tasks.
19
+ The model aims to provide concise, accurate, and educational medical explanations suitable for students and basic learning purposes.
20
 
21
+ ---
22
 
23
+ ## Model Overview
24
+
25
+ This model is optimized for medical comprehension tasks such as:
26
+ - Short medical answers
27
+ - Step-by-step reasoning
28
+ - Explanations of conditions, symptoms, and basic physiology
29
+ - Educational or homework-style responses
30
+
31
+ It is not designed for professional medical diagnosis or treatment decisions.
32
+
33
+ ---
34
+
35
+ ## Intended Use
36
+
37
+ ### Recommended Use Cases
38
+ - Medical homework and assignment assistance
39
+ - Explanation of medical concepts in simple language
40
+ - Introductory physiology and pathology topics
41
+ - Basic reasoning about medical questions
42
+
43
+ ### Not Recommended
44
+ - Real-world clinical decision-making
45
+ - Emergency or diagnostic use
46
+ - Any situation requiring professional medical judgement
47
 
48
+ ---
49
+
50
+ ## Training Data
51
+
52
+ The model was fine-tuned using:
53
+ - Synthetic medical question-answer pairs
54
+ - Simplified educational medical explanations
55
+ - Instruction-answer examples
56
+ - Homework-style reasoning data
57
 
58
+ No real patient data or clinical records were used.
59
+
60
+ ---
61
 
62
+ ## Training Details
63
 
64
+ - Base model: SmolAI/SmolLM2-1.7B
65
+ - Fine-tuning objective: Causal language modeling
66
+ - Method: Full or LoRA fine-tuning (depending on your actual setup)
67
+ - Optimizer: AdamW
68
+ - Typical epochs: 1–3
69
 
70
+ If you want, a full training script section can be added.
71
 
72
+ ---
73
+
74
+ ## Usage Example
75
+
76
+ ```python
77
+ from transformers import AutoTokenizer, AutoModelForCausalLM
78
+ import torch
79
 
80
+ model_name = "Abeersherif/Medical_Homework2"
 
 
 
 
81
 
82
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
83
+ model = AutoModelForCausalLM.from_pretrained(model_name)
84
 
85
+ prompt = "Explain what type 2 diabetes is in simple terms."
86
 
87
+ inputs = tokenizer(prompt, return_tensors="pt")
88
+ outputs = model.generate(
89
+ **inputs,
90
+ max_new_tokens=150,
91
+ temperature=0.7,
92
+ top_p=0.9,
93
+ )
94
 
95
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))