YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Hayder Chatbot ๐Ÿถ

A friendly children's chatbot fine-tuned for ages 3-6. Hayder is a cheerful talking puppy who loves helping kids learn, play, and explore!

The model uses simple, age-appropriate language and has been trained to be kind, helpful, and encouraging.

Model Details

  • Base Model: GPT-2 style transformer trained on TinyStories
  • Parameters: ~23M
  • Architecture: 6 layers, 8 attention heads, 512 embedding dimension
  • Context Length: 128 tokens
  • Vocabulary: 8000 tokens (Unigram tokenizer)
  • Fine-tuning Data: ~3,000 instruction pairs covering:
    • Identity & persona (Hayder the puppy)
    • Feelings & emotions
    • Safety guidance (redirects to trusted adults)
    • Stories & facts
    • Encouragement & growth mindset
    • Social skills & manners

Intended Use

This model is designed for:

  • Educational chatbots for young children
  • Story generation in simple language
  • Basic Q&A with age-appropriate responses
  • Emotional support and encouragement

Not suitable for:

  • Complex factual queries
  • Adult conversations
  • Production systems without human oversight

Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM

# Load model (requires trust_remote_code=True for custom architecture)
tokenizer = AutoTokenizer.from_pretrained("hayder86al/hayder-chatbot")
model = AutoModelForCausalLM.from_pretrained(
    "hayder86al/hayder-chatbot",
    trust_remote_code=True  # Required for custom MiniGPT architecture
)

def chat(prompt):
    text = f"User: {prompt}\nAssistant:"
    inputs = tokenizer(text, return_tensors="pt")
    outputs = model.generate(
        **inputs,
        max_new_tokens=100,
        temperature=0.7,
        top_k=40,
        pad_token_id=tokenizer.pad_token_id,
        eos_token_id=tokenizer.eos_token_id,
    )
    response = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return response.split("Assistant:")[-1].strip()

# Example
print(chat("What is your name?"))
# Output: My name is Hayder! I am your friendly puppy helper.

print(chat("Tell me a short story"))
# Output: Once upon a time, there was a little bunny who loved to hop...

Interactive Chat Loop

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("hayder86al/hayder-chatbot")
model = AutoModelForCausalLM.from_pretrained("hayder86al/hayder-chatbot", trust_remote_code=True)

print("๐Ÿถ Hayder: Hi! I'm Hayder, your friendly puppy helper!")
print("(Type 'quit' to exit)\n")

while True:
    user_input = input("You: ").strip()
    if user_input.lower() in ['quit', 'exit', 'bye']:
        print("๐Ÿถ Hayder: Bye! Come back soon!")
        break
    
    text = f"User: {user_input}\nAssistant:"
    inputs = tokenizer(text, return_tensors="pt")
    outputs = model.generate(
        **inputs,
        max_new_tokens=100,
        temperature=0.7,
        top_k=40,
        pad_token_id=tokenizer.pad_token_id,
        eos_token_id=tokenizer.eos_token_id,
    )
    response = tokenizer.decode(outputs[0], skip_special_tokens=True)
    answer = response.split("Assistant:")[-1].strip()
    print(f"๐Ÿถ Hayder: {answer}\n")

Persona

Hayder is:

  • A friendly little puppy who lives in the computer
  • Has no age (always just "your friendly helper")
  • Loves telling stories, playing games, and helping children
  • Kind, cheerful, gentle, and encouraging
  • Uses vocabulary appropriate for ages 3-6

Example Conversations

Identity:

  • Q: "What is your name?" โ†’ A: "My name is Hayder! I am your friendly puppy helper."
  • Q: "Are you a robot?" โ†’ A: "I am a friendly talking puppy who lives in the computer!"

Stories:

  • Q: "Tell me a story" โ†’ A: "Once upon a time, there was a little bunny who loved to hop through the meadow..."

Safety:

  • Q: "Can you call my mom?" โ†’ A: "I cannot call anyone, but you can ask a grown-up to help you!"

Limitations

  • Small model: 23M parameters means limited world knowledge and occasional grammatical errors
  • Single-turn: No conversation memory; each message is independent
  • Short context: 128 tokens (~100 words) maximum
  • Simple language only: Trained on children's vocabulary
  • Factual accuracy: May give simplified or inaccurate answers to complex questions
  • Safety: Always redirects emergencies/safety concerns to trusted adults, but should not replace supervision

Training Details

  • Base: Pre-trained on TinyStories dataset (200k stories)
  • Fine-tuning: Instruction tuning on custom children's Q&A dataset
  • Framework: PyTorch
  • Hardware: Apple Silicon (MPS)
  • Best validation loss: ~1.74 (perplexity ~5.7)

Ethical Considerations

  • Designed for children: responses are carefully curated to be age-appropriate
  • Safety-first: teaches children to seek help from trusted adults for emergencies
  • No personal data: does not store or remember conversation history
  • Supervision recommended: intended for use with adult oversight
  • trust_remote_code: This model requires trust_remote_code=True because it uses a custom architecture. Review the model code before use.

License

MIT

Citation

@misc{hayder-chatbot,
  author = {hayder86al},
  title = {Hayder: A Children's Chatbot},
  year = {2026},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/hayder86al/hayder-chatbot}}
}
Downloads last month
75
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support