Rajkumar57 commited on
Commit
2e382b8
·
verified ·
1 Parent(s): fb31b8e

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -0
README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - medical
6
+ - llama
7
+ - heart-disease
8
+ - healthcare
9
+ - instruction-tuned
10
+ - awareness
11
+ - causal-lm
12
+ model_name: CardioMed-LLaMA3.2-1B
13
+ base_model: meta-llama/Llama-3.2-1B-Instruct
14
+ datasets:
15
+ - custom
16
+ library_name: transformers
17
+ pipeline_tag: text-generation
18
+ ---
19
+
20
+ # 🫀 CardioMed-LLaMA3.2-1B
21
+
22
+ **CardioMed-LLaMA3.2-1B** is a domain-adapted, instruction-tuned language model fine-tuned specifically on heart disease–related medical prompts using LoRA on top of `meta-llama/Llama-3.2-1B-Instruct`.
23
+
24
+ This model is designed to generate structured **medical abstracts and awareness information** about cardiovascular diseases such as stroke, myocardial infarction, hypertension, etc.
25
+
26
+ ---
27
+
28
+ ## ✨ Example Usage
29
+
30
+ ```python
31
+ from transformers import AutoTokenizer, AutoModelForCausalLM
32
+ import torch
33
+
34
+ model = AutoModelForCausalLM.from_pretrained("rajkumar/CardioMed-LLaMA3.2-1B", torch_dtype=torch.float16).cuda()
35
+ tokenizer = AutoTokenizer.from_pretrained("rajkumar/CardioMed-LLaMA3.2-1B")
36
+
37
+ prompt = """### Instruction:
38
+ Provide an abstract and awareness information for the following disease: Myocardial Infarction
39
+
40
+ ### Response:
41
+ """
42
+
43
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
44
+ outputs = model.generate(**inputs, max_new_tokens=512)
45
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 🧠 Use Cases
51
+
52
+ - Patient education for cardiovascular conditions
53
+ - Early awareness chatbots
54
+ - Clinical NLP augmentation
55
+ - Health-tech research assistants
56
+
57
+ ---
58
+
59
+ ## 🔧 Fine-tuning Details
60
+
61
+ - **Base model:** `meta-llama/Llama-3.2-1B-Instruct`
62
+ - **Fine-tuning method:** PEFT (LoRA)
63
+ - **LoRA target modules:** `q_proj`, `v_proj`
64
+ - **Dataset size:** 3,209 instruction-response pairs (custom medical JSONL)
65
+ - **Instruction format:** Alpaca-style (`### Instruction` / `### Response`)
66
+ - **Max sequence length:** 512 tokens
67
+ - **Framework:** Hugging Face Transformers + PEFT
68
+
69
+ ---
70
+
71
+ ## 🧪 Prompt Format
72
+
73
+ ```text
74
+ ### Instruction:
75
+ Provide an abstract and awareness information for the following disease: Stroke
76
+
77
+ ### Response:
78
+ ```
79
+
80
+ Model will generate:
81
+ - ✅ Abstract
82
+ - ✅ Awareness & prevention guidelines
83
+ - ✅ Structured medical info
84
+
85
+ ---
86
+
87
+ ## 📄 License
88
+
89
+ This model is licensed under the **MIT License** and intended for **educational and research purposes only**.