πŸ₯ ArogyaAI - LLaMA3 8B Fine-Tuned (QLoRA)

This is the fine-tuned LLaMA3 8B Instruct model adapter developed as part of ArogyaAI (India's First Multimodal AI Health Intelligence Platform). It has been SFT fine-tuned to synthesize unified prescriptions and diagnosis advice combining Allopathy, Ayurveda, and Homeopathy across 7 Indian languages.

πŸ“Š Fine-Tuning Performance & Metrics

The model was fine-tuned on a dual NVIDIA H100 GPU cluster. Below are the final metrics achieved during SFT training:

  • Training Dataset Size: 1,705 medical Q&A instruction pairs
  • Training Duration: 19 minutes, 59 seconds (5 epochs)
  • Final Training Loss: 0.2194
  • Final Evaluation Loss: 0.3728
  • Mean Token Evaluation Accuracy: 92.15% (Significantly exceeding the 80% thesis target!)

Framework versions

  • PEFT: 0.19.1
  • TRL: 1.6.0
  • Transformers: 5.12.1
  • Pytorch: 2.5.1+cu121
  • Datasets: 5.0.0
  • Tokenizers: 0.22.2

🧬 Direct Usage (PEFT & Transformers)

To load and use this model locally with the base LLaMA3 model:

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base_model_name = "meta-llama/Meta-Llama-3-8B-Instruct"
adapter_model_name = "Aman0026/ArogyaAI-LLaMA3-8B"

# Load base model in 4-bit
model = AutoModelForCausalLM.from_pretrained(
    base_model_name,
    load_in_4bit=True,
    torch_dtype=torch.float16,
    device_map="auto"
)

# Load tokenizer and merge PEFT adapter
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
model = PeftModel.from_pretrained(model, adapter_model_name)

# Run inference
inputs = tokenizer("Patient presents with severe cold and coughing. Suggest remedy.", return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

πŸ“œ Citations & License

This project is licensed under the MIT License.

Downloads last month
95
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Aman0026/ArogyaAI-LLaMA3-8B

Adapter
(1176)
this model