Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
BharatGen introduces AyurParam, a domain-specialized large language model fine-tuned from Param-1-2.9B-Instruct on a high-quality Ayurveda dataset. It is designed to handle Ayurvedic queries, classical text interpretation, clinical guidance, and wellness knowledge. Ayurveda offers vast traditional medical wisdom, yet most language models lack domain-specific understanding. AyurParam bridges this gap by combining Param-1’s bilingual strengths with a curated Ayurvedic knowledge base, enabling contextually rich and culturally grounded responses.
🏗 Model Architecture
AyurParam inherits the architecture of Param-1-2.9B-Instruct:
Hidden size: 204
Intermediate size: 7168
Attention heads: 16
Hidden layers: 32
Key-value heads: 8
Max position embeddings: 2048
Activation: SiLU
Positional Embeddings: Rotary (RoPE, theta=10000)
Attention Mechanism: Grouped-query attention
Precision: bf16-mixed
Base model: Param-1-2.9B-Instruct
📚 Data Preparation
AyurParam’s training corpus was carefully crafted to ensure deep Ayurvedic knowledge, Sanskrit/English bilingual accessibility, and clinical relevance.
Steps involved:
Source Gathering
15k+ passages from classical Ayurvedic texts (digitized and curated).
10k+ passages from AYUSH ministry guidelines, research papers, and clinical case discussions.
Question Generation
5 curated Q&A pairs generated per passage using an open-source LLM + domain expert review.
Domain Taxonomy & Personas
Built an Ayurveda-specific taxonomy (Dosha, Dhatu, Mala, Srotas, Nidana, Chikitsa, etc.).
Defined multiple personas: student, vaidya (physician), researcher, policymaker, wellness coach.
Dataset Construction
1.5M Q&A pairs grounded in taxonomy and personas.
4M multi-turn conversation samples created.
Sanskrit terminology preserved with transliteration and explanations.
🏋️ Training Setup
Base model: Param-1-2.9B-Instruct
Training framework: Hugging Face + TRL (SFT) + torchrun multi-node setup
Prompt template: Custom-designed for Ayurvedic inference
Scheduler: Linear with warmup
Epochs: 3
Total training samples: ~8M
Test samples: ~800k
Base learning rate: 5e-6
Minimum learning rate: 0
Additional tokens: , , ,
Vocab size: 256k + 4
Global batch size: 1024
Micro batch size: 4
Gradient accumulation steps: 32
🚀 Inference Example
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "bharatgenai/AyurParam"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=False)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
torch_dtype=torch.bfloat16 if torch.cuda.is_available() else torch.bfloat32,
device_map="auto"
)
# Example Ayurvedic query
user_input = "What is the Samprapti (pathogenesis) of Amavata according to Ayurveda?"# Prompt styles# 1. Generic QA: <user> ... <assistant># 2. Context-based QA: <context> ... <user> ... <assistant># 3. Multi-turn conversation (supports up to 5 turns): <user> ... <assistant> ... <user> ... <assistant>
prompt = f"<user> {user_input} <assistant>"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=300,
do_sample=True,
top_k=50,
top_p=0.95,
temperature=0.6,
eos_token_id=tokenizer.eos_token_id,
use_cache=False
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
From the above results,
Ayur Param not only outperforms all similar-sized models
but also achieves
competitive or better performance than larger models
across multiple metrics.
AyurParam huggingface.co is an AI model on huggingface.co that provides AyurParam's model effect (), which can be used instantly with this bharatgenai AyurParam model. huggingface.co supports a free trial of the AyurParam model, and also provides paid use of the AyurParam. Support call AyurParam model through api, including Node.js, Python, http.
AyurParam huggingface.co is an online trial and call api platform, which integrates AyurParam's modeling effects, including api services, and provides a free online trial of AyurParam, you can try AyurParam online for free by clicking the link below.
bharatgenai AyurParam online free url in huggingface.co:
AyurParam is an open source model from GitHub that offers a free installation service, and any user can find AyurParam on GitHub to install. At the same time, huggingface.co provides the effect of AyurParam install, users can directly use AyurParam installed effect in huggingface.co for debugging and trial. It also supports api for free installation.