πŸ«€ CardioMed-LLaMA3.2-1B

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.

This model is designed to generate structured medical abstracts and awareness information about cardiovascular diseases such as stroke, myocardial infarction, hypertension, etc.


✨ Example Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model = AutoModelForCausalLM.from_pretrained("rajkumar/CardioMed-LLaMA3.2-1B", torch_dtype=torch.float16).cuda()
tokenizer = AutoTokenizer.from_pretrained("rajkumar/CardioMed-LLaMA3.2-1B")

prompt = """### Instruction:
Provide an abstract and awareness information for the following disease: Myocardial Infarction

### Response:
"""

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

🧠 Use Cases

  • Patient education for cardiovascular conditions
  • Early awareness chatbots
  • Clinical NLP augmentation
  • Health-tech research assistants

πŸ”§ Fine-tuning Details

  • Base model: meta-llama/Llama-3.2-1B-Instruct
  • Fine-tuning method: PEFT (LoRA)
  • LoRA target modules: q_proj, v_proj
  • Dataset size: 3,209 instruction-response pairs (custom medical JSONL)
  • Instruction format: Alpaca-style (### Instruction / ### Response)
  • Max sequence length: 512 tokens
  • Framework: Hugging Face Transformers + PEFT

πŸ§ͺ Prompt Format

### Instruction:
Provide an abstract and awareness information for the following disease: Stroke

### Response:

Model will generate:

  • βœ… Abstract
  • βœ… Awareness & prevention guidelines
  • βœ… Structured medical info

πŸ“„ License

This model is licensed under the MIT License and intended for educational and research purposes only.

Downloads last month
19
Safetensors
Model size
1.24B params
Tensor type
FP16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Rajkumar57/CardioMed-LLaMA3.2-1B

Finetuned
(867)
this model