Downloads · 30 days
4
8% of all-time downloads
besmabakirci01/turkish-poetry-qwen-lora
turkish-poetry-qwen-lora is a text generation model from besmabakirci01. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Türkçe şiir üretimi için Unsloth + QLoRA ile fine-tune edilmiş LoRA adaptörü.
Downloads · 30 days
4
8% of all-time downloads
All-time downloads
50
Public
Repo size
131 MB
Likes
1
Public
Click a slice to open those files.
.safetensors120 MB · 91%
From the Hugging Face model README
Türkçe şiir üretimi için Unsloth + QLoRA ile fine-tune edilmiş LoRA adaptörü.
Bu model, Hafta 1 ödevi (dataset → BPE → Unsloth fine-tune) kapsamında geliştirilmiştir.
| Alan | Değer |
|---|---|
| Geliştirici | Besma Bakırcı (besmabakirci01) |
| Base model | unsloth/Qwen2.5-3B-Instruct-bnb-4bit (Qwen2.5-3B-Instruct) |
| Yöntem | Unsloth + PEFT LoRA (4-bit QLoRA) |
| Eğitim verisi | besmabakirci01/turkish-poetry-instruction-dataset |
| Dil | Türkçe |
| Görev | Instruction → Türkçe şiir üretimi |
| Hiperparametre | Değer |
|---|---|
r | 16 |
lora_alpha | 32 |
lora_dropout | 0.05 |
bias | none |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| rsLoRA | evet |
| Epoch | 1 |
| Hardware | Google Colab T4 |
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="besmabakirci01/turkish-poetry-qwen-lora",
max_seq_length=2048,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)
prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
### Instruction:
Gurbette yaşayan birinin sevdiğine duyduğu özlemi halk şiiri üslubuyla anlatan bir şiir yaz.
### Input:
### Response:
"""
inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_id = "Qwen/Qwen2.5-3B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(base_id)
base = AutoModelForCausalLM.from_pretrained(base_id, device_map="auto")
model = PeftModel.from_pretrained(base, "besmabakirci01/turkish-poetry-qwen-lora")
Alpaca formatında Türkçe şiir instruction dataseti (~4.961 örnek):
{
"instruction": "Kullanıcının şiir isteği",
"input": "",
"output": "Şiir metni"
}
Kaynak dataset (Apache-2.0): beratcmn/instruction-turkish-poems
| Bileşen | Link |
|---|---|
| Instruction dataset | turkish-poetry-instruction-dataset |
| BPE tokenizer | turkish-poem-bpe-tokenizer |
| Identity LoRA | nazim-identity-lora |
Apache-2.0 (eğitim verisi kaynağıyla uyumlu). Base model lisansına da uyunuz.