Instructions to use jenniemoonsunset123/khmer-rag-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jenniemoonsunset123/khmer-rag-model with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/home/admin-ubuntu/Desktop/Taiwan/models/sealion-v3-8b-it") model = PeftModel.from_pretrained(base_model, "jenniemoonsunset123/khmer-rag-model") - Notebooks
- Google Colab
- Kaggle
Khmer RAG Model Adapter
This is a fine-tuned adapter model for Khmer language tasks using Retrieval-Augmented Generation (RAG).
Model Details
- Base Model: aisingapore/Llama-SEA-LION-v3-8B-IT
- Adapter Type: LoRA / PEFT
- Language: Khmer (km)
- Task: Text Generation with RAG capabilities
- Training Data: Khmer policy documents and Q&A datasets
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# 1. Load the base model and tokenizer
base_model_id = "aisingapore/Llama-SEA-LION-v3-8B-IT"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id, device_map="auto", torch_dtype="auto")
# 2. Load your fine-tuned adapter
adapter_id = "jenniemoonsunset123/khmer-rag-model"
model = PeftModel.from_pretrained(base_model, adapter_id)
# 3. Test it!
prompt = "αα½ααααΈ! ααΎα’αααα’αΆα
αα½αααα»αααΆααα?"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 24
Model tree for jenniemoonsunset123/khmer-rag-model
Base model
meta-llama/Llama-3.1-8B Finetuned
meta-llama/Llama-3.1-8B-Instruct Finetuned
aisingapore/Llama-SEA-LION-v3-8B Finetuned
aisingapore/Llama-SEA-LION-v3-8B-IT