👉 Спробувати наживо: tinytalk-ua.rezor.me —
модель виконується просто у вашому браузері (WebAssembly), без сервера й без API.
Український чат-бот на 9,96 млн параметрів, який працює повністю офлайн
на мікроконтролері ESP32-S3 (M5Stack Cardputer, 512 КБ SRAM, без PSRAM) —
5,6 МБ у Q4, ~5 токенів/с (196 мс/токен, виміряно на англійській збірці такої
ж архітектури; швидкість упирається в потік із флеш-пам'яті). І, звісно, на
будь-чому більшому.
Це україномовний родич TinyTalk 2.
Таблиця ембедингів тут нова й випадкова — український токенізатор, а це
третина моделі, — тіло трансформера стартує з того самого предка
(TinyStories-Instruct-8M) і далі навчається на 700 млн українських токенів.
Мозок прошивки cardputer-ai
(гілка ukr), де вона працює з Q4_0-квантизацією, int4 KV-кешем і
рукописним SIMD-ядром PIE для ESP32-S3.
Що вміє
Проста розмова з пам'яттю на кілька реплік, дитячі факти (кольори, звуки
тварин, протилежності) — і чесне «не знаю» замість вигадок на питання, які
завеликі для такої моделі. Слава Україні! → Героям слава!
GPT-Neo: 8 шарів, dim 256, 16 голів, чергування global/local уваги (вікно 256),
байтовий BPE на 14 000 токенів, зв'язані ембединги, контекст 256 позицій.
Тіло трансформера ініціалізовано з
TinyStories-Instruct-8M
(107 тензорів), таблиця ембедингів — нова й випадкова, бо словник інший.
Як навчено
Претрейн — 700 млн токенів (476 млн унікальних) з відфільтрованих
українських субтитрів OPUS OpenSubtitles + ~30 % відредагованої прози з
lang-uk/malyuk +
Tatoeba. 21 362 кроки, 5,4 год на Ryzen AI Max+ 395 (ROCm, bf16).
Файн-тюн діалогів — 34 тис. блоків (8,7 млн токенів), 3 епохи,
маскований лосс: градієнт лише на репліках бота й на EOS, тож модель
вчиться відповідати й зупинятися, а не імітувати користувача.
Проза потрібна саме через морфологію: субтитри — це 4,3 слова на рядок, а
українська узгодженість (прикметник із іменником у роді, числі й відмінку;
дієслово минулого часу з родом підмета) живе в повних реченнях.
Метрики
значення
Лосс на діалоговій валідації
3,4535
Коректність словоформ (VESUM)
99,5 %
Узгодження прикметник–іменник (VESUM)
90,6 %
Дитячі факти (батарея з 8 питань)
8/8
«Не знаю» на неможливих питаннях
8/8
Відсутність зайвих відмов
8/8
Морфологію міряно проти VESUM —
довідкового словника українських словоформ (3,9 млн форм). Власні назви
виключено з перевірки словоформ: VESUM не містить транслітерованих іноземних
імен.
Чесні обмеження
Це навчальна іграшка. Знань про світ нема — лише ~120 написаних вручну
дитячих фактів; решта має отримати ввічливе «не знаю», але не завжди:
яка столиця франції? дає Столиця України - Київ. Контекст — 256 токенів.
Корпус — субтитри, тож у рідкісних відповідях трапляється лайка й розмовний
шум. Не використовуйте це там, де щось важить.
Файли для ESP32
Каталог esp32/ містить те, що зашивається у прошивку:
model_neo_q4.bin — Q4_0, формат CRDP v3, 5,63 МБ
tok_neo.bin — блоб токенізатора CTK2, 276 КБ
Ліцензія та джерела
MIT — і код, і ваги. Робіть що завгодно, зберігайте текст ліцензії.
Джерела навчання наведені нижче для чесної атрибуції. Деякі з них мають власні
умови (Tatoeba — CC BY 2.0 FR), а деякі не мають ліцензійного теґу взагалі;
якщо це важливо для вашого випадку, перевірте першоджерела самі:
👉 Try it live: tinytalk-ua.rezor.me — the
model runs in your own browser (WebAssembly), no server and no API.
A 9.96M-parameter Ukrainian chatbot that runs fully offline on an ESP32-S3
microcontroller (M5Stack Cardputer, 512 KB SRAM, no PSRAM) — 5.6 MB at Q4,
~5 tokens/s (196 ms/token, measured on the same-architecture English build;
throughput is bound by flash streaming). And on anything bigger, of course.
It is the Ukrainian sibling of TinyTalk 2:
the embedding table here is new and random — a Ukrainian tokenizer, and that is
a third of the model — while the transformer body starts from the same ancestor
(TinyStories-Instruct-8M) and is then trained on 700M Ukrainian tokens.
Built as the brain of the cardputer-ai firmware
(branch ukr), where it runs Q4_0-quantized with an int4 KV cache and a
hand-written ESP32-S3 PIE SIMD kernel.
What it's for
Small talk with a few turns of memory, kindergarten facts (colors, animal
sounds, opposites), and a trained "I don't know" instead of confabulation for
questions beyond a model this size. Слава Україні! → Героям слава!
GPT-Neo: 8 layers, hidden size 256, 16 heads, alternating global/local
attention (window 256), 14,000-token byte-level BPE, tied embeddings, 256
positions. The transformer body was initialized from
TinyStories-Instruct-8M
(107 tensors copied); the embedding table is fresh and random, since the
vocabulary is entirely different.
Training
Pretrain — 700M tokens (476M unique) from filtered Ukrainian OPUS
OpenSubtitles + ~30% edited prose from
lang-uk/malyuk + Tatoeba.
21,362 steps, 5.4 h on a Ryzen AI Max+ 395 (ROCm, bf16).
Dialogue fine-tune — 34K blocks (8.7M tokens), 3 epochs, masked
loss: gradient only on bot replies and EOS, so it learns to answer and to
stop, never to imitate the user.
The prose tier exists for morphology: subtitles average 4.3 words per line, and
Ukrainian agreement (adjective–noun in gender, number and case; past-tense verb
with the subject's gender) lives in complete clauses.
Metrics
value
Chat validation loss
3.4535
Wordform validity (VESUM)
99.5%
Adjective–noun agreement (VESUM)
90.6%
Kindergarten facts (8-prompt battery)
8/8
"I don't know" on impossible questions
8/8
No over-refusal
8/8
Morphology is scored against VESUM, the
reference Ukrainian morphological dictionary (3.9M word forms). Proper nouns
are excluded from validity: VESUM has no transliterated foreign names.
Honest limitations
An educational toy. No world knowledge beyond ~120 hand-written kindergarten
facts; everything else is supposed to get a polite "I don't know" — but not
always: яка столиця франції? ("capital of France?") answers `Столиця України
Київ.` ("The capital of Ukraine is Kyiv."). Context is 256 tokens. The corpus
is film subtitles, so occasional profanity and conversational noise leak into
rare replies. Do not use it for anything that matters.
ESP32 files
The esp32/ directory holds what gets embedded in the firmware:
MIT — both code and weights. Do what you like; keep the license text.
The training sources are listed below for honest attribution. Some carry their
own terms (Tatoeba is CC BY 2.0 FR) and some have no license tag at all; if that
matters for your use case, check the upstream sources yourself:
Body: TinyStories-Instruct-8M
(Eldan & Li, arXiv:2305.07759) — published without an explicit license.
OPUS OpenSubtitles v2024 (uk) —
Lison & Tiedemann, LREC 2016. OPUS distributes these corpora for research.
lang-uk/malyuk — a
compilation with no license tag (UberText 2.0 + OSCAR uk + Ukrainian news).