AtmaLLaMA is a fine-tuned version of LLaMA 2, trained on ancient philosophical texts such as the Bhagavad Gita and the Patanjali Yoga Sutras. It is designed to generate insightful, spiritually aligned responses based on Indian philosophical wisdom. The model aims to provide thoughtful and meaningful discourse on topics related to self-awareness, dharma, meditation, and ethical living.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_name = "RakshitAi/AtmaLLaMA"
4tokenizer = AutoTokenizer.from_pretrained(model_name)
5model = AutoModelForCausalLM.from_pretrained(model_name)
6
7input_text = "What is the essence of dharma?"
8inputs = tokenizer(input_text, return_tensors="pt")
9outputs = model.generate(**inputs)
10response = tokenizer.decode(outputs[0], skip_special_tokens=True)
11print(response)
1from transformers import pipeline
2
3model_name = "RakshitAi/AtmaLLaMA"
4generator = pipeline("text-generation", model=model_name)
5
6input_text = "What is the essence of dharma?"
7response = generator(input_text, max_length=200, do_sample=True)
8print(response[0]["generated_text"])
Special thanks to the authors and translators of the Bhagavad Gita and Patanjali Yoga Sutras for their invaluable contributions to spiritual wisdom.