Views
No views yet
1📜 Peshwai Historian AI (Marathi Language Model)
2An LLM fine-tuned to answer deep, culturally rich questions about the Peshwa era of Pune — in fluent Marathi.
3
4✨ Overview
5
6`peshwai-historian-ai` is a fine-tuned language model focused on the **Maratha Peshwa dynasty, trained on **curated historical text in Marathi. The model can answer questions about lesser-known events, policies, and figures from the 18th-century Pune region with contextual, factual, and culturally accurate responses — especially useful for educators, students, historians, and heritage lovers.
7
8
9🔍 What Makes It Special?
10
11📖 Marathi-native output: Generates grammatically rich and natural Marathi text
12🕰️ Historical awareness: Avoids commonly known facts (like Bajirao, Shaniwarwada) and focuses on underrepresented topics
13🧠 Fine-tuned on real historical documents: Including rare facts about Nana Phadnavis, Mahadji Shinde, diplomacy, cultural shifts, etc.
14🗣️ Few-shot prompting optimized: Learns from examples to improve answer quality
15
16
17🧠 Example Prompt
18
19```marathi
20विषय: नाना फडणवीसांचे गुप्त राजकारण
21सविस्तर माहिती: नाना फडणवीस हे पेशवाईतील अत्यंत मुत्सद्दी आणि धोरणशक्ती असलेले व्यक्तिमत्व होते. माधवराव पेशव्यांच्या मृत्यूनंतर, सत्तेची रिकामी जागा भरून काढण्यासाठी त्यांनी 'बारभाई मंडळ' तयार केले...1from unsloth import FastLanguageModel
2import torch
3
4model, tokenizer = FastLanguageModel.from_pretrained(
5 model_name = "Devavrat28/peshwai-historian-ai", # replace with your HF username
6 max_seq_length = 4096,
7 dtype = torch.float16,
8 load_in_4bit = True
9)
10
11FastLanguageModel.for_inference(model)
12
13prompt = "विषय: माधवराव पेशव्यांचा आरोग्यावर झालेला परिणाम\nसविस्तर माहिती:"
14inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
15
16outputs = model.generate(**inputs, max_new_tokens=512)
17print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Setting | Value |
|---|---|
| Base Model | Gemma / LLaMA / Open LLM |
| Fine-tuning Method | Supervised Fine-Tuning (SFT) |
| Framework | Unsloth + 🤗 TRL |
| Dataset | Marathi historical text (~50K tokens) |
| Technique | Continued pretraining + SFT |
| Language | मराठी (Marathi) |
@misc{peshwaiHistorian2024,
title={Peshwai Historian AI: A Marathi LLM for Regional Heritage},
author={Devavrat Samak},
year={2024},
howpublished={\url{https://huggingface.co/devavrat/peshwai-historian-ai}},
}