Downloads · 30 days
12
10% of all-time downloads
nik-55/bhagavad-gita-gemma-3-1b-it
bhagavad-gita-gemma-3-1b-it is a text generation model from nik-55. Use it when you need the model to write or continue text. The card lists the license as gemma.
This model is a fine-tuned version of gemma-3-1b-it, trained specifically on the Bhagavad Gita.
Downloads · 30 days
12
10% of all-time downloads
All-time downloads
125
Public
Parameters
1000M
2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 98%
From the Hugging Face model README
This model is a fine-tuned version of gemma-3-1b-it, trained specifically on the Bhagavad Gita.
Training process:
Stage 1: Standard language modeling on the Bhagavad Gita corpus to capture semantics and style.
Stage 2: Conversation tuning for improved dialogue flow and context-sensitive responses.
Dataset: https://huggingface.co/datasets/nik-55/bhagavad-gita
Training Script: https://huggingface.co/nik-55/bhagavad-gita-gemma-3-1b-it/blob/main/training.ipynb
Note: The model is intended for educational, research only.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "nik-55/bhagavad-gita-gemma-3-1b-it"
model_kwargs = dict(
attn_implementation="eager",
device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, **model_kwargs)
messages = [
{
"role": "user",
"content": "Who is krishna?",
},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens=500, do_sample=True)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1] :]))