Downloads · 30 days
5
11% of all-time downloads
Aditya-m04/SocraticLM-Llama3.1-8B
SocraticLM-Llama3.1-8B 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
5
11% of all-time downloads
All-time downloads
47
Public
Repo size
353 MB
Likes
0
Public
Click a slice to open those files.
.safetensors336 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.
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))