🧠 SocraticLM-Llama-LoRA

LoRA-Fine-Tuned Llama3.1-8B-Instruct for Pedagogy-Optimized Teaching Conversations

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.


πŸš€ How to Use

from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = meta-llama/Llama-3.1-8B-Instruct
adapter = "Aditya-m04/SocraticLM-Llama3.1-8B"

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))
Downloads last month
2
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for Aditya-m04/SocraticLM-Llama3.1-8B

Adapter
(1970)
this model