Instructions to use omercakar123/qwen2.5-3b-studybuddy-summarizer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use omercakar123/qwen2.5-3b-studybuddy-summarizer with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
qwen2.5-3b-studybuddy-summarizer
This model is a fine-tuned version of Qwen2.5-3B-Instruct via QLoRA. It is specialized to act as an academic processing module within the StudyBuddy ecosystem, engineered specifically for dual-task execution: comprehensive Text Summarization (Özetleme) and structured Flashcard Generation (Bilgi Kartı Oluşturma) in Turkish.
Bu model, Qwen2.5-3B-Instruct tabanı üzerinde QLoRA yöntemiyle ince ayar (fine-tune) yapılmış akademik bir asistan modelidir. StudyBuddy ekosisteminin metin işleme motoru olarak görev yapar; uzun ders notlarını akademik bir dille özetlemek ve bu notlardan dinamik soru-cevap formatında bilgi kartları (flashcard) üretmek üzere optimize edilmiştir.
Prompt Format / Girdi Formatı
The model responds best to structured system prompts designed for rigorous text analysis. For production workloads, format your input tokens with the ChatML layout:
En tutarlı ve akademik sonuçları elde etmek için girdilerinizi şu ChatML şablonuyla beslemeniz gerekir:
<|im_start|>system
Sen profesyonel bir akademik asistansın. 1. ÖZET: Metni tara, akademik ve nesnel bir dille, maddesiz, akıcı bir paragraf şeklinde özetle. 2. BİLGİ KARTI: Metindeki en kritik unsurları Soru-Cevap formatında kısa maddelerle sun.<|im_end|>
<|im_start|>user
ANALİZ ET: {Ders Notu / Akış metni}<|im_end|>
<|im_start|>assistant
How to Get Started with the Model / Nasıl Kullanılır?
You can successfully initialize this adapter model alongside its base framework using the following python snippet:
Bu model bir LoRA adaptörü olduğu için taban model ile birlikte yüklenmelidir. Modeli çalıştırmak ve test etmek için aşağıdaki kodu kullanabilirsiniz:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-3B-Instruct"
adapter_model_id = "omercakar123/qwen2.5-3b-studybuddy-summarizer"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
model = PeftModel.from_pretrained(model, adapter_model_id)
model.eval()
def analyze_academic_text(text):
system_msg = (
"Sen profesyonel bir akademik asistansın. "
"1. ÖZET: Metni tara, akademik ve nesnel bir dille, maddesiz, akıcı bir paragraf şeklinde özetle. "
"2. BİLGİ KARTI: Metindeki en kritik unsurları Soru-Cevap formatında kısa maddelerle sun."
)
prompt = f"<|im_start|>system\n{system_msg}<|im_end|>\n<|im_start|>user\nANALİZ ET: {text}<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.1, # Kept low to enforce strict adherence to facts / Gerçeklere sadakat için düşük tutulmuştur
top_p=0.95,
repetition_penalty=1.2,
eos_token_id=tokenizer.eos_token_id,
pad_token_id=tokenizer.pad_token_id
)
decoded = tokenizer.decode(outputs[0], skip_special_tokens=True)
return decoded.split("assistant")[-1].strip()
# Sample Execution
sample_note = "Yapay zeka, bilgisayarların insan zekasını taklit etmesini sağlayan bir teknoloji alanıdır. Makine öğrenmesi ve doğal dil işleme gibi alt dalları bulunur."
print(analyze_academic_text(sample_note))
- Downloads last month
- -