ZygAI DS v0.2: encyclopedia (facts.zkb, Simple English Wikipedia) and 47 tool tags
Browse filesFiles changed (9)
39 unmodified lines40414239 unmodified linessdcard/zygai/stories-eeny.zym filter=lfs diff=lfs merge=lfs -textsdcard/zygai/stories260k.zym filter=lfs diff=lfs merge=lfs -textimages/manikineko-logo.png filter=lfs diff=lfs merge=lfs -text39 unmodified lines4041424339 unmodified linessdcard/zygai/stories-eeny.zym filter=lfs diff=lfs merge=lfs -textsdcard/zygai/stories260k.zym filter=lfs diff=lfs merge=lfs -textimages/manikineko-logo.png filter=lfs diff=lfs merge=lfs -textsdcard/zygai/facts.zkb filter=lfs diff=lfs merge=lfs -text
17 unmodified lines1819202122232425262 unmodified lines293031323334351 unmodified line3738394041428 unmodified lines51525354555657585960616263648 unmodified lines73747576777879808116 unmodified lines989910010110210313 unmodified lines11711811912012112212347 unmodified lines1711721731741751761771786 unmodified lines18518618718818919019111 unmodified lines20320420520620720810 unmodified lines21922022122222322422517 unmodified lines- llama- zygai- manikinekodatasets:- roneneldan/TinyStories- AdvancedDataIntelligence/glm5.2-general-distillbase_model:- sprapp/eeny-tinystories-999k- karpathy/tinyllamas2 unmodified lines[](https://manikineko.com)# ZygAI DS v0.1: tiny offline AI for the Nintendo DSLanguage models that run fully offline on a **Nintendo DS Lite** (ARM9 at67 MHz, 4 MB RAM, no floating-point unit), started from an R4-style1 unmodified linescreen writes the answer. The same app also runs two small TinyStoriestransformers made by others, which write short stories.Made by [Manikineko LLC](https://manikineko.com) / ZygAI. This repositoryholds the compiled app (`.nds`) and the models (`.zym`), ready to copy to amicroSD card. Website: **[manikineko.com](https://manikineko.com)**8 unmodified lines1. Download**[ZygAI-DS-sdcard.zip](https://huggingface.co/ZygAI/ZygAI-DS/resolve/main/ZygAI-DS-sdcard.zip)**(3.4 MB).2. 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"```3. Put the card in the flashcart, start the DS and pick **ZygAI-DS.nds**.4. Type `what is zygai` on the touch keyboard and press **A**.The flashcart menu has to patch the app's DLDI driver so the app can readthe SD card. Most menus do this by themselves. If the top screen says8 unmodified lines| `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](https://huggingface.co/sprapp/eeny-tinystories-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](https://huggingface.co/karpathy/tinyllamas) 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 | character n-gram, order 24 | 1.6 MB | instant | Apache-2.0 || `ngram-wild.zym` | chaotic remixes of the answers | character n-gram, order 6 | 500 KB | instant | Apache-2.0 || built into `ZygAI-DS.nds` | answers, when the SD card can't be read | character n-gram, order 12 | 220 KB | instant | Apache-2.0 |Press **SELECT** to switch models. The speeds were measured on a real DSLite at the start of an answer or story (see [below](#speed)). Story models16 unmodified linesThe top screen shows the model, temperature, seed, RAM in use and thespeed of the last answer.## What to expect* **Q&A models** know about 400 topics written for this project: the bot13 unmodified lines## Tested on* A real DS Lite with an R4i Gold Pro flashcart (R4iMenu 4.3): the app andevery model, including both benchmarks.* melonDS 1.1: the app and every model.* Not tested: other flashcarts, DSi and 3DS. The app is a plain DS-modeprogram, so DS mode on those consoles should work.47 unmodified lines## Training data* **Q&A models:** 405 question-and-answer topics (946 phrasings) and shortstories, written for this project. The GRU also trained on 3,729shortened question-answer pairs from[glm5.2-general-distill](https://huggingface.co/datasets/AdvancedDataIntelligence/glm5.2-general-distill)(CC BY-SA 3.0; prompts from databricks-dolly-15k, answers generated by6 unmodified lines## Limitations* These are tiny models. Answers are often wrong or made up, so don't relyon them for facts.* 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.11 unmodified lines512 tokens, tokenizer repacked for the DS.* `gru512.zym` was trained in part on glm5.2-general-distill byAdvancedDataIntelligence (CC BY-SA 3.0).* `ZygAI-DS.nds` contains BlocksDS libraries: libnds (zlib), crts(MPL-2.0), picolibc (BSD-style licenses) and libgcc (GPL-3.0 with the GCCRuntime Library Exception).10 unmodified lines| Path | Contents ||---|---|| `ZygAI-DS-sdcard.zip` | everything for the SD card, with the licenses || `sdcard/` | the same app and models, unzipped || `docs/FORMAT.md` | the `.zym` model file format || `SHA256SUMS` | checksums of the files above || `LICENSE`, `THIRD_PARTY_NOTICES.md`, `licenses/` | licenses |17 unmodified lines1819202122232425262728292 unmodified lines323334353637381 unmodified line4041424344454647484950515253545556578 unmodified lines666768697071727374757677787980818 unmodified lines9091929394959697989910010110210310416 unmodified lines12112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218313 unmodified lines19719819920020120220320420520647 unmodified lines2542552562572582592602616 unmodified lines26826927027127227327427527611 unmodified lines28828929029129229329429529629729829930010 unmodified lines31131231331431531631717 unmodified lines- llama- zygai- manikineko- rag- tool-usedatasets:- roneneldan/TinyStories- AdvancedDataIntelligence/glm5.2-general-distill- wikimedia/wikipediabase_model:- sprapp/eeny-tinystories-999k- karpathy/tinyllamas2 unmodified lines[](https://manikineko.com)# ZygAI DS v0.2: tiny offline AI for the Nintendo DSLanguage models that run fully offline on a **Nintendo DS Lite** (ARM9 at67 MHz, 4 MB RAM, no floating-point unit), started from an R4-style1 unmodified linescreen writes the answer. The same app also runs two small TinyStoriestransformers made by others, which write short stories.**New in v0.2:*** **An encyclopedia on the SD card:** 234,022 articles from Simple EnglishWikipedia 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, in1876." See [Encyclopedia](#encyclopedia).* **47 tool tags:** answers with the time and date from the DS clock, yourname and birthday from the DS settings, a calculator, unit conversion,prime checks, letter counting, a note it remembers and a stopwatch. See[Tool tags](#tool-tags).Made by [Manikineko LLC](https://manikineko.com) / ZygAI. This repositoryholds the compiled app (`.nds`) and the models (`.zym`), ready to copy to amicroSD card. Website: **[manikineko.com](https://manikineko.com)**8 unmodified lines1. Download**[ZygAI-DS-sdcard.zip](https://huggingface.co/ZygAI/ZygAI-DS/resolve/main/ZygAI-DS-sdcard.zip)**(about 63 MB; 147 MB unzipped).2. 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```3. Put the card in the flashcart, start the DS and pick **ZygAI-DS.nds**.4. Type `what is zygai` on the touch keyboard and press **A**. Then try`who invented the telephone` or `what time is it`.The flashcart menu has to patch the app's DLDI driver so the app can readthe SD card. Most menus do this by themselves. If the top screen says8 unmodified lines| `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](https://huggingface.co/sprapp/eeny-tinystories-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](https://huggingface.co/karpathy/tinyllamas) 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 knowthe tool tags. `gru512.zym` is the v0.1 model: it does not write tool tagsyet (it needs retraining), but the encyclopedia answers for it too, becausethe app looks fact questions up before any model runs.Press **SELECT** to switch models. The speeds were measured on a real DSLite at the start of an answer or story (see [below](#speed)). Story models16 unmodified linesThe top screen shows the model, temperature, seed, RAM in use and thespeed of the last answer.## Encyclopedia`zygai/facts.zkb` holds the first sentences (up to 1,500 characters) of234,022 Simple English Wikipedia articles, with a title index and a wordindex. The DS never loads the file: a search reads a few index entries andone article, a few KB when the question names a title.* **The app routes the question.** "What is X", "who was X", "tell me aboutX", "what does X mean" and "define X" are answered from the encyclopediawhen 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", "whatdo 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 openingsentence plus the later one that fits the question (height, a year, aninventor, an author...). "When did the Titanic sink": "The RMS Titanicwas a British passenger ship. At 11:40 PM on 14 April 1912, during theTitanic's first trip, it hit an iceberg in the Atlantic Ocean."* **The models also write `{FACT}`** for other ways to ask ("look upvolcanoes"). If the search is not sure, the answer says it found nothinginstead of guessing.* It picks a sentence; it does not understand it. Many measurements aremissing from this Wikipedia dump (they were in templates), so "how tallis Mount Everest" gets no height. The text is from November 2023.* Without `facts.zkb` the 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 about100 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 tagsThe Q&A models write placeholders such as `{TIME}` or `{CALC}`, and theapp 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, thebattery, the stopwatch, the math and the name and birthday from the DSsettings were all right. The note survives power-off. A tiny model cannot doarithmetic, 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 bot13 unmodified lines## Tested on* A real DS Lite with an R4i Gold Pro flashcart (R4iMenu 4.3): the app andevery 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-batteryanswer 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-modeprogram, so DS mode on those consoles should work.47 unmodified lines## Training data* **Q&A models:** question-and-answer topics and short stories written forthis project (v0.2: also answers with tool tags and `{FACT}`). The GRU also trained on 3,729shortened question-answer pairs from[glm5.2-general-distill](https://huggingface.co/datasets/AdvancedDataIntelligence/glm5.2-general-distill)(CC BY-SA 3.0; prompts from databricks-dolly-15k, answers generated by6 unmodified lines## Limitations* These are tiny models. Answers are often wrong or made up, so don't relyon them for facts. The encyclopedia answers are Wikipedia sentences, butthe search can pick the wrong article or a sentence that does not answerthe 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.11 unmodified lines512 tokens, tokenizer repacked for the DS.* `gru512.zym` was trained in part on glm5.2-general-distill byAdvancedDataIntelligence (CC BY-SA 3.0).* `facts.zkb`: made from [Simple English Wikipedia](https://simple.wikipedia.org/)by Wikipedia contributors (the[wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia)dump of 2023-11-01), licensed[CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/).`facts.zkb` is an adapted work (opening sentences, converted to ASCII,indexed) and is shared under the same license.* `ZygAI-DS.nds` contains BlocksDS libraries: libnds (zlib), crts(MPL-2.0), picolibc (BSD-style licenses) and libgcc (GPL-3.0 with the GCCRuntime Library Exception).10 unmodified lines| 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 || `LICENSE`, `THIRD_PARTY_NOTICES.md`, `licenses/` | licenses |
12345670a03d63ad0c7b0e1bd01a9c0b6a39b9ff55dc009c7017209b08c7e3fcda7f1c0 ZygAI-DS-sdcard.zip9b8ebd4ca4a1cb89815c6ea34d85662b55ca296a8cc42784813ede6eacad9e75 sdcard/ZygAI-DS.nds354fd98344a7769890b01f6969f20b8a5164ac1f431dc8145d67b4fc9f1cf3c5 sdcard/zygai/gru512.zymbb7ebe7f8ca34124a96d628a2a415b62b7053467a09a71db3d5a4e165c7fcd1f sdcard/zygai/ngram-sharp.zym71b5ec43b75c3b8abfe3cf0372a7d17ab7bc3c0fff7e3d92ba8ae4362102df64 sdcard/zygai/ngram-wild.zymf1dbc3889a2a4d427fa43d04317101c07e23f0b70fd01c8e9832c48176f1834e sdcard/zygai/stories-eeny.zym735477dd0aed97aa635cd39f2e0e0df55fcc8d41d238be86553e3efa3b52eec8 sdcard/zygai/stories260k.zym1234567885927168083b6f1e64a4c75488bf1588ae82fb20fdb24b6121db0fe14102de57 ZygAI-DS-sdcard.zip8a1d1ef7c23b53bf537498f362159a2967dfa503261af3771e4f7eaa0cf93475 sdcard/ZygAI-DS.nds354fd98344a7769890b01f6969f20b8a5164ac1f431dc8145d67b4fc9f1cf3c5 sdcard/zygai/gru512.zym97f128c493df2b6934fb097e8b18a538d44c183640d4659915fe7edf27accec1 sdcard/zygai/ngram-sharp.zym4b4a1fa4c91e853f6ae7bf4a7854068cd21d586360118abedfdb3bf0feb2fca7 sdcard/zygai/ngram-wild.zymf1dbc3889a2a4d427fa43d04317101c07e23f0b70fd01c8e9832c48176f1834e sdcard/zygai/stories-eeny.zym735477dd0aed97aa635cd39f2e0e0df55fcc8d41d238be86553e3efa3b52eec8 sdcard/zygai/stories260k.zym156b1ba1830a2662337eda714d10c448c21f29c9aa4490626df5db2fabbcb408 sdcard/zygai/facts.zkb
50 unmodified lines51525354555650 unmodified linestoken's merge rank as its priority. The DS shows non-ASCII characters asplain ASCII.## Training data (not included)* **TinyStories** by Ronen Eldan and Yuanzhi Li (2023),50 unmodified lines51525354555657585960616263646566676869707172737475767778798050 unmodified linestoken's merge rank as its priority. The DS shows non-ASCII characters asplain ASCII.## zygai/facts.zkb: Simple English WikipediaThe encyclopedia (v0.2) is made from Simple English Wikipedia.* **Source:** the `20231101.simple` configuration of[wikimedia/wikipedia](https://huggingface.co/datasets/wikimedia/wikipedia)(241,787 articles).* **Authors:** Wikipedia contributors, https://simple.wikipedia.org/.* **License:** Creative Commons Attribution-ShareAlike 4.0(https://creativecommons.org/licenses/by-sa/4.0/). `facts.zkb` is anadapted work and is shared under the same license.* **Changes made by ZygAI:** for each article, the title and the firstsentences of the body (up to the first reference section, at most 1,500characters) are kept and converted to ASCII; empty or long parentheses(pronunciations, leftovers of removed templates) are removed, andsentences that lost a number with a removed template are left out. Lists,disambiguation and redirect pages and articles without a usable firstparagraph are left out (234,022 entries remain). The text is stored onesentence per line with a word index for the search; the app shows theopening sentences or the sentence that fits a question.* **Not included:** the rest of each article, images and article history.The source of each entry is the Simple English Wikipedia article with thesame title.## Training data (not included)* **TinyStories** by Ronen Eldan and Yuanzhi Li (2023),
123version https://git-lfs.github.com/spec/v1oid sha256:0a03d63ad0c7b0e1bd01a9c0b6a39b9ff55dc009c7017209b08c7e3fcda7f1c0size 3399566123version https://git-lfs.github.com/spec/v1oid sha256:85927168083b6f1e64a4c75488bf1588ae82fb20fdb24b6121db0fe14102de57size 63973789
123version https://git-lfs.github.com/spec/v1oid sha256:9b8ebd4ca4a1cb89815c6ea34d85662b55ca296a8cc42784813ede6eacad9e75size 392192123version https://git-lfs.github.com/spec/v1oid sha256:8a1d1ef7c23b53bf537498f362159a2967dfa503261af3771e4f7eaa0cf93475size 589824
123version https://git-lfs.github.com/spec/v1oid sha256:156b1ba1830a2662337eda714d10c448c21f29c9aa4490626df5db2fabbcb408size 140910856123version https://git-lfs.github.com/spec/v1oid sha256:bb7ebe7f8ca34124a96d628a2a415b62b7053467a09a71db3d5a4e165c7fcd1fsize 1588200123version https://git-lfs.github.com/spec/v1oid sha256:97f128c493df2b6934fb097e8b18a538d44c183640d4659915fe7edf27accec1size 1832840
123version https://git-lfs.github.com/spec/v1oid sha256:71b5ec43b75c3b8abfe3cf0372a7d17ab7bc3c0fff7e3d92ba8ae4362102df64size 516140123version https://git-lfs.github.com/spec/v1oid sha256:4b4a1fa4c91e853f6ae7bf4a7854068cd21d586360118abedfdb3bf0feb2fca7size 566548
.gitattributes+1
README.md+105-13
SHA256SUMS+5-4
THIRD_PARTY_NOTICES.md+24
ZygAI-DS-sdcard.zip+2-2
sdcard/ZygAI-DS.nds+2-2
sdcard/zygai/facts.zkbAdded+3
sdcard/zygai/ngram-sharp.zym+2-2
sdcard/zygai/ngram-wild.zym+2-2