Downloads · 30 days
12
13% of all-time downloads
SalihHub/Kumru-2B-Ceza-Lora
Kumru-2B-Ceza-Lora is a text generation model from SalihHub. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
Kumru-2B-Ceza-LoRA is a Turkish language chatbot fine-tuned using LoRA (Low-Rank Adaptation) on the Kumru-2B base model. It mimics the speech style, vocabulary, and energetic perspective of Turkish rap artist Ceza.
Downloads · 30 days
12
13% of all-time downloads
All-time downloads
90
Public
Repo size
67.9 MB
Likes
0
Public
Click a slice to open those files.
.safetensors67.9 MB · 94%
From the Hugging Face model README
Kumru-2B-Ceza-LoRA is a Turkish language chatbot fine-tuned using LoRA (Low-Rank Adaptation) on the Kumru-2B base model. It mimics the speech style, vocabulary, and energetic perspective of Turkish rap artist Ceza.
Key Specifications:
| Parameter | Value |
|---|---|
| rank (r) | 16 |
| lora_alpha | 32 |
| lora_dropout | 0.05 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Trainable Parameters | ~1-2% |
| Parameter | Value |
|---|---|
| Max Epochs | 10 |
| Early Stopping | 3 eval patience |
| Batch Size | 8 |
| Gradient Accumulation | 2 |
| Effective Batch Size | 16 |
| Learning Rate | 2e-4 |
| LR Scheduler | Cosine |
| Warmup Steps | 50 |
| Optimizer | paged_adamw_32bit |
| Precision | BF16 |
| Quantization | 4-bit (NF4) |
| Step | Training Loss | Validation Loss |
|---|---|---|
| 50 | 0.7135 | 0.5091 |
| 100 | 0.4331 | 0.3977 |
| 150 | 0.4004 | 0.3734 |
| 200 | 0.3571 | 0.3643 |
| 250 | 0.3592 | 0.3567 |
| 300 | 0.3482 | 0.3492 |
En İyi Model: Step 300 (eval_loss: 0.3492)
pip install transformers peft torch accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
# Base model ve tokenizer
base_model_name = "vngrs-ai/Kumru-2B"
lora_adapter = "SalihHub/Kumru-2B-Ceza-LoRA"
# Tokenizer (base model'den)
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Base model
model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.float16,
device_map="auto"
)
# LoRA adapter'ı yükle
model = PeftModel.from_pretrained(model, lora_adapter)
model.eval()
# Chat fonksiyonu
def chat_with_ceza(question, max_new_tokens=200):
system_prompt = """Sen Ceza'sin. Turkiye'nin en etkili ve teknik rap sanatcilarindan birisin.
Hizli flow'un, sosyal elestirili sozlerin ve guclu sahne performansinla taninan bir MC'sin.
Politik ve toplumsal konularda fikirlerini acikca soyleyen, enerjik ve korkusuz bir karakterin var."""
prompt = f"""<|im_start|>system
{system_prompt}
<|im_end|>
<|im_start|>user
{question}
<|im_end|>
<|im_start|>assistant
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
if "token_type_ids" in inputs:
del inputs["token_type_ids"]
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
temperature=0.7,
top_p=0.9,
do_sample=True,
repetition_penalty=1.2,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=False)
answer = response.split("<|im_start|>assistant\n")[-1].split("<|im_end|>")[0].strip()
return answer
# Örnek kullanım
print(chat_with_ceza("Bugün nasılsın?"))
| Question | Response |
|---|---|
| "Hangi Osmanlı padişahı olmak isterdin, neden?" | "Fatih Sultan Mehmet olmak isterdim; o çağları yakan zeka ve güçle, dünyaya şekil verecek bir miras bırakmak için." |
| "3 + 7 kaç yapar?" | "3 + 7 = 10 eder, tam kafa rahat!" |
| "Bir pizza olsan üstünde ne olurdu?" | "Pizzada domates sosu, ince dilimlenmiş mozarella peyniri ve taze fesleğen – üstünde erimiş peynirle dans eden güneş gibi parıldardım be!" |
@misc{kumru-ceza-lora,
author = {Salih Dede},
title = {Kumru-2B-Ceza-LoRA: Ceza Style Turkish Chatbot},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/SalihHub/Kumru-2B-Ceza-LoRA}}
}