Downloads · 30 days
17
52% of all-time downloads
Codex07/Lora-3B-TR
Lora-3B-TR is a text generation model from Codex07. Use it when you need the model to write or continue text. It is set up for peft.
This is a Lora Adaptor of 'meta-llama/Llama-3.2-3B-Instruct'. The main goal of this adapter is to obtain an Llama who speaks Turkish better. (r=32, loraalpha=64, loradropout=0.005)
Downloads · 30 days
17
52% of all-time downloads
All-time downloads
33
Public
Repo size
212 MB
Likes
0
Public
Click a slice to open those files.
.safetensors195 MB · 92%
From the Hugging Face model README
This is a Lora Adaptor of 'meta-llama/Llama-3.2-3B-Instruct'. The main goal of this adapter is to obtain an Llama who speaks Turkish better.
(r=32, lora_alpha=64, lora_dropout=0.005)
from unsloth import FastLanguageModel
from peft import PeftModel
from transformers import AutoTokenizer
BASE = "meta-llama/Llama-3.2-3B-Instruct"
ADAPTER = "Codex07/Lora_3B_TR"
# Load Model
model, tok = FastLanguageModel.from_pretrained(
model_name=BASE, max_seq_length=2048, load_in_4bit=False, dtype=None, device_map="auto"
)
# Load Adaptor
model = PeftModel.from_pretrained(model, ADAPTER) # adapter’ı Unsloth modeline tak
FastLanguageModel.for_inference(model)
# Test
messages = [
{"role":"system","content":"You are AI assistant. Give user answers"},# Sen bir Yapay Zeka Asistanısısın. kullanıcıdan gelen sorulara resmi cevap ver.
{"role":"user","content":"Merhaba!"},
]
prompt = tok.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(prompt, max_new_tokens=2048)
print(tok.decode(out[0, prompt.shape[-1]:], skip_special_tokens=True))
Half of 'kadirnar/combined-turkish-datasets-v5' Turkish dataset used. Dataset divided into chunks by size 65k.
This model was trained with SFT.
Cite TRL as:
@misc{vonwerra2022trl,
title = {{TRL: Transformer Reinforcement Learning}},
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
year = 2020,
journal = {GitHub repository},
publisher = {GitHub},
howpublished = {\url{https://github.com/huggingface/trl}}
}