File size: 4,110 Bytes
678b9c1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ed978e5
 
 
 
 
 
 
 
 
 
 
 
 
 
678b9c1
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
---
license: apache-2.0
language:
  - en
  - ar
  - ckb
library_name: safetensors
tags:
  - intent-classification
  - small-models
  - on-device
  - zana
---

# ZANA Cognitive Engine: runtime models

The small trained components that the [ZANA Cognitive Engine](https://github.com/danamohammad/ZANA-Cognitive-Engine) desktop app ships with.
They are tiny, task-specific models for an on-device assistant. **They are not a general chat or instruction-following language model.**
Open-ended answers in the ZANA app come from a separate local model (for example one served by Ollama), if you run one.

| File | What it is | Size |
|---|---|---|
| `intent_v3_C_s0.safetensors` (+ `.json`) | Intent classifier used by the default composite front end: decides what the user is asking for (remember, recall, list files, create a task, calculate, search documents, …). 449,555 parameters, `d_model` 128, seed 0. | 1.8 MB |
| `calib_b_frozen.json` | Frozen per-intent calibration thresholds used together with the classifier. | 2.5 KB |
| `core_lm_v1.safetensors` (+ `.json`) | ZANA's recurrent cognitive core as a byte-level language model (SSM + attention, `d_model` 64, 132,416 parameters), trained on English, Arabic and Sorani Kurdish text. | 0.5 MB |

## Evaluation (from the training records in the `.json` files)

- **Intent classifier:** best accuracy 0.804 on the project's dev split (`best_dev3_acc`). It was never trained on the project's evaluation sets, MASSIVE dev/test, or the held-out Common Voice splits listed in `intent_v3_C_s0.json` (`never_trained_on`). This is a development-split number from training, not a published benchmark.
- **Core language model:** held-out bits per token after 3,000 steps: English 2.23, Sorani Kurdish 1.61, Arabic 1.62. The held-out text was never trained on.

## Training data

- Intent classifier: 600 templates plus 90 natural seed utterances and a 797-example training split (each repeated 3 times), as recorded in `intent_v3_C_s0.json`.
- Core language model: Common Voice sentence corpora for English, Arabic and Sorani Kurdish (CC0) and the MASSIVE English and Arabic training splits (CC BY 4.0, © Amazon; credited here as the licence requires). See `DATASETS.md` in the GitHub repository.

## Use

```python
from safetensors.torch import load_file
weights = load_file("intent_v3_C_s0.safetensors")
```

The model architectures and the code that loads these files are in the GitHub repository (`src/zana/`). The easiest way to use them is the ZANA desktop app, which bundles them.

## Limits

- The intent classifier covers ZANA's own set of assistant actions and was tuned for English, Arabic and Sorani Kurdish short requests. It will misclassify requests outside that set.
- The core language model is very small (132 K parameters). It is a research component of the engine, not something to generate text with.
- No claims are made about performance outside the numbers above.

## App downloads (preview)

The ZANA desktop app, with these models bundled, is in [`apps/`](apps):

| File | For | SHA-256 |
|---|---|---|
| `apps/ZANA.dmg` (560 MB) | macOS, Apple silicon | `0fd2c47074240f176e0ffa8827b593aa95a8ebbeb11c7b341f7418fc25b102c6` |
| `apps/ZANA-Windows-x64.zip` (484 MB) | Windows 64-bit | `5a52ca6487a0c20315ca45dd9504bc50db71ee9930ebda8944fa8ff7e5e291d2` |

- **Not signed by a developer certificate.** On macOS, right-click the app and choose **Open** the first time. On Windows, SmartScreen may warn: choose **More info**, then **Run anyway**.
- **Preview limits:** no voice playback or cancel button yet; the Windows app was only start-up tested on a hosted Windows machine, not opened in a real window; microphone input and a real local language model were not tested.
- For full answers to open questions, install [Ollama](https://ollama.com) and run `ollama pull qwen2.5:7b-instruct`; ZANA finds it automatically.
- Source, release notes and build scripts: https://github.com/danamohammad/ZANA-Cognitive-Engine (private; ask the owner for access).

## License

Apache 2.0, the same as the code. The datasets above keep their own licences.