Franok logo

Franok 0.7.0

Franok is an experimental English–Turkish language model by Yunus Emre Vurgun. It runs on your device in a browser or as an Ubuntu app. Its 48,892,700 parameters are a 48.5M-parameter language network trained from random initialization plus two circuits in the same weights file: Plan, which decides the shape of a reply, and Sense, which reads language and meaning. The language network began at random initialization; Franok uses no external base model and no distilled weights. Teacher-written dialogues are part of the training data.

Browser chat · Ubuntu installer · Source on GitHub

Files

Model files are in releases/v0.7.0/. Use the tokenizer and tensor manifest from the same release as the weights. Each tensor manifest records the configuration, tensor layout, file length and SHA-256 in the franok-echo-v2 export format.

Files Use
model.q4, model-q4.json 36.5 MB (36,531,360 bytes); the browser default
model.q8, model-q8.json 56.5 MB (56,519,840 bytes); the Ubuntu app default
model.f32, model-f32.json 195.6 MB (195,570,848 bytes) and its tensor layout
tokenizer.json English–Turkish byte-level BPE tokenizer, shared across formats
LICENSE MIT licence for the model weights

Plan and Sense tensors are stored as float32 in all three formats, so quantization applies to the language network only.

The Ubuntu app is available as franok_0.7.0_amd64.deb on GitHub Releases. Earlier weights and adapters are available at the 0.3, 0.4 and 0.6 revisions.

How it works

Franok writes one token, a small piece of text, at a time and feeds each one back in to predict the next: an autoregressive, decoder-only model. Its 16,384-entry byte-level BPE vocabulary was fitted on English and Turkish together, and many Turkish words split along their suffixes (Evlerimizden → Ev · ler · imiz · den). Each token becomes 512 numbers, and twelve layers refine them. Every layer first gathers information from earlier tokens with one of three kinds of memory, then transforms it with a SwiGLU feed-forward network of hidden width 1,408. The output scores reuse the input embedding matrix (tied embeddings).

Layer 1–3 4 5–7 8 9–11 12
Memory Delta Window Delta Window + Echo Delta Window
  • Sliding window: the last page, word for word. Sliding-window attention over the latest 512 tokens, with eight query heads sharing two key/value heads of width 64 (grouped-query attention), RMS-normalized queries and keys (QK-RMSNorm) and rotary position embeddings (RoPE). Work per token stops growing once the window is full.
  • Delta memory: a running summary. Gated DeltaNet layers keep four 128 × 128 matrices each. For every token the state decays, then stores the difference between the new value and what it already returned for that key (the gated delta rule). A causal convolution of width four sharpens the inputs. The state never grows; old details blur.
  • Echo: what followed last time. In layer 8, Echo finds up to two earlier exact matches for each suffix of one to four tokens, most recent first, within the last 262,144 positions. Each match contributes the value of the token right after it, and a learned null slot lets Echo ignore all of them. Transformers often learn this copy pattern implicitly as induction heads; Echo builds it in as exact matching.

Only Echo's per-position key and value store grows with session length, up to its cap. The architecture guide explains each part in plain words, then gives the equations and state layout.

Plan: decide before writing

Before the first reply token, Plan averages the residual states of the user's message after layer 8 and combines that average with the current position through a 1,024 → 256 projection. Five small classifiers read the result:

Head Classes
Intent chat, identity, fact, explain, howto, math, code, write, transform, advice, recall, other
Decision answer, compute, recall, clarify, decline, language, chart, design, convert, timer
Format line, paragraph, steps, list, code, value
Length brief, short, medium, long
Tone warm, cool, earth, night, vivid, soft

The detached 38 probabilities of all five heads form a register held for the reply. Before each of layers 9–12, the network adds a separate learned 38 → 512 projection of that register. A locked key replaces only its head's segment with a one-hot vector. Before training, with every correction at zero, the network computes exactly Franok 0.6. The app reads the decision: compute, language, chart, design, convert and timer go to deterministic helpers; answer, recall, clarify and decline are written by the model. Format and length can also be locked by hand for one reply.

Pick: label the message

At every position, a 512 → 4 classifier tags the token as none, label, value or topic. A label names a data item or unit, a value is part of a number, and a topic names the subject of a requested design or the title of a chart. The runtime keeps tags for tokens after the latest USER marker, up to 1,024; a new USER marker resets the tags. At the reply boundary, the worker returns the tags before the final ASSISTANT marker to the app for its helpers. Pick does not feed the plan correction.

Sense: read before the pass

Sense runs no transformer layers. It weighs each of the message's first 160 tokens with a learned salience value, pools their embeddings into 512 numbers, and projects them to a normalized 96-number meaning vector. A second linear head averages the same embeddings and returns English and Turkish probabilities. The vector ranks earlier turns for search; the language head picks the reply language and notices a request for a language other than English or Turkish. Sense shares the token embedding but does not touch a chat session.

Training and tokenizer

The 0.6 base started random. Training showed the model text and asked it to predict every next token; the cross-entropy loss measured its surprise, and the optimizer adjusted the weights to reduce it. Pretraining ran for 180.13 minutes on one A100 80 GB GPU at about 221,000 tokens per second, processing 2.33 billion tokens. The 3.78-billion-token training corpus drew from 16 sources, weighted 52% English and 48% Turkish. Training used bfloat16, Muon for eligible weight matrices and AdamW for the other parameters, with a warmup–stable–decay schedule tied to the time budget.

Supervised fine-tuning (SFT) then trained on conversations, scoring only the assistant's tokens: 135 million tokens in 2,048-token rows, then 65 million tokens in 8,192-token sessions that join up to 20 conversations. Every fifth long session gives a locker number at the start and asks for it at the end, beyond the 512-token window. SFT used 134,769 conversations per language, filtered against the held-out tests. The 0.6 weights stayed frozen for 0.7, so these runs describe the base network, not the two circuits.

