Download README.md from ZygAI/ZygAI-DS: direct link, hf CLI and curl.
- Browser
- Download file 15.8 kB
-
https://huggingface.co/ZygAI/ZygAI-DS/resolve/main/README.md
- Command line
-
hf download hf://ZygAI/ZygAI-DS/README.md
-
curl -L -o README.md https://huggingface.co/ZygAI/ZygAI-DS/resolve/main/README.md
license: apache-2.0
language:
- en
pipeline_tag: text-generation
tags:
- nintendo-ds
- nds
- homebrew
- retro-computing
- tiny
- int8
- offline
- on-device
- gru
- n-gram
- tinystories
- llama
- zygai
- manikineko
- rag
- tool-use
datasets:
- roneneldan/TinyStories
- AdvancedDataIntelligence/glm5.2-general-distill
- wikimedia/wikipedia
base_model:
- sprapp/eeny-tinystories-999k
- karpathy/tinyllamas
base_model_relation: quantized
ZygAI DS v0.2: tiny offline AI for the Nintendo DS
Language models that run fully offline on a Nintendo DS Lite (ARM9 at 67 MHz, 4 MB RAM, no floating-point unit), started from an R4-style flashcart. Type a question on the touch screen, press A, and the top screen writes the answer. The same app also runs two small TinyStories transformers made by others, which write short stories.
New in v0.2:
- An encyclopedia on the SD card: 234,022 articles from Simple English Wikipedia in one 141 MB file. "Who invented the telephone" is looked up in 10 ms on a real DS Lite and answered with the sentence that fits: "Alexander Graham Bell was the first person to patent the telephone, in 1876." See Encyclopedia.
- 47 tool tags: answers with the time and date from the DS clock, your name and birthday from the DS settings, a calculator, unit conversion, prime checks, letter counting, a note it remembers and a stopwatch. See Tool tags.
Made by Manikineko LLC / ZygAI. This repository
holds the compiled app (.nds) and the models (.zym), ready to copy to a
microSD card. Website: manikineko.com
Screenshots from the melonDS emulator. The app also runs on a real DS Lite.
Quick start
- Download ZygAI-DS-sdcard.zip (about 63 MB; 147 MB unzipped).
- Unzip it into the root of your flashcart's microSD card:
/ZygAI-DS.nds the app: the card root or your games folder /zygai/ the models: must be in the root and named exactly "zygai" /zygai/facts.zkb the encyclopedia (141 MB); delete it if you don't want it - Put the card in the flashcart, start the DS and pick ZygAI-DS.nds.
- Type
what is zygaion the touch keyboard and press A. Then trywho invented the telephoneorwhat time is it.
The flashcart menu has to patch the app's DLDI driver so the app can read
the SD card. Most menus do this by themselves. If the top screen says
SD: not available, patch ZygAI-DS.nds with your cart's DLDI driver (for
example with dlditool). Without the SD card the app still runs, using a
small model built into the .nds.
Models
| File | Writes | Model | Size | Speed on a DS Lite | License |
|---|---|---|---|---|---|
gru512.zym (the app starts with it) |
answers to questions | character GRU, 512 units, 916K parameters, int8 | 1.1 MB | 16 chars/s | Apache-2.0 |
stories-eeny.zym |
short children's stories (the best ones) | eeny 999K by sprapp: Llama-style transformer, 7 layers, 4096-token BPE, int8 | 1.2 MB | 41 chars/s | Apache-2.0 |
stories260k.zym |
short children's stories, simpler | stories260K by Andrej Karpathy: Llama-style transformer, 5 layers, 512-token BPE, int8 | 300 KB | 55 chars/s | MIT |
ngram-sharp.zym |
answers that stay close to the training text, with tool tags | character n-gram, order 24 | 1.8 MB | instant | Apache-2.0 |
ngram-wild.zym |
chaotic remixes of the answers, with tool tags | character n-gram, order 6 | 570 KB | instant | Apache-2.0 |
built into ZygAI-DS.nds |
answers with tool tags, when the SD card can't be read | character n-gram, order 12 | 380 KB | instant | Apache-2.0 |
facts.zkb |
the encyclopedia (not a model): opening sentences of Simple English Wikipedia articles | title and word index | 141 MB | 10 ms per search | CC BY-SA 4.0 |
The n-gram models and the built-in model were retrained for v0.2 and know
the tool tags. gru512.zym is the v0.1 model: it does not write tool tags
yet (it needs retraining), but the encyclopedia answers for it too, because
the app looks fact questions up before any model runs.
Press SELECT to switch models. The speeds were measured on a real DS Lite at the start of an answer or story (see below). Story models slow down as a story grows, to 12–14 chars/s by token 500. "Instant" means the on-screen typing effect (180 chars/s) is the limit.
Controls
| Button | Action |
|---|---|
| touch keyboard | type the prompt (Bksp deletes) |
| A | generate. Story models: an empty prompt starts a new story; text becomes the story's first words |
| B | stop and clear the text; press again to clear the prompt |
| SELECT | switch to the next model |
| L / R | temperature down / up (0.3 to 2.0) |
| START | reset the random seed (the same prompt gives the same answer again) |
| Y | benchmark: appends tokens/s to zygai/bench.txt |
| X | long benchmark: speed per 64 tokens over 512 tokens, appended to zygai/bench.txt; hold B to stop |
The top screen shows the model, temperature, seed, RAM in use and the speed of the last answer.
Encyclopedia
zygai/facts.zkb holds the first sentences (up to 1,500 characters) of
234,022 Simple English Wikipedia articles, with a title index and a word
index. The DS never loads the file: a search reads a few index entries and
one article, a few KB when the question names a title.
- The app routes the question. "What is X", "who was X", "tell me about X", "what does X mean" and "define X" are answered from the encyclopedia when X is exactly an article's title. Fact questions ("who invented X", "how tall / big / old / far is X", "where do X live", "when was X", "what do X eat") are answered when the search is sure. The model does not run, and the status line shows "encyclopedia, 10 ms".
- The answer is the article's opening sentences, or the opening sentence plus the later one that fits the question (height, a year, an inventor, an author...). "When did the Titanic sink": "The RMS Titanic was a British passenger ship. At 11:40 PM on 14 April 1912, during the Titanic's first trip, it hit an iceberg in the Atlantic Ocean."
- The models also write
{FACT}for other ways to ask ("look up volcanoes"). If the search is not sure, the answer says it found nothing instead of guessing. - It picks a sentence; it does not understand it. Many measurements are missing from this Wikipedia dump (they were in templates), so "how tall is Mount Everest" gets no height. The text is from November 2023.
- Without
facts.zkbthe app works as in v0.1.
On a real DS Lite with an R4i Gold Pro a search for a title took 10 ms. Questions made of common words read more of the index (up to about 140 KB); their time on hardware is not measured yet, and should stay under about 100 ms. If the card is very fragmented, the boot screen says "slow seeks"; copying the file again to a freshly formatted card fixes that.
Tool tags
The Q&A models write placeholders such as {TIME} or {CALC}, and the
app replaces each one with a live value as the text appears:
| Ask | The answer uses |
|---|---|
| what time is it / what day is it / good morning | the DS clock |
| what is my name / when is my birthday / what is my favorite color | the DS settings |
| how is the battery | the battery ("fine" or "low") |
| what is 12 times 7 / 15% of 200 / 2 to the power of 10 | a calculator with exact fractions |
| convert 10 km to miles / square root of 2 / is 91 prime | conversions and math |
| 42 in binary / 2026 in roman numerals | number bases, Roman numerals |
| how many r's are in strawberry / hello backwards / sos in morse | letters |
| what day of the week was july 4 1776 / how many days until christmas | dates |
| roll a dice / flip a coin / rock paper scissors / pick a number | random picks |
| remember that my cat is called Tom / what did I tell you to remember | a note in zygai/note.txt |
| start the stopwatch / stop the stopwatch | a stopwatch |
| which model is loaded / how much RAM are you using | the app itself |
There are 47 tags in all. On a real DS Lite the time, the language, the battery, the stopwatch, the math and the name and birthday from the DS settings were all right. The note survives power-off. A tiny model cannot do arithmetic, so it learns to hand the question to the calculator.
What to expect
- Q&A models know about 400 topics written for this project: the bot itself, the DS, small talk, jokes and simple facts. In tests the GRU started its reply with a correct answer for 92% of trained questions, 29% of reworded questions it had never seen and 47% of questions with typos. Ask about anything else and it writes fluent but made-up answers: under a million parameters can learn the style of an answer, not the facts.
- Story models continue a story in the style of TinyStories (simple stories for small children). They don't answer questions or follow instructions. Start with "Once upon a time" or leave the prompt empty. The default temperature is 0.7; higher values make up more words.
- English only. The DS screen shows plain ASCII, so curly quotes and dashes in the story vocabularies appear as their ASCII equivalents.
Tested on
- A real DS Lite with an R4i Gold Pro flashcart (R4iMenu 4.3): the app and every model, including both benchmarks; in v0.2 also the encyclopedia (10 ms per title search), the clock, the DS settings, the battery ("fine"), the note on the SD card and the stopwatch. The low-battery answer is not checked on hardware yet.
- melonDS 1.1: the app and every model.
- Not tested: other flashcarts, DSi and 3DS. The app is a plain DS-mode program, so DS mode on those consoles should work.
How it works
- Integer-only. The DS's ARM9 has no floating-point unit, so inference uses only integers: int8 weights with one scale per row, 16- and 32-bit activations, and fixed-point tables for log2/exp2 (softmax, temperature) and the sigmoid. The inner loops run from the ARM9's fast on-chip instruction memory (ITCM).
- Story models are Llama-style transformers (RMSNorm, RoPE, grouped-query attention, SwiGLU) with a BPE tokenizer that also runs on the DS. They were converted from their authors' float weights to int8. On the same text the int8 versions lose little: stories260K scores 0.697 bits/token (float original: 0.692) and eeny 0.716 (float: 0.700). The context is capped at 512 tokens to keep the key/value cache in RAM. With eeny loaded the app uses about 2.8 MB of the 4 MB.
- Bit-exact. The DS engine writes exactly the same text as a Python reference implementation for the same seed.
- One file format. A
.zymfile is a set of little-endian sections with a CRC-32, used in place after loading. See docs/FORMAT.md. - Built with BlocksDS.
Speed
Measured on a real DS Lite (R4i Gold Pro) on 2026-12-05 with the app's benchmarks.
| Model | DS Lite | melonDS 1.1 |
|---|---|---|
| GRU 512 | 16.0 chars/s | 14.9 chars/s |
| eeny 999K | 10.0 tokens/s (41.0 chars/s) | 9.6 tokens/s (39.1 chars/s) |
| stories260K | 25.6 tokens/s (54.6 chars/s) | 25.5 tokens/s (53.7 chars/s) |
| n-grams | 44,000–53,000 chars/s | 81,000–91,000 chars/s |
The story models slow down as a story grows, because attention reads every earlier token. Over a 512-token run eeny goes from 9.6 to 3.6 tokens/s and stories260K from 28.1 to 6.1, so near the end both write a little slower than the GRU. Stories from A stop at 480 tokens at most and usually end much earlier.
The console writes exactly the same text as the emulator for the same seed.
If you run it on another console or flashcart, press Y and X on
each model and share the lines from zygai/bench.txt in the Community tab.
Training data
- Q&A models: question-and-answer topics and short stories written for
this project (v0.2: also answers with tool tags and
{FACT}). The GRU also trained on 3,729 shortened question-answer pairs from glm5.2-general-distill (CC BY-SA 3.0; prompts from databricks-dolly-15k, answers generated by glm-5.2). The n-gram models and the built-in model use only the project's own text. - Story models: trained by their authors on TinyStories (Eldan & Li, 2023).
Limitations
- These are tiny models. Answers are often wrong or made up, so don't rely on them for facts. The encyclopedia answers are Wikipedia sentences, but the search can pick the wrong article or a sentence that does not answer the question.
- Story models sometimes invent words or end a story abruptly.
- Long stories get slow: by token 500 the story models write 12–14 chars/s.
License and credits
- The ZygAI DS app and its Q&A models (
gru512.zym,ngram-*.zym, the built-in model): © 2026 Manikineko LLC / ZygAI, Apache License 2.0. stories260k.zym: converted from stories260K by Andrej Karpathy (karpathy/tinyllamas, from llama2.c), MIT License.stories-eeny.zym: converted from eeny by sprapp (sprapp/eeny-tinystories-999k), Apache License 2.0. Changes: weights quantized to int8, context capped at 512 tokens, tokenizer repacked for the DS.gru512.zymwas trained in part on glm5.2-general-distill by AdvancedDataIntelligence (CC BY-SA 3.0).facts.zkb: made from Simple English Wikipedia by Wikipedia contributors (the wikimedia/wikipedia dump of 2023-11-01), licensed CC BY-SA 4.0.facts.zkbis an adapted work (opening sentences, converted to ASCII, indexed) and is shared under the same license.ZygAI-DS.ndscontains BlocksDS libraries: libnds (zlib), crts (MPL-2.0), picolibc (BSD-style licenses) and libgcc (GPL-3.0 with the GCC Runtime Library Exception).
Full license texts and notices: THIRD_PARTY_NOTICES.md
and licenses/. The zip has the same files in its zygai/
folder.
ZygAI DS is unofficial homebrew, not affiliated with or endorsed by Nintendo. Nintendo DS is a trademark of Nintendo.
Files
| Path | Contents |
|---|---|
ZygAI-DS-sdcard.zip |
everything for the SD card, with the licenses |
sdcard/ |
the same app, models and encyclopedia, unzipped |
docs/FORMAT.md |
the .zym model file format |
SHA256SUMS |
checksums of the files above |
config.json |
release info (version, files, checksums); Hugging Face counts downloads by it |
LICENSE, THIRD_PARTY_NOTICES.md, licenses/ |
licenses |





