Downloads · 30 days
0
SykoSLM/SykoLLM-V6.9-SFT
SykoLLM-V6.9-SFT is a text generation model from SykoSLM. 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.
SykoLLM-V6.9-SFT, SykoSLM/SykoLLM-v6.9 temel modelinin, Alpaca formatlı bir talimat (instruction) veri seti üzerinde LoRA (Low-Rank Adaptation) yöntemiyle ince ayar yapılıp, ardından adaptör ağırlıklarının taban model…
Downloads · 30 days
0
Access
Public
Updated Jul 11, 2026
Parameters
392M
784 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors784 MB · 100%
From the Hugging Face model README
SykoLLM-V6.9-SFT, SykoSLM/SykoLLM-v6.9 temel modelinin, Alpaca formatlı bir talimat (instruction) veri seti üzerinde LoRA (Low-Rank Adaptation) yöntemiyle ince ayar yapılıp, ardından adaptör ağırlıklarının taban model ile birleştirilmesiyle (merge) elde edilmiş halidir.
| Özellik | Değer |
|---|---|
| Mimari | Phi3ForCausalLM |
| Gizli katman boyutu (hidden_size) | 1024 |
| Katman sayısı (num_hidden_layers) | 24 |
| Dikkat başlığı sayısı (num_attention_heads) | 8 |
| Key/Value başlığı sayısı (num_key_value_heads) | 2 |
| Ara katman boyutu (intermediate_size) | 3072 |
| Kelime dağarcığı (vocab_size) | 50,000 |
| Maksimum pozisyon (max_position_embeddings) | 1024 |
| Aktivasyon fonksiyonu | SiLU |
| Veri tipi | float16 |
Model, taban ağırlıklar dondurulmuş şekilde yalnızca LoRA adaptör katmanları eğitilerek fine-tune edilmiştir:
trainable params: 24,379,392 || all params: 416,236,544 || trainable%: 5.8571
merge_and_unload() ile taban modele birleştirildiNot: Yukarıdaki istatistikler yalnızca LoRA eğitim aşamasına aittir; bu repodaki ağırlıklar zaten birleştirilmiş (merged) haldedir, ayrıca bir adaptör yüklemeye gerek yoktur.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "SykoSLM/SykoLLM-V6.9-SFT"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.float16,
device_map="auto",
)
prompt = """### Talimat:
Türkiye'nin başkenti neresidir?
### Cevap:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.5,
top_p=0.9,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Base model ile LoRA adaptörünün yan yana karşılaştırılması için:
"""
Inference Script — SykoSLM/SykoLLM-v6.9 + LoRA Adapter
Base model ve LoRA'lı halini yan yana karşılaştırır.
Gereksinimler:
pip install transformers peft torch --break-system-packages
"""
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
BASE_MODEL_NAME = "SykoSLM/SykoLLM-v6.9"
ADAPTER_PATH = "/kaggle/working/sykollm-lora-alpaca/final_adapter"
MAX_NEW_TOKENS = 200
TEMPERATURE = 0.5
TOP_P = 0.9
REPETITION_PENALTY = 1.0
NO_REPEAT_NGRAM_SIZE = 0
TEST_INSTRUCTIONS = [
"hello!",
"Explain what a black hole is in simple terms.",
"Write a short poem about autumn.",
"What is the capital of France?",
"Give me three tips for staying productive while working from home.",
"What is the capital of Turkey?",
]
print("Tokenizer yükleniyor...")
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL_NAME, trust_remote_code=True)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
print("Base model yükleniyor...")
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL_NAME,
trust_remote_code=True,
torch_dtype=torch.float32,
device_map="auto",
)
base_model.eval()
print("LoRA adaptörü yükleniyor...")
lora_model = PeftModel.from_pretrained(base_model, ADAPTER_PATH)
lora_model.eval()
def format_prompt(instruction, input_text=""):
if input_text:
return (
f"### Instruction:\n{instruction}\n\n"
f"### Input:\n{input_text}\n\n"
f"### Response:\n"
)
return f"### Instruction:\n{instruction}\n\n### Response:\n"
def generate(model, prompt, max_new_tokens=MAX_NEW_TOKENS):
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output_ids = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
temperature=TEMPERATURE,
top_p=TOP_P,
repetition_penalty=REPETITION_PENALTY,
no_repeat_ngram_size=NO_REPEAT_NGRAM_SIZE,
do_sample=True,
pad_token_id=tokenizer.pad_token_id,
)
full_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
if "### Response:" in full_text:
return full_text.split("### Response:")[-1].strip()
return full_text[len(prompt):].strip()
if __name__ == "__main__":
for instruction in TEST_INSTRUCTIONS:
prompt = format_prompt(instruction)
print("\n" + "=" * 80)
print(f"INSTRUCTION: {instruction}")
print("=" * 80)
print("\n[BASE MODEL — LoRA'sız]")
base_output = generate(base_model, prompt)
print(base_output)
print("\n[LoRA'LI MODEL]")
lora_output = generate(lora_model, prompt)
print(lora_output)
print("\n" + "=" * 80)
print("Test tamamlandı.")
### Talimat:
{instruction}
### Girdi:
{input}
### Cevap:
{output}
max_position_embeddings değeri 1024 olduğundan çok uzun bağlamlarda kesilme yaşanabilir.Bu model kartında lisans olarak apache-2.0 varsayılan olarak belirtilmiştir. Taban modelin (SykoSLM/SykoLLM-v6.9) lisansına göre bu alanı güncellemeniz gerekebilir.
@misc{sykollm-v69-sft,
title = {SykoLLM-V6.9-SFT},
author = {SykoSLM},
year = {2026},
note = {LoRA fine-tuned and merged from SykoSLM/SykoLLM-v6.9}
}