Downloads · 30 days
0
RyZhangHason/Teacher-Persona
Teacher-Persona is a question answering model from RyZhangHason. Use it when the input is a question plus a passage. It is set up for transformers.
This model implements the Teacher Persona AI approach, designed to emulate the human qualities of an instructor rather than merely providing personalized content. It embodies the narrative elements, affective cues, an…
Downloads · 30 days
0
Access
Public
Updated Mar 15, 2025
Repo size
37 MB
Likes
1
Public
Click a slice to open those files.
.safetensors37 MB · 88%
From the Hugging Face model README
This model implements the Teacher Persona AI approach, designed to emulate the human qualities of an instructor rather than merely providing personalized content. It embodies the narrative elements, affective cues, and communication style of an educator to create a more humanized learning experience.
This model was developed using a fine-tuning approach on the Qwen2-1.5B-Instruct base model. Unlike traditional personalized AI systems that focus exclusively on content adaptation, this Teacher Persona AI embodies the relational and affective qualities of human teaching—elements such as empathy, warmth, and the ability to foster trust that are central to effective education.
This model is designed for educational contexts where humanized, engaging instruction is needed:
The model operates without system prompts, as it has been trained to consistently maintain its instructor persona.
The model was fine-tuned on several types of examples:
The model underwent a two-phase training process:
The model can be used with or without a system prompt. For best results:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# Load model and tokenizer
model_name = "RyZhangHason/Teacher-Persona"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
trust_remote_code=True,
device_map="auto"
)
def get_response(question):
input_text = f"<|im_start|>user\n{question}<|im_end|>\n<|im_start|>assistant\n"
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.9,
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
return response.split("<|im_start|>assistant\n")[-1].strip()
RyZhangHason