Gita-Gemma-1B: A Conversational Guide
This model,
abagade/gemma-3-1b-bhagavad-gita-v1, is a fine-tuned version of
google/gemma-3-1b-it. It has been trained using Supervised Fine-Tuning (SFT) with the
TRL library.
The model is designed to act as a wise spiritual guide, providing answers and explanations to modern-day problems based on the teachings of the Bhagavad Gita.
Model Details
Model Description
This model has been fine-tuned to understand user questions about life's challenges—such as stress, purpose, and relationships—and respond with a relevant shloka (verse) from the Bhagavad Gita. Crucially, the model doesn't just provide the quote; it also generates a simple, modern explanation of the verse's meaning to make the ancient wisdom accessible and practical.
- Developed by: Abhishek Bagade
- Shared by: abagade
- Model type: Causal Language Model
- Language(s) (NLP): English, Sanskrit (for shlokas)
- License: Gemma Terms of Use
- Finetuned from model:
google/gemma-3-1b-it
Model Sources [optional]
- Repository:
https://huggingface.co/abagade/gemma-3-1b-bhagavad-gita-v1
- Demo [optional]: [Link to your Gradio/Streamlit demo if you build one]
Quick Start
Use the code below to get started with the model.
1from transformers import AutoTokenizer, pipeline
2import torch
3
4model_name = "abagade/gemma-3-1b-bhagavad-gita-v1"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6pipe = pipeline(
7 "text-generation",
8 model=model_name,
9 tokenizer=tokenizer,
10 torch_dtype=torch.bfloat16,
11 device_map="auto",
12)
13
14# Format the prompt using the model's chat template
15system_prompt = "You are a wise and compassionate spiritual guide. Your answers are based on the teachings of the Bhagavad Gita."
16user_question = "I feel so stressed about my upcoming exams. I'm worried about failing and don't know how to focus."
17
18messages = [
19 {"role": "system", "content": system_prompt},
20 {"role": "user", "content": user_question},
21]
22
23# Use the pipeline to generate the response
24output = pipe(messages, max_new_tokens=256, return_full_text=False)[0]
25print(output['generated_text'])
Uses
Direct Use
This model is intended for direct use as a conversational chat agent. It can be integrated into applications to provide users with spiritual guidance, meditative focus points, or daily wisdom.
Out-of-Scope Use
This model is not a substitute for professional mental health advice, therapy, or religious scholarship. It should not be used for:
- Providing medical, legal, or financial advice.
- Generating definitive scholarly or theological interpretations. The explanations are simplified for accessibility.
- Engaging in conversations outside the scope of life guidance and philosophy.
Bias, Risks, and Limitations
This model inherits biases from the base Gemma model and the training data. The primary risk is misinterpretation; the simplified meanings may lack the deep, nuanced context a human scholar could provide. The model has no true understanding of human experience and its responses are pattern-based. It may occasionally "hallucinate" or provide a verse that is not perfectly suited to the user's question.
Training procedure
This model was trained with Supervised Fine-Tuning (SFT).
Training Data
The model was fine-tuned on a synthetic dataset generated from the complete Bhagavad Gita. The dataset consists of approximately 700 question-answer pairs. Each entry was created by:
- Taking a shloka and its English translation from the Vedic Scriptures GitHub repository.
- Using a powerful LLM to generate a simplified, modern meaning and a relevant real-world question.
- Formatting the output into a structured conversational format.
Training Hardware
The model was fine-tuned on a local, consumer-grade GPU (NVIDIA RTX 3090 / 4090).
Framework Versions
- TRL: 0.21.0
- Transformers: 4.55.4
- Pytorch: 2.8.0
- Datasets: 3.6.0
- Tokenizers: 0.21.4
Environmental Impact
- Hardware Type: NVIDIA RTX 3090 / 4090
- Hours used: ~4 hours
- Cloud Provider: Local machine
- Compute Region: N/A
- Carbon Emitted: Carbon emissions were minimized by using an efficient fine-tuning method (QLoRA) on local, consumer-grade hardware.
Citations
Cite TRL as:
1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallouédec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{[https://github.com/huggingface/trl](https://github.com/huggingface/trl)}}
8}
Cite this model as:
1@misc{bagade_gita_gemma_1b_2025,
2 author = {Abhishek Bagade},
3 title = {Gita-Gemma-1B: A Conversational Guide},
4 year = {2025},
5 publisher = {Hugging Face},
6 journal = {Hugging Face repository},
7 howpublished = {\url{[https://huggingface.co/abagade/gemma-3-1b-bhagavad-gita-v1](https://huggingface.co/abagade/gemma-3-1b-bhagavad-gita-v1)}}
8}
Model Card Contact