Downloads · 30 days
6
3% of all-time downloads
shinigamiRaj/IndicVedas-LoRA
IndicVedas-LoRA is a text generation model from shinigamiRaj. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
This repository contains the LoRA (Low-Rank Adaptation) adapter weights for VedaGPT (IndicVedas). These adapters are trained on top of the base model Qwen2.5-14B-Instruct using the Unsloth library.
Downloads · 30 days
6
3% of all-time downloads
All-time downloads
190
Public
Repo size
4.4 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 99%
From the Hugging Face model README
This repository contains the LoRA (Low-Rank Adaptation) adapter weights for VedaGPT (IndicVedas). These adapters are trained on top of the base model Qwen2.5-14B-Instruct using the Unsloth library.
If you are looking for the fully merged model (including GGUF quantizations for Ollama/llama.cpp), please check shinigamiRaj/IndicVedas.
r): 64lora_alpha): 64q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj0 (Optimized for Unsloth)noneThe adapters were fine-tuned using serverless cloud GPUs via Modal:
2.0 full epochs.5e-5 (Linear warm-up for 5% of training steps, followed by Cosine decay).adamw_8bit.0.05 for generalization stability.8.4096 tokens.You can load these adapters in Python using transformers and peft, or directly using unsloth for accelerated performance.
from unsloth import FastLanguageModel
max_seq_length = 4096
dtype = None # Auto detect
load_in_4bit = True
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "shinigamiRaj/IndicVedas-LoRA",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
)
# Prepare for inference
FastLanguageModel.for_inference(model)
# Generate text
inputs = tokenizer(
["<|im_start|>system\nYou are VedaGPT...\n<|im_end|>\n<|im_start|>user\nTell me about Agni in Rig Veda.<|im_end|>\n<|im_start|>assistant\n"],
return_tensors = "pt"
).to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 512, use_cache = True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_name = "Qwen/Qwen2.5-14B-Instruct"
adapter_model_name = "shinigamiRaj/IndicVedas-LoRA"
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(base_model, adapter_model_name)
This model uses the ChatML markup structure:
<|im_start|>system
You are VedaGPT, an expert scholar of the ancient Vedic scriptures...<|im_end|>
<|im_start|>user
Describe the concept of digestion (Agni) in Charaka Samhita.<|im_end|>
<|im_start|>assistant
...