Plan and Pick trained on labelled user messages and replies. Plan used cross-entropy at the first assistant token for its five heads. Pick used cross-entropy on every labelled user token. The steering matrices were trained against the frozen network's reply loss, with the model's own detached plan probabilities in the correction; for 20% of replies the format and length parts of that correction were the gold labels instead. The run used 8,060 rows of 2,048 tokens, 353 steps over 23,134,208 tokens in 35.1 minutes on one Colab T4.

Sense trained separately on the frozen embedding: 326,293 English–Turkish question and parallel-text rows from SQuAD, OpenOrca-TR and Tatoeba, giving 766,253 distinct texts. It ran 3,000 steps at batch 128 for 32.36 seconds on four CPU threads. The best held-out checkpoint came at step 2,700; paired top-1 rose from 825/5,120 at initialization to 4,625/5,120, and the paired loss fell from 4.8069 to 0.4573.

The byte-level BPE tokenizer was fitted to a sample of the training sources. The table reports mean UTF-8 bytes per token on held-out text; higher values mean fewer tokens for the same text.

Text 16,384 entries 8,192 entries
English 3.63 3.26
Turkish 3.92 3.49
Code 3.64 3.37
Chat 3.95 3.52

See training objectives and reproduction commands and the data guide for source revisions and splits.

Inference

The C runtime compiles to WebAssembly SIMD and relaxed SIMD. It uses int8 activations and Q4 or Q8 weights in groups of 32. With cross-origin isolation, up to four threads share memory and split the matrix work with bit-identical results. Without isolation, the runtime uses one thread. Prompt prefill processes blocks of 16 tokens. A follow-up that extends the live state or a saved snapshot processes only new tokens. If neither can be reused, the runtime replays the prompt.

On an AMD Ryzen 5 7530U, Node WASM with relaxed SIMD and four threads measured Q4 decode at 434.4 tokens/s at position 32 and prefill at 953 tokens/s. With one thread, Q4 measured 174.6 tokens/s decode and 550 tokens/s prefill. These are Franok 0.6 measurements on the frozen base. Plan runs once per reply; steering adds four 38 → 512 projections per generated token; Pick runs during prefill; Sense runs only when the app asks it to. Franok 0.7 measured Q4 decode at 192.7 tokens/s and prefill at 479 tokens/s on four threads (Node WASM with relaxed SIMD, AMD Ryzen 5 7530U) while the machine was busy with other work, so a lower bound; 0.6 measured 434.4 tokens/s on the same machine when idle. See the 0.6 evaluation for Q8 and longer prefixes.

The browser and Ubuntu app search earlier turns in the current conversation. Search starts with word matches; Search by meaning across English and Turkish combines them with similarity scores from Sense. The vectors come from the same weights file without running the transformer layers or touching the chat session.

Evaluation and limitations

These measurements were made on the 0.6 weights, which 0.7 keeps frozen. The plan corrections change the reply distribution, so they are a baseline for 0.7, not a score of it.

Measurement Franok 0.6.0
Reading comprehension Belebele: EN 25.8% (31/120), TR 28.3% (34/120); four-choice chance is 25%
Extractive question answering XQuAD: EN 0.0% exact / 8.1% F1, TR 3.1% exact / 11.0% F1
Language modelling EN 1.137, TR 1.049 bits per byte
Conversation Blind-judge RUBRIC on 50 turns: 29/50; Franok 0.5 14/50; LFM2-350M 10/50
Recall 0/24 exact per language at each tested length, with Echo on and off
Training and validation loss Pretraining held-out mean 2.0827 nats; short SFT loss 1.794 → 1.170; long SFT loss 1.166

The blind-judge comparison was not rerun for 0.7. The circuits have their own held-out results:

Measurement Franok 0.7.0
Plan heads intent 92.2%, decision 96.2%, shape 87.1%, size 78.5%, tone 88.6%
Pick 98.6% of message tokens; values 88.4%, labels 78.7%, topics 51.9%
Steering 1.5042 with steering on and 1.5709 with it off, over 327,991 held-out reply tokens
Sense language 19,222/19,266 texts correct (99.77%); messages of one to five words 5,284/5,292 (99.85%)
Sense retrieval 486/736 top-1 (66.0%) on XQuAD and Belebele question–passage pairs; meaning alone 375/736 (51.0%), word matches alone 400/736 (54.3%)
Sense across languages Same-language queries 292/368 (79.3%); cross-language queries 194/368 (52.7%)

A matching Echo suffix gives the model access to an earlier value; it does not guarantee that the reply repeats it or answers correctly. Reading comprehension stays near chance, and exact needle recall failed on the base. A wrong Plan decision can send a message to the wrong helper, and Sense language labels are 99.77% accurate, not perfect; short messages are the hardest. Verify important answers independently. Methods and the full 0.6 reference results are in the 0.6 evaluation; the 0.7 report is here.

Licence and attribution

The code and trained weights are MIT licensed. Datasets retain their upstream licences. Training includes Marul-SFT-TR by Ahmet Karakuş (Marul AI) and selected dialogues from Franok's 0.5 archive. That archive includes dialogues written by Gemma 4 26B and Gemma 4 31B. Sense training used English SQuAD 2.0, the Turkish SQuAD set distributed by TULAP, Tatoeba English–Turkish pairs and OpenOrca-TR. The data guide lists the upstream dataset authors, licences and pinned sources.

Downloads last month
1,183
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Datasets used to train yunusemrejr/Franok