Views
No views yet
1---
2language: en
3license: mit
4base_model: meta-llama/Llama-3.2-1B-Instruct
5tags:
6 - medical
7 - india
8 - healthcare
9 - llama
10 - text-generation
11 - indian-healthcare
12 - mental-health
13 - merged
14pipeline_tag: text-generation
15---
16
17# MedQuery-India-v1 (Merged)
18
19**No Meta approval or Hugging Face login required to use this model!**
20
21This is the **merged, standalone version** of the original `MedQuery-India-v1` QLoRA adapter. It is a fine-tuned version of **Llama-3.2-1B-Instruct** for Indian medical question answering — covering AIIMS/NEET clinical protocols, Indian drug brands (Crocin, Dolo, Combiflam), regional diseases (dengue, typhoid, TB/DOTS, chikungunya), national health programs (NTEP, NVBDCP, RSSDI, IAP), and mental health support with cultural sensitivity.
22
23> *Why this exists:* Most open-source medical AI models are trained on PubMed and USMLE data — optimized for Western clinical contexts. Indian patients ask about Dolo 650, not acetaminophen. They ask about DOTS, not generic TB regimens. This model is trained to understand that gap.
24
25---
26
27## ⚡ Quick Start — One Cell, Any Notebook
28
29Open in **Google Colab** (Runtime → Change runtime type → **T4 GPU**) or any Kaggle notebook and paste this single cell.
30
31Since this is a merged model, it loads natively with standard `transformers`. Just change `QUESTION` to anything you want to ask!
32
33```python
34# ============================================================
35# MedQuery-India-v1 (Merged) — Direct Inference
36# Works on Google Colab / Kaggle / any notebook with a T4 GPU
37# ============================================================
38
39# --- Step 1: Install basic dependencies ---
40import subprocess
41subprocess.run(["pip", "install", "-q", "transformers", "torch", "accelerate"], check=True)
42
43# --- Step 2: Load the model directly ---
44from transformers import AutoTokenizer, AutoModelForCausalLM
45import torch
46
47MODEL_ID = "kanha98/medquery-india-v1-merged"
48
49print("Downloading and loading the model (approx 2.5 GB)...")
50tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
51tokenizer.pad_token = tokenizer.eos_token
52
53# Loading in float16 - Easily fits in free Colab T4 (15GB VRAM)
54model = AutoModelForCausalLM.from_pretrained(
55 MODEL_ID,
56 torch_dtype=torch.float16,
57 device_map="auto"
58)
59print("✅ Model loaded successfully!")
60
61# --- Step 3: Ask your question — change this line ↓ ---
62QUESTION = "What are the warning signs of severe dengue?"
63# -------------------------------------------------------
64
65SYSTEM = (
66 "You are MedQuery-India, a medical AI assistant trained on Indian healthcare context "
67 "including AIIMS/NEET clinical protocols, Indian drug brands, regional diseases, "
68 "Indian procedural guidelines (NTEP, NVBDCP, RSSDI, IAP), and mental health support. "
69 "Answer accurately, safely, and with cultural sensitivity."
70)
71
72prompt = (
73 f"<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n{SYSTEM}<|eot_id|>"
74 f"<|start_header_id|>user<|end_header_id|>\n{QUESTION}<|eot_id|>"
75 f"<|start_header_id|>assistant<|end_header_id|>\n"
76)
77
78inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
79with torch.no_grad():
80 outputs = model.generate(
81 **inputs,
82 max_new_tokens=250,
83 temperature=0.3,
84 do_sample=True,
85 repetition_penalty=1.1,
86 pad_token_id=tokenizer.eos_token_id,
87 )
88
89print("\n🩺 --- MedQuery-India Response ---")
90print(tokenizer.decode(outputs[0], skip_special_tokens=True).split("assistant")[-1].strip())
91| Property | Value |
|---|---|
| Model Format | Merged Standalone (FP16/FP32) |
| Base model | meta-llama/Llama-3.2-1B-Instruct |
| Parameters | 1,235,814,400 (1.24B) |
| Original Fine-tuning | QLoRA (4-bit NF4 quantization) |
| Original LoRA rank | r = 64 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (7 modules) |
| Training hardware | Tesla T4 (Kaggle, 14.5GB VRAM) |
| Final training loss | 1.5468 |
| Source | Samples | % | Why included |
|---|---|---|---|
| MedMCQA (Indian) | 3,613 | 55.0% | AIIMS/NEET exam questions — directly Indian clinical context |
| ChatDoctor | 1,588 | 24.2% | Real patient-doctor conversations — teaches conversational tone |
| MedQuAD | 802 | 12.2% | NIH structured QA — adds reliable factual grounding |
| PubMedQA | 237 | 3.6% | Expert-annotated research QA — adds clinical reasoning |
| Synthetic Indian (general) | 144 | 2.2% | Indian drug names, regional disease context |
| Synthetic Indian (edge cases) | 135 | 2.1% | Drug safety edge cases specific to India |
| Synthetic Mental Health | 50 | 0.8% | NEET stress, exam pressure, Indian mental health context |
Warning signs of severe dengue require immediate hospitalization. These include: extreme lethargy or inability to talk; persistent vomiting; severe abdominal pain; bleeding from the nose, gums, or mouth; very high fever above 40°C; black spots on the skin (petechiae); swelling in the face, neck, or groin; extremely low blood pressure. If you have any one of these symptoms, call your local hospital immediately.
Combiflam contains ibuprofen (an NSAID) and paracetamol. Taking NSAIDs during dengue is dangerous because they increase the risk of bleeding by inhibiting platelet function — already compromised in dengue. For dengue fever, only paracetamol (like Crocin or Dolo 650) is safe. NSAIDs including Combiflam, Brufen, and Aspirin must be strictly avoided.
DOTS (Directly Observed Treatment Short-course) is India's national TB control program under the National Tuberculosis Elimination Programme (NTEP), launched in 1992. Core components: sputum microscopy for diagnosis, a standardized short-course drug regimen, direct supervision of treatment, case detection at facility and community levels, and free treatment under the PM-JAY scheme. DOTS is implemented by state and district health departments under the Central TB Division, Ministry of Health and Family Welfare.
1@misc{gupta2025medqueryindia,
2 author = {Kanhayya Gupta},
3 title = {MedQuery-India-v1: Fine-Tuning of Llama-3.2-1B for Indian Medical QA},
4 year = {2026},
5 url = {[https://huggingface.co/kanha98/medquery-india-v1-merged](https://huggingface.co/kanha98/medquery-india-v1-merged)}
6}
7