Instructions to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ThePradip/minicpm5-1b-kids-storyteller-GGUF", filename="MiniCPM5-1B.Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ThePradip/minicpm5-1b-kids-storyteller-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThePradip/minicpm5-1b-kids-storyteller-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
- Ollama
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Ollama:
ollama run hf.co/ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
- Unsloth Studio
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ThePradip/minicpm5-1b-kids-storyteller-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for ThePradip/minicpm5-1b-kids-storyteller-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ThePradip/minicpm5-1b-kids-storyteller-GGUF to start chatting
- Pi
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Docker Model Runner:
docker model run hf.co/ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
- Lemonade
How to use ThePradip/minicpm5-1b-kids-storyteller-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.minicpm5-1b-kids-storyteller-GGUF-Q4_K_M
List all available models
lemonade list
Use Docker
docker model run hf.co/ThePradip/minicpm5-1b-kids-storyteller-GGUF:Q4_K_MMiniCPM5-1B Kids Storyteller — GGUF 🦁📖
A tiny, fast, on-device storyteller for children aged 2–5. It writes gentle, easy-to-picture stories and poems with simple words, sound effects, and a repeating refrain, and it runs on a laptop CPU with no GPU and no cloud API.
This repo is the 4-bit GGUF build (≈700 MB) for llama.cpp.
The full-precision (merged 16-bit) model is at
ThePradip/minicpm5-1b-kids-storyteller.
Built for the Build Small Hackathon (June 2026). Fine-tuned cheaply on a single Modal A10G.
This is the model that powers the Jungle Story Time app — both its cloud Story API
(served on Modal via llama.cpp) and its fully offline LOCAL_MODE=1.
Why on-device?
A storyteller for a toddler should be:
- fast — a 3-year-old will not wait 30 seconds;
- private — it hears your child's name, which should never leave the machine;
- cheap — it runs on the family laptop, no API bill;
- stylistically reliable — tiny sentences, sound words, a refrain repeated 3×.
Style is exactly what small-model fine-tuning is good at. At ~60 tokens/sec on an M-series MacBook CPU this 1B model is faster than a child can listen, runs on a free CPU-only Space, and the model that hears your kid's name never touches a server.
Files
| File | Quant | Size | Notes |
|---|---|---|---|
MiniCPM5-1B.Q4_K_M.gguf |
Q4_K_M | ≈700 MB | Recommended — best quality/size balance for CPU |
Quickstart
Python — llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="ThePradip/minicpm5-1b-kids-storyteller-GGUF",
filename="MiniCPM5-1B.Q4_K_M.gguf",
n_ctx=2048,
n_threads=8, # match your CPU cores
n_gpu_layers=0, # CPU-only; set -1 to offload to Metal/CUDA
verbose=False,
)
SYSTEM = ("You are a kind storyteller for children aged 2-5. Write tiny, happy, "
"easy-to-picture stories and poems with very simple words, sounds, "
"repetition, and nothing scary.")
# the exact prompt shape the model was fine-tuned and served on
prompt = ("Tell a story for Riya, age 3. It stars a yellow duck at the village pond. "
"It should help the child learn: the quack sound. Say Riya's name in the story. "
"Keep it very simple for a small child, easy to picture, with sounds and a "
"repeating line.")
out = llm.create_chat_completion(
messages=[{"role": "system", "content": SYSTEM},
{"role": "user", "content": prompt}],
max_tokens=340, temperature=0.8, top_p=0.95, repeat_penalty=1.08,
)
print(out["choices"][0]["message"]["content"])
Tip: the base MiniCPM5 supports a
<think>reasoning block. This model is trained with thinking disabled so stories stream instantly, but if you ever see<think>…</think>, strip it:re.sub(r"<think>.*?(</think>|$)", "", text, flags=re.S).
CLI — llama.cpp
# download just the GGUF
hf download ThePradip/minicpm5-1b-kids-storyteller-GGUF MiniCPM5-1B.Q4_K_M.gguf --local-dir .
# run it
llama-cli -m MiniCPM5-1B.Q4_K_M.gguf \
-p "Tell a tiny bedtime story for a 3-year-old about a sleepy bunny under the moon. Use sounds and a repeating line." \
-n 340 --temp 0.8 --top-p 0.95 --repeat-penalty 1.08
Recommended generation settings
| Param | Value | Why |
|---|---|---|
max_tokens |
340 | a full toddler story/poem, no padding |
temperature |
0.8 | playful but coherent |
top_p |
0.95 | |
repeat_penalty |
1.08 | refrains repeat on purpose; keep this gentle |
n_ctx |
2048 | plenty for these short stories |
Sample output
Prompt: "Riya, age 3, a yellow duck, the quack sound"
Riya sees a yellow duck at the pond. The duck quacks, quacks, quacks! His legs wiggle like little frogs. The water is warm and cool. See, see! Riya hops over one leg. The duck quacks, quacks, quacks! …
Refrain ✓ · sound words ✓ · tiny sentences ✓ · the child's name ✓
The base model
| Base | openbmb/MiniCPM5-1B — OpenBMB, May 2026, Apache-2.0 |
| Parameters | ~1B |
| Architecture | LlamaForCausalLM (standard Llama layout) |
| Chat format | ChatML (`< |
Why this model. A toddler storyteller is a narrow style task, not a reasoning task.
Small models are style sponges, so a 1B is the right tool: it fine-tunes in seconds, runs
on a CPU, and keeps data on-device. MiniCPM5-1B is a plain LlamaForCausalLM, so the whole
Unsloth toolchain works with zero patches — unlike
hybrid-Mamba models, which need a heavier TRL+PEFT path. We train with the model's own chat
template and enable_thinking=False so stories stream with no visible <think> block.
The dataset
Fine-tuned on kids-stories-personalized — a hand-authored set, not scraped and not
bulk-generated by a frontier API. We tried a free vision model as teacher (8–17% usable) and
a strong open model as teacher (~67% usable); hand-authoring was the only path to 100% usable,
on-style data.
- ~258 story/poem plots (round 2) across 12 categories: animals, birds, colors, shapes, surroundings, family, friends, environment, morals, speech practice ("Ba, ba, ball!"), early learning (counting, big/small), and rhymes.
- Authored as markdown blocks with a metadata header (
kid · age · characters · place · category · teach) so non-programmers can write them. - Published openly:
build-small-hackathon/kids-story.
Style contract — machine-enforced by author_kit.py before anything is published:
- 30–170 words · average sentence ≤ 9 words
- a refrain repeated 3×
- at least one sound word (quack, splash, whoosh…)
- a visualizability score — concrete picture-words a toddler can see; abstract stories rejected
- nothing scary · clean ending · the child's name appears
How it was fine-tuned
| Method | LoRA via Unsloth — r=16, α=32, dropout 0.05, bias none |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj (attention + MLP) |
| Loss masking | train_on_responses_only — loss on the story tokens only, not the prompt |
| Optimizer | lr 2e-4, cosine, 3% warmup · batch 4 × grad-accum 4 · bf16 · 3 epochs |
| Quantization | merged to 16-bit, then exported to Q4_K_M GGUF via push_to_hub_gguf |
| Compute | Modal A10G (single GPU) |
Validation gate. The training script refuses to push to the Hub unless the model proves itself: it generates 5 unseen test stories (new child names, story + poem, different lessons) and requires ≥4 to pass (length, the child's name present, safety wordlist), and the final loss to be ≥10% below the start. Fail → the adapter is parked on the Modal volume and nothing is published.
Results
| Round | Examples | Epochs | Loss | Validation |
|---|---|---|---|---|
| 1 | 69 | 5 | 2.61 → 2.04 (−22%) | 2/3 pass |
| 2 | 258 | 3 | 2.64 → 1.54 (−42%) | 5/5 pass ✅ |
Round 1 exposed the classic small-model failure — asked for a story about Veer, it wrote a perfect on-style story starring Sam. Style transfers reliably from a tiny set; name-faithfulness needed more data. Round 2 (258 examples) fixed exactly that.
Intended use & limitations
Intended for generating short, gentle children's stories and poems in English for ages 2–5, with adult supervision.
Limitations:
- A 1B model occasionally drifts on the child's name or lets the lesson fade — keep an adult in the loop.
- English only. Style is tuned narrowly for toddlers; it is not a general assistant.
- Always review generated text before reading it to a child.
Ethics
This is a storyteller model only. The companion voice in the app uses consented/synthetic narration — we do not clone children's voices.
Links
- Full model (bf16):
ThePradip/minicpm5-1b-kids-storyteller - Dataset:
build-small-hackathon/kids-story - Demo Space:
build-small-hackathon/jungle-story-time - Base model:
openbmb/MiniCPM5-1B
Apache-2.0 · Build Small Hackathon, June 2026 · MiniCPM5-1B · Unsloth · llama.cpp
- Downloads last month
- 737
4-bit
Model tree for ThePradip/minicpm5-1b-kids-storyteller-GGUF
Base model
openbmb/MiniCPM5-1B
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "ThePradip/minicpm5-1b-kids-storyteller-GGUF"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThePradip/minicpm5-1b-kids-storyteller-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'