Sachin-Hansaka/SQAD-Sinhala_Question_Answering_Dataset
Viewer • Updated • 110k • 31 • 6
How to use Sachin-Hansaka/Sinhala-qa-QLoRA-LLaMA-3.2-3B-Instruct with Adapters:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("<base-model-id>")
model.load_adapter("Sachin-Hansaka/Sinhala-qa-QLoRA-LLaMA-3.2-3B-Instruct", set_active=True)This repository contains only LoRA/QLoRA adapter weights. You must load them on top of the base model (e.g., google/gemma-2-2B-Instruct) using peft.
This model is fine-tuned for Sinhala Abstractive QA using QLoRA. You must load it with the base model:
# Example Inference
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
tokenizer = AutoTokenizer.from_pretrained("meta-llama/Llama-3.2-3B-Instruct")
model = PeftModel.from_pretrained(base_model, "Sachin-Hansaka/Sinhala-qa-QLoRA-LLaMA-3.2-3B-Instruct")
Base model
meta-llama/Llama-3.2-3B-Instruct