From Problem-Solving to Teaching Problem-Solving: Aligning LLMs with Pedagogy using Reinforcement Learning
Paper โข 2505.15607 โข Published โข 4
How to use rachitgoyell/Prashna-7b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="rachitgoyell/Prashna-7b")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("rachitgoyell/Prashna-7b")
model = AutoModelForCausalLM.from_pretrained("rachitgoyell/Prashna-7b", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use rachitgoyell/Prashna-7b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "rachitgoyell/Prashna-7b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "rachitgoyell/Prashna-7b",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/rachitgoyell/Prashna-7b
How to use rachitgoyell/Prashna-7b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "rachitgoyell/Prashna-7b" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "rachitgoyell/Prashna-7b",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "rachitgoyell/Prashna-7b" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "rachitgoyell/Prashna-7b",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use rachitgoyell/Prashna-7b with Docker Model Runner:
docker model run hf.co/rachitgoyell/Prashna-7b
Prashna (เคชเฅเคฐเคถเฅเคจ), Hindi for "question", is a 7B Socratic tutoring model fine-tuned from Qwen2.5-7B-Instruct. Instead of handing students the answer, it diagnoses what they misunderstand and asks guiding questions that lead them there.
It was built for Akara (Team Evolve AI), a pipeline that turns NCERT chapters into explainer videos and then checks understanding with the Feynman technique: the student explains the concept back, and the tutor asks a targeted follow-up.
| Model name | Prashna-7B |
| Base model | Qwen2.5-7B-Instruct |
| Parameters | ~7.6B |
| Task | Socratic tutoring, misconception diagnosis, follow-up question generation |
| Language | English (see Limitations) |
| License | Apache 2.0 (inherited from the base model) |
| Developed by | rachitgoyell |
pip install -U transformers accelerate torch
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = "rachitgoyell/prashna-7b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype=torch.bfloat16, device_map="auto")
reference_script = "Objects in free fall accelerate at the same rate regardless of mass, ignoring air resistance."
messages = [
{
"role": "system",
"content": (
"You are a Socratic tutor. Never state the final answer. "
"Compare the student's explanation with the reference passage, identify the key "
"misconception, and ask exactly one guiding question.\n\n"
f"Reference passage:\n{reference_script}"
),
},
{"role": "user", "content": "I think heavier objects fall faster because gravity pulls them harder."},
]
inputs = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=400, temperature=0.7, do_sample=True)
print(tok.decode(out[0][inputs.shape[-1]:], skip_special_tokens=True))
from transformers import BitsAndBytesConfig
bnb = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16)
model = AutoModelForCausalLM.from_pretrained(repo, quantization_config=bnb, device_map="auto")
@misc{prashna-7b,
author = {rachitgoyell},
title = {Prashna-7B: A Socratic Tutoring Model for Akara},
year = {2026},
url = {https://huggingface.co/rachitgoyell/prashna-7b}
}