Downloads · 30 days
5
5% of all-time downloads
abagade/gemma-3-270m-bhagavad-gita-v1
gemma-3-270m-bhagavad-gita-v1 is a text generation model from abagade. Use it when you need the model to write or continue text. It is set up for transformers.
Gita-Gemma-270M is a compact, 270-million-parameter conversational AI fine-tuned from Google's Gemma model. It's designed to act as a wise spiritual guide, providing answers and explanations to modern-day problems bas…
Downloads · 30 days
5
5% of all-time downloads
All-time downloads
98
Public
Parameters
268M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 96%
From the Hugging Face model README
Gita-Gemma-270M is a compact, 270-million-parameter conversational AI fine-tuned from Google's Gemma model. It's designed to act as a wise spiritual guide, providing answers and explanations to modern-day problems based on the teachings of the Bhagavad Gita.
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.
google/gemma-2b (or a 270M variant)https://huggingface.co/abagade/gemma-3-270m-bhagavad-gita-v1This 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.
Example Code:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_name = "abagade/gemma-3-270m-bhagavad-gita-v1/"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)
# Format the prompt using the model's chat template
system_prompt = "You are a wise and compassionate spiritual guide. Your answers are based on the teachings of the Bhagavad Gita."
user_question = "I feel so stressed about my upcoming exams. I'm worried about failing and don't know how to focus."
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_question},
]
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(prompt, return_tensors="pt")
# Generate the response
outputs = model.generate(**inputs, max_new_tokens=256)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
The model is small enough to be further fine-tuned on more specific philosophical texts or used as a base for a more complex RAG (Retrieval-Augmented Generation) system that pulls from detailed commentaries.
This model is not a substitute for professional mental health advice, therapy, or religious scholarship. It should not be used for:
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.
Users should be clearly informed that they are interacting with an AI and that its guidance is based on simplified interpretations. The model's responses should be viewed as a starting point for reflection, not as absolute truth.
Use the code provided in the Direct Use section to interact with the model. Ensure you have the transformers and torch libraries installed.
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:
gemma3:27b-it-qat) to generate a simplified, modern meaning and a relevant real-world question.The model was fine-tuned using a consumer-grade GPU. Low-Rank Adaptation (LoRA) or QLoRA was likely used to efficiently train the model on the available hardware.
The model's performance was evaluated qualitatively based on the relevance and coherence of its responses to a set of test questions. No formal quantitative benchmarks were used.
The model consistently provides relevant shlokas and coherent, simplified explanations for common life problems.
BibTeX:
@misc{bagade_gita_gemma_2025,
author = {Abhishek Bagade},
title = {Gita-Gemma-270M: A Conversational Guide},
year = {2025},
publisher = {Hugging Face},
journal = {Hugging Face repository},
howpublished = {\url{[https://huggingface.co/abagade/gemma-bhagavad-gita-v1](https://huggingface.co/abagade/gemma-bhagavad-gita-v1)}}
}
Abhishek Bagade