Kids Scroll Story Model (GGUF)

This repository hosts the on-device story generation model (story-model.gguf) and WebAssembly runtime (wllama.wasm) used by Kids Scroll โ€” a lightweight, offline-first Progressive Web App (PWA) designed for toddlers and young children.

๐Ÿ“– Model Overview

  • Model File: story-model.gguf (~26 MB)
  • Runtime File: wllama.wasm (~7.4 MB)
  • Architecture: Causal Transformer Decoder based on the TinyStories architecture by Microsoft Research.
  • Context Length: 128 tokens.
  • Primary Task: Autocomplete and generate simple, toddler-friendly short stories (ages 2โ€“6) on edge devices in real time without requiring a server backend or internet connection.

๐Ÿง  Training Data & Lineage

  • Base Architecture: TinyStories ("TinyStories: How Small Can Language Models Be and Still Speak Coherent English?" by Ronen Eldan and Yuanzhi Li, Microsoft Research).
  • Dataset: roneneldan/TinyStories consisting of ~2.1 million synthetic short stories generated by GPT-3.5 / GPT-4.
  • Vocabulary Focus: Tailored strictly to words and sentence structures understood by 3- to 4-year-old children (animals, sharing, adventures, bedtime, friendship).

๐Ÿš€ Usage

1. In Browser with wllama (WebAssembly)

import { Wllama } from '@wllama/wllama';

const wllama = new Wllama({
  'wllama.wasm': 'https://huggingface.co/thekosmix/kids-scroll-models/resolve/main/wllama.wasm'
});

// Load the model
const response = await fetch('https://huggingface.co/thekosmix/kids-scroll-models/resolve/main/story-model.gguf');
const blob = await response.blob();
await wllama.loadModel([blob], { n_ctx: 192 });

// Generate a story segment
const output = await wllama.createCompletion({
  prompt: 'Once upon a time, there was a little rabbit.',
  max_tokens: 100,
  temperature: 0.8,
  top_p: 0.9,
  stop: ['\n\n', 'The end.']
});

console.log(output.choices[0].text);

2. Using llama.cpp CLI

llama-cli -m story-model.gguf -p "Once upon a time, there was a friendly lion." -n 100 --temp 0.8

๐Ÿ›ก๏ธ Content Safety & Limitations

  • Context Window: The native training context is ~128 tokens. For multi-paragraph stories, client applications should generate short story segments and stitch them.
  • Knowledge Boundary: The model possesses no encyclopedic or factual world knowledge; it is specialized exclusively for imaginative children's narratives.
  • Client-Side Guardrails: In production (Kids Scroll), generated outputs are paired with client-side blocklist filtering (content-filter.js) and sentence trimming to guarantee age-appropriate content for kids.

๐Ÿ“œ Citation & Acknowledgements

If you use this model or dataset, please cite the original TinyStories research:

@article{eldan2023tinystories,
  title={TinyStories: How Small Can Language Models Be and Still Speak Coherent English?},
  author={Eldan, Ronen and Li, Yuanzhi},
  journal={arXiv preprint arXiv:2305.07759},
  year={2023}
}
Downloads last month
218
GGUF
Model size
24.4M params
Architecture
llama
Hardware compatibility
Log In to add your hardware

We're not able to determine the quantization variants.

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for thekosmix/kids-scroll-models

Quantized
(13)
this model

Dataset used to train thekosmix/kids-scroll-models

Paper for thekosmix/kids-scroll-models