Downloads · 30 days
11
25% of all-time downloads
Aditya-m04/SocraticLM-Qwen-Lora
SocraticLM-Qwen-Lora is a machine learning model from Aditya-m04. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a LoRA adapter fine-tuned on 160k curated pedagogical dialogs designed for step-by-step Socratic teaching, self-explanation, and guided reasoning.
Downloads · 30 days
11
25% of all-time downloads
All-time downloads
44
Public
Repo size
334 MB
Likes
0
Public
Click a slice to open those files.
.safetensors323 MB · 95%
From the Hugging Face model README
This repository contains a LoRA adapter fine-tuned on 160k curated pedagogical dialogs
designed for step-by-step Socratic teaching, self-explanation, and guided reasoning.
The base model remains unchanged:
👉 Qwen/Qwen2.5-7B-Instruct
and this repo stores only the LoRA weights (adapter_model.safetensors).
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "Qwen/Qwen2.5-7B-Instruct"
adapter = "Aditya-m04/SocraticLM-Qwen-Lora"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, device_map="auto")
model = PeftModel.from_pretrained(model, adapter)
inp = "Explain the Pythagorean theorem to a 10-year-old."
out = model.generate(**tokenizer(inp, return_tensors="pt").to(model.device), max_new_tokens=200)
print(tokenizer.decode(out[0], skip_special_tokens=True))