Views
No views yet
| Model | Accuracy (%) | Note |
|---|---|---|
| VaidhLLaMA-3.2-3B | 41.91% | Fine-tuned Ayurveda Specialist |
| Llama-3.2-3B-Instruct | 40.74% | Base Model |
| Llama-3.2-1B | 27.58% | Tiny Model |
transformers library:1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4model_id = "Vivekdas/VaidhLLaMA-3.2-3B-Instruct"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto"
11)
12
13messages = [
14 {"role": "system", "content": "You are VaidhLLaMA, an expert AI assistant for Ayurveda."},
15 {"role": "user", "content": "Explain the concept of Tridosha in Ayurveda."}
16]
17
18input_ids = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt"
22).to(model.device)
23
24outputs = model.generate(
25 input_ids,
26 max_new_tokens=512,
27 do_sample=True,
28 temperature=0.6,
29 top_p=0.9
30)
31
32response = tokenizer.decode(outputs[0][input_ids.shape[-1]:], skip_special_tokens=True)
33print(response)1@misc{vaidhllama2024,
2 author = {Vivekdas},
3 title = {VaidhLLaMA: A Fine-Tuned LLM for Ayurveda},
4 year = {2024},
5 publisher = {Hugging Face},
6 journal = {Hugging Face Repository},
7 howpublished = {\url{https://huggingface.co/Vivekdas/VaidhLLaMA-3.2-3B-Instruct}}
8}