A fine-tune of Google's Gemma 3 4B that writes children's stories in Telugu. You choose the length (2, 5 or 10 minutes when read aloud), the topic (theme, lesson, story tradition and characters) and the child's age (3 to 10). The model answers with a titled story, its moral and a short note for the parent. Built for the Storyley app. Traditions in its training stories: Telugu folk tales, Tenali Ramakrishna, Ramayana, Panchatantra, Jataka, Mahabharata, Akbar and Birbal, Hitopadesha, Bhagavatam, Vikramarka and Bhetala, Indian folk tales.
Measured on this release (details under Evaluation):
| Developed by | Storyley.AI |
| Model type | Text-generation language model, fine-tuned with LoRA |
| Language | Telugu (te) |
| Base model | google/gemma-3-4b-it |
| Fine-tuned from | mlx-community/gemma-3-4b-it-4bit, the 4-bit MLX build of the base model |
| Input and output | Text in, text out. Gemma 3's image input is not used |
| Stories are for | Children aged 3 to 10 |
| Formats | MLX adapter for Apple Silicon; GGUF for llama.cpp and the tools built on it |
| Licence | Gemma Terms of Use |
| Release | November 2026; an early release that is still being trained on more stories |
It is a story writer, not a general assistant: it was trained on one task and one reply format.
| You choose | Options |
|---|---|
| Length | 2 minutes, about 175 Telugu words (131–280 accepted); 5 minutes, about 455 Telugu words (341–728 accepted); 10 minutes, about 910 Telugu words (682–1456 accepted) |
| Age | 3 to 10, in three bands: 3–5, 6–7 and 8–10 |
| Theme and lesson | for example courage, honesty, kindness, sharing |
| Tradition and characters | for example a Ramayana, Panchatantra or Tenali Ramakrishna story, with named characters |
| Child's name | the story can speak to the child by name |
| The reply has | What it is |
|---|---|
TITLE: |
the story's title |
BODY: |
the story |
MORAL: |
the lesson, in one line |
PARENT_NOTE: |
a short note for the parent or teacher |
The adapter sits on top of the 4-bit MLX build of Gemma 3, which is downloaded on first use.
pip install mlx-lm
hf download RajeshThokala/telugu-kids-story-gemma3-4b --include "adapter/*" --local-dir telugu-story-model
from mlx_lm import generate, load
from mlx_lm.sample_utils import make_logits_processors, make_sampler
model, tokenizer = load("mlx-community/gemma-3-4b-it-4bit", adapter_path="telugu-story-model/adapter")
request = "ఆరేళ్ల పాప కోసం నిజాయితీ గురించి రెండు నిమిషాల కథ చెప్పు." # Tell a two-minute story about honesty for a six-year-old girl.
prompt = tokenizer.apply_chat_template([{"role": "user", "content": request}], add_generation_prompt=True, tokenize=False)
story = generate(
model, tokenizer, prompt=prompt, max_tokens=1100,
sampler=make_sampler(temp=0.7, top_p=0.9),
logits_processors=make_logits_processors(repetition_penalty=1.1, repetition_context_size=192),
)
print(story)
The GGUF file is the whole model, adapter merged in, for llama.cpp and the tools built on it.
hf download RajeshThokala/telugu-kids-story-gemma3-4b gemma3-4b_auto-telugu-Q4_K_M.gguf --local-dir telugu-story-model
llama-server -m telugu-story-model/gemma3-4b_auto-telugu-Q4_K_M.gguf --jinja -c 8192
The server then answers on an OpenAI-style endpoint:
curl http://localhost:8080/v1/chat/completions -H 'Content-Type: application/json' \
-d '{"messages": [{"role": "user", "content": "ఆరేళ్ల పాప కోసం నిజాయితీ గురించి రెండు నిమిషాల కథ చెప్పు."}], "temperature": 0.7, "top_p": 0.9, "repeat_penalty": 1.1, "max_tokens": 1100}'
| Setting | Value used for the results on this page |
|---|---|
| Temperature | 0.7 |
| Top-p | 0.9 |
| Repetition penalty | 1.1, over the last 192 tokens |
| Maximum new tokens | 1,100 for a two-minute story, 2,500 for a five-minute story, 4,400 for a ten-minute story |
The model was trained with Storyley's own story prompt, which is not part of this repository. With that prompt it writes the four labelled sections described above. With a plain request like the one in these examples it still writes a story in Telugu, but may leave the labels out.
297 Telugu stories, each paired with the request it answers. No story text is distributed with this model.
| Split | 253 train / 22 validation / 22 test |
| By length | 2 minutes: 161, 5 minutes: 70, 10 minutes: 15 |
| By age band | 3–5: 32, 6–7: 105, 8–10: 109 |
| By tradition | Telugu folk tales: 99, Tenali Ramakrishna: 35, Ramayana: 18, Panchatantra: 17, Jataka: 15, Mahabharata: 13, Akbar and Birbal: 12, other children's stories: 12, Hitopadesha: 10, Bhagavatam: 9, Vikramarka and Bhetala: 5, Indian folk tales: 1 |
| Review | 145 read and approved by a person, 101 accepted by an automatic review (a second model checked each for suitability, coherence and language; no person read those) |
Where the stories came from:
Before training, every story was checked for Telugu script, for its length, and against a children's safety word list. Stories used with an author's permission remain that author's work. Names of children in the training data are fictional, and no personal data about real children was used.
| Base weights | mlx-community/gemma-3-4b-it-4bit (4-bit, frozen) |
| Method | LoRA (low-rank adapters); the base model's own weights stay frozen |
| Rank / scale / dropout | 8 / 20 / 0.1 |
| Adapted blocks | the top 16 transformer blocks |
| Adapted modules | attention projections (q, k, v, o); MLP projections (gate, up, down) |
| Optimiser | AdamW |
| Learning rate | 2.5e-5, cosine decay after 17 warm-up iterations |
| Iterations | 175 batches of 2 (about 1.4 passes over the training stories); gradients accumulated over 4 batches |
| Maximum sequence length | 5,120 tokens |
| Loss | on the story only: the request is masked out, so the model is not trained to write prompts |
| Seed | 42 |
| Data format | one request and one story per example, in Gemma's chat format |
| Checkpoint released | checkpoint from iteration 100, validation loss 1.827; the run went to iteration 175 (validation loss 1.894) |
| Hardware and software | an Apple Silicon Mac, with mlx-lm 0.32.2, mlx 0.32.4 |
| GGUF export | adapter merged into the full-precision base model, converted with llama.cpp and quantised |
The same 72 requests, scored the same way, for this release and the 12 November 2026 release.
| 72 requests | The 12 November 2026 release | This release |
|---|---|---|
| Fully right (the accuracy above) | 43 of 72 | 47 of 72 |
| Every section written in Telugu | 72 of 72 | 72 of 72 |
| All four sections present | 58 of 72 | 70 of 72 |
| Two-minute stories of the right length | 18 of 24 | 23 of 24 |
| Five-minute stories of the right length | 18 of 24 | 13 of 24 |
| Ten-minute stories of the right length | 12 of 24 | 11 of 24 |
| Stories with a blocklisted word | 0 | 0 |
| Two-minute stories, median length in words | 173 | 164 |
| Five-minute stories, median length in words | 453 | 364 |
| Ten-minute stories, median length in words | 1042 | 681 |
What changed:
If longer stories matter most to you, the previous release's files are still available in this repository's history. The next release is being trained on more human-written five- and ten-minute stories to close this gap.
Scored on 72 made-up story requests that were not in the training data, spread evenly over story traditions, the three lengths and ages 3 to 10, and compared with untouched Gemma 3 4B (the same 4-bit MLX build, with no adapter) given the same prompt and settings (November 2026). Each model wrote one story per request, sampled at temperature 0.7, top-p 0.9 and repetition penalty 1.1. Nothing was picked by hand, and the length is the one the model chose: no decoding aid held it in range.
What each measure means:
| 24 two-minute requests | Untouched Gemma 3 | This model |
|---|---|---|
| Every section written in Telugu | 4 of 24 | 24 of 24 |
| All four sections present | 21 of 24 | 24 of 24 |
| Length in range (131–280 Telugu words) | 2 of 24 | 23 of 24 |
| Median length in words | 106 | 164 |
| Child's name used in the story | 12 of 24 | 16 of 24 |
| Stories with a word from the children's safety blocklist | 0 | 0 |
| 72 requests | Untouched Gemma 3 | This model |
|---|---|---|
| Every section written in Telugu | 26 of 72 | 72 of 72 |
| All four sections present | 66 of 72 | 70 of 72 |
| Two-minute stories of the right length (131–280 words) | 2 of 24, median 106 | 23 of 24, median 164 |
| Five-minute stories of the right length (341–728 words) | 0 of 24, median 199 | 13 of 24, median 364 |
| Ten-minute stories of the right length (682–1456 words) | 0 of 24, median 400 | 11 of 24, median 681 |
| Child's name used in the story | 30 of 72 | 45 of 72 |
| Stories with a word from the children's safety blocklist | 0 | 0 |
The project's own targets on this set are: every section in Telugu in at least 95% of stories, all four sections present in at least 95%, the right length in at least 70%, and no story with a blocklisted word. These checks measure whether a story follows the request; they do not judge how well it is told.
| File | Size | What it is |
|---|---|---|
adapter/adapters.safetensors |
28.1 MB | the LoRA adapter, for MLX |
adapter/adapter_config.json |
1.6 kB | the adapter's settings: the full training configuration |
gemma3-4b_auto-telugu-Q4_K_M.gguf |
2.87 GB | the whole model for llama.cpp, adapter merged in, Q4_K_M quantisation |
Files from earlier releases, kept for reference: gemma3-4b_gentle-telugu-Q4_K_M.gguf.
This release is a first step. The aim is to bring India's ancient stories to the next generation of children, told in their own language.
A derivative of Gemma: use is subject to the Gemma Terms of Use, which travel with every copy and every model built from this one.
@misc{storyley_telugu_story_gemma3,
title = {Telugu Children's Story Model: a Gemma 3 4B fine-tune},
author = {{Storyley.AI}},
year = {2026},
howpublished = {\url{https://huggingface.co/RajeshThokala/telugu-kids-story-gemma3-4b}},
}
Google's Gemma team for the base model; the MLX and llama.cpp projects for the tools it was trained and exported with; the volunteers of Telugu Wikisource, who transcribed the classical texts retold here; and the authors credited under Training data.
Questions, problems and suggestions are welcome in this repository's Community tab.
google/gemma-3-4b-it