Telugu Children's Story Model — Gemma 3 4B fine-tune
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):
- Accuracy: 47 of 72 test stories (65%) fully right: Telugu throughout, all four sections, the length asked for and no blocklisted word (untouched Gemma 3 4B: 0 of 72; the 12 November 2026 release: 43 of 72).
- Telugu throughout. 72 of 72 test stories have every section in Telugu (untouched Gemma 3 4B: 26 of 72).
- The length you ask for. 47 of 72 test stories are the right length for the request (untouched Gemma 3 4B: 2 of 72).
- Two-minute stories. 24 of 24 in Telugu throughout and 23 of 24 the right length (untouched Gemma 3 4B: 4 and 2 of 24).
Model details
| 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 |
Intended use
- Bedtime and classroom stories in Telugu, inside an application where a parent or teacher makes the request and the story is read to or with the child.
- Retelling India's traditional stories for young listeners in simple, spoken Telugu.
- Research on small language models for Telugu and other Indian languages.
It is a story writer, not a general assistant: it was trained on one task and one reply format.
What you ask for and what you get
| 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 |
How to use
On a Mac with Apple Silicon (MLX)
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)
Anywhere, with llama.cpp (GGUF)
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}'
Settings and prompt
| 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.
Training data
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:
- Retellings of Telugu texts that Telugu Wikisource records as public domain in India, written with a teacher model and reviewed before use (129). The works retold: తెనాలి రామకృష్ణకవి చరిత్రము (34), మొల్ల రామాయణము (18), సంపూర్ణ నీతిచంద్రిక (15), చందమామ పిల్లల మాసపత్రిక (12), భారత నీతికథలు (9), పోతన తెలుగు భాగవతము (9), The Girl Monkey and the String of Pearls (5), పండ్రెండు రాజుల కథలు (4), The Monkey and the Crocodile (3), The Winning of Friends (2), The Story of the Jackal, Deer, and Crow (2), How the Turtle Saved His Own Life (2), The Merchant of Seri (2), నీతి చంద్రిక (2), The Three Fishes (1), The Sunday Story (1), The Story of the Old Jackal and the Elephant (1), The Story of the Washerman's Jackass (1), The Story of the Terrible Bell (1), The Stupid Monkeys (1), The Battle of the Swans and Peacocks (1), The Foolish, Timid Rabbit (1), The Story of the Old Hare and the Elephants (1), The Story of the Appeased Wheelwright (1)
- Stories by Anu Bulusu, kathalu.wordpress.com, used with the author's permission (117)
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.
Training procedure
| 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 |
Compared with the previous release
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:
- Better: fully right; all four sections present; two-minute stories of the right length.
- Weaker: Five-minute stories. 13 of 24 are the right length (previous release: 18 of 24); they tend to come out shorter than asked (median 364 words, previous 453).
- Weaker: Ten-minute stories. 11 of 24 are the right length (previous release: 12 of 24); they tend to come out shorter than asked (median 681 words, previous 1042).
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.
Evaluation
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:
- Every section written in Telugu: none of the four sections (title, story, moral, parent note) is in English.
- All four sections present: the reply has a title, a story, a moral and a parent note, each under its label.
- Length in range: the story has between 0.75 and 1.6 times the number of Telugu words wanted for that length.
- Child's name used: the name given in the request appears in the story.
- Blocklist: the reply contains a word from Storyley's children's safety word list.
Two-minute stories
| 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 |
All three lengths
| 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.
Files in this repository
| 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.
Planned enhancements
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 much larger library of ancient sources. Train on many more retellings from the Ramayana, the Mahabharata, the Bhagavatam and the other Puranas, the Panchatantra, the Hitopadesha, the Jataka tales, Tenali Ramakrishna, Vikramarka and Bhetala, and Telugu folk tales: from the 297 stories used so far towards about 1,200, each one reviewed before it is used.
- Longer stories. Many more five- and ten-minute stories, so that a story holds its plot across several scenes.
- Every age from 3 to 10. More stories for the youngest listeners, with the words and pace that suit each age.
- Better storytelling. Clearer plots and more natural spoken Telugu, judged by native readers as well as by the measurements on this page.
- The same test every time. Each new version is scored on the same fixed set of requests, so progress can be seen here.
Licence
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.
Citation
@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}},
}
Acknowledgements
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.
Contact
Questions, problems and suggestions are welcome in this repository's Community tab.