Instructions to use ajibawa-2023/Young-Children-Storyteller-Mistral-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ajibawa-2023/Young-Children-Storyteller-Mistral-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ajibawa-2023/Young-Children-Storyteller-Mistral-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ajibawa-2023/Young-Children-Storyteller-Mistral-7B") model = AutoModelForCausalLM.from_pretrained("ajibawa-2023/Young-Children-Storyteller-Mistral-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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ajibawa-2023/Young-Children-Storyteller-Mistral-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ajibawa-2023/Young-Children-Storyteller-Mistral-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": "ajibawa-2023/Young-Children-Storyteller-Mistral-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ajibawa-2023/Young-Children-Storyteller-Mistral-7B
- SGLang
How to use ajibawa-2023/Young-Children-Storyteller-Mistral-7B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ajibawa-2023/Young-Children-Storyteller-Mistral-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": "ajibawa-2023/Young-Children-Storyteller-Mistral-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "ajibawa-2023/Young-Children-Storyteller-Mistral-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": "ajibawa-2023/Young-Children-Storyteller-Mistral-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ajibawa-2023/Young-Children-Storyteller-Mistral-7B with Docker Model Runner:
docker model run hf.co/ajibawa-2023/Young-Children-Storyteller-Mistral-7B
Young-Children-Storyteller-Mistral-7B
This model is based on my dataset Children-Stories-Collection which has over 0.9 million stories meant for Young Children (age 6 to 12).
Drawing upon synthetic datasets meticulously designed with the developmental needs of young children in mind, Young-Children-Storyteller is more than just a toolβit's a companion on the journey of discovery and learning. With its boundless storytelling capabilities, this model serves as a gateway to a universe brimming with wonder, adventure, and endless possibilities.
Whether it's embarking on a whimsical adventure with colorful characters, unraveling mysteries in far-off lands, or simply sharing moments of joy and laughter, Young-Children-Storyteller fosters a love for language and storytelling from the earliest of ages. Through interactive engagement and age-appropriate content, it nurtures creativity, empathy, and critical thinking skills, laying a foundation for lifelong learning and exploration.
Rooted in a vast repository of over 0.9 million specially curated stories tailored for young minds, Young-Children-Storyteller is poised to revolutionize the way children engage with language and storytelling.
Kindly note this is qLoRA version, another exception.
GGUF & Exllama
Standard Q_K & GGUF: Link
Exllama: TBA
Special Thanks to MarsupialAI for quantizing the model.
Training
Entire dataset was trained on 4 x A100 80GB. For 3 epoch, training took more than 30 Hours. Axolotl codebase was used for training purpose. Entire data is trained on Mistral-7B-v0.1.
Example Prompt:
This model uses ChatML prompt format.
<|im_start|>system
You are a Helpful Assistant who can write educational stories for Young Children.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
You can modify above Prompt as per your requirement.
I want to say special Thanks to the Open Source community for helping & guiding me to better understand the AI/Model development.
Thank you for your love & support.
Example Output
Example 1
Example 2
Example 3
Open LLM Leaderboard Evaluation Results
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 71.08 |
| AI2 Reasoning Challenge (25-Shot) | 68.69 |
| HellaSwag (10-Shot) | 84.67 |
| MMLU (5-Shot) | 64.11 |
| TruthfulQA (0-shot) | 62.62 |
| Winogrande (5-shot) | 81.22 |
| GSM8k (5-shot) | 65.20 |
- Downloads last month
- 69
Model tree for ajibawa-2023/Young-Children-Storyteller-Mistral-7B
Dataset used to train ajibawa-2023/Young-Children-Storyteller-Mistral-7B
Spaces using ajibawa-2023/Young-Children-Storyteller-Mistral-7B 14
Evaluation results
- normalized accuracy on AI2 Reasoning Challenge (25-Shot)test set Open LLM Leaderboard68.690
- normalized accuracy on HellaSwag (10-Shot)validation set Open LLM Leaderboard84.670
- accuracy on MMLU (5-Shot)test set Open LLM Leaderboard64.110
- mc2 on TruthfulQA (0-shot)validation set Open LLM Leaderboard62.620
- accuracy on Winogrande (5-shot)validation set Open LLM Leaderboard81.220
- accuracy on GSM8k (5-shot)test set Open LLM Leaderboard65.200


