Instructions to use omercakar123/qwen2-1.5b-studybuddy-assistant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use omercakar123/qwen2-1.5b-studybuddy-assistant with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
qwen2-1.5b-studybuddy-assistant
This model is a fine-tuned version of Qwen2-1.5B-Instruct using QLoRA (Parameter-Efficient Fine-Tuning). It is specifically tailored to act as StudyBuddy, an intelligent, student-oriented educational assistant that schedules academic tasks, handles missing intent information, and interacts with students in Turkish.
Bu model, Qwen2-1.5B-Instruct tabanı üzerinde QLoRA yöntemiyle ince ayar (fine-tune) yapılmış akıllı bir öğrenci asistanı modelidir. StudyBuddy ekosisteminin ana metin üretim motoru olarak görev yapar; ders ekleme/planlama taleplerini yönetir, eksik parametreleri (gün/saat) sorgular ve öğrencilerle asistan tonunda iletişim kurar.
Prompt Format / Girdi Formatı
The model uses the standard ChatML structure. To ensure coherent and accurate output production, always encapsulate inputs with the following structure:
Model, standart ChatML yapısını kullanmaktadır. En kararlı sonuçları almak için girdilerinizi şu şablonla beslemeniz gerekir:
<|im_start|>system
Sen StudyBuddy adında, ders ekleme taleplerini onaylayan ve öğrencilere kısa cevaplar veren bir asistansın.<|im_end|>
<|im_start|>user
{Öğrencinin Cümlesi}<|im_end|>
<|im_start|>assistant
How to Get Started with the Model / Nasıl Kullanılır?
Since this is a PEFT/Lora adapter model, it should ideally be loaded with its base framework. Here is the fully optimized Python script to load and generate text:
Bu model bir LoRA adaptörü olduğu için taban model ile birlikte yüklenmelidir. Modeli sorunsuz 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-1.5B-Instruct"
adapter_model_id = "omercakar123/qwen2-1.5b-studybuddy-assistant"
# Load Tokenizer and Base Model
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# Merge Adapter Weights
model = PeftModel.from_pretrained(model, adapter_model_id)
model.eval()
def generate_response(instruction):
system_msg = "Sen StudyBuddy adında, ders ekleme taleplerini onaylayan ve öğrencilere kısa cevaplar veren bir asistansın."
prompt = f"<|im_start|>system\n{system_msg}<|im_end|>\n<|im_start|>user\n{instruction}<|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=64,
do_sample=True,
temperature=0.3,
top_p=0.9,
repetition_penalty=1.1,
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()
# Test run
print(generate_response("Pazartesi sabah 08.30'da Akışkanlar Mekaniği planla."))
Capabilities & Evaluation / Yetenekler ve Değerlendirme📅 Complex Academic Scheduling: Flawlessly extracts course names, days, and hours to commit data structures into backend schemas.❓ Missing Intent Management: Identifies vague requests (e.g., "I need to study Math") and prompts the user back to provide specific scheduling variables (Day/Time).🎨 Cross-Domain Adaptation: Successfully generalizes across unconventional lesson names (e.g., Gastronomy, Archeology).Training HyperparametersBase Architecture: Qwen/Qwen2-1.5B-InstructMethod: QLoRA (4-bit quantization, $r=16$, $\alpha=32$)Learning Rate: 1.2e-4Epochs: 4Optimizer: paged_adamw_32bitLR Scheduler: Cosine
- Downloads last month
- -