Views
No views yet
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4model_id = "sgattup/IndianCultureLLM"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
7
8ALPACA_PROMPT = """Below is a question or instruction about Indian culture.
9Write a thoughtful, accurate, and detailed response.
10
11### Instruction:
12{}
13
14### Response:
15"""
16
17def ask(question):
18 prompt = ALPACA_PROMPT.format(question)
19 inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
20 outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.7, do_sample=True)
21 response = tokenizer.decode(outputs[0], skip_special_tokens=True)
22 return response.split("### Response:")[-1].strip()
23
24print(ask("What is the significance of Diwali in Indian culture?"))
25print(ask("Explain the eight limbs of Yoga according to Patanjali."))
26print(ask("Who was Adi Shankaracharya and what did he teach?"))A Raga is the fundamental melodic framework of Indian classical music — not merely a scale but a complete musical personality with rules about which notes to use, how to ascend and descend, what mood it evokes, and what time of day it should be performed. Different ragas are associated with times of day: Bhairav at dawn, Yaman at dusk...
Dr. Bhimrao Ramji Ambedkar (1891–1956) was one of the most transformative figures in modern Indian history. Born into a Dalit family, he overcame severe discrimination to earn degrees from Columbia University and the London School of Economics. He was the principal architect of India's Constitution, which abolished untouchability and guaranteed fundamental rights to all citizens regardless of caste...
| Property | Value |
|---|---|
| Base Model | LLaMA 3.2 3B (unsloth/llama-3.2-3B-bnb-4bit) |
| Fine-tuning Method | QLoRA via Unsloth |
| LoRA Rank | 16 |
| Training Epochs | 3 |
| Dataset Size | 75+ high-quality instruction pairs |
| Language | English |
| License | Apache 2.0 |
@misc{IndianCultureLLM2026,
author = {sgattup},
title = {Indian Culture LLM},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/sgattup/IndianCultureLLM}
}