Downloads · 30 days
3
5% of all-time downloads
sri2000us/swasthai-medical-7b-merged
swasthai-medical-7b-merged is a text generation model from sri2000us. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A fine-tuned Mistral-7B model specialized for Indian healthcare assistance. This is the merged full model - no adapter loading required.
Downloads · 30 days
3
5% of all-time downloads
All-time downloads
66
Public
Parameters
7.2B
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
A fine-tuned Mistral-7B model specialized for Indian healthcare assistance. This is the merged full model - no adapter loading required.
| Property | Value |
|---|---|
| Base Model | Mistral-7B-v0.3 |
| Fine-tuning | QLoRA merged into full weights |
| Parameters | 7B |
| Context Length | 2048 tokens |
| License | Apache 2.0 |
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "sri2000us/swasthai-medical-7b-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
)
def ask_swasthai(question):
prompt = f"""### Instruction:
You are SwasthAI, an expert Indian healthcare assistant. Answer the medical question accurately.
### Input:
{question}
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, do_sample=True, temperature=0.7)
return tokenizer.decode(outputs[0], skip_special_tokens=True).split("### Response:")[-1].strip()
print(ask_swasthai("What are symptoms of diabetes?"))
### Instruction:
You are SwasthAI, an expert Indian healthcare assistant. Answer the medical question accurately.
### Input:
{user_question}
### Response:
{model_response}
Fine-tuned on 1,223 curated medical Q&A pairs covering: