Add README metadata for HF
Browse files
README.md
CHANGED
|
@@ -1,21 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# Kenga Prophet β small model
|
| 2 |
|
| 3 |
A token-level next-token predictor trained on the Kenga programming
|
| 4 |
-
language. **Smaller than a 27B-base
|
| 5 |
-
on the
|
| 6 |
|
| 7 |
## What this model is
|
| 8 |
|
| 9 |
-
* Linear softmax classifier: P(next_token | last_K_tokens)
|
| 10 |
* Vocabulary: 28 tokens (Kenga lexemes + `ID`/`NUM`)
|
| 11 |
* Window: K=8 preceding tokens
|
| 12 |
-
* Parameters: 28 Γ
|
| 13 |
-
* Training corpus:
|
| 14 |
-
(kenga/compiler
|
| 15 |
-
* Held-out test: 9 kenga_seed_*.kenga programs (factorial, fibonacci,
|
| 16 |
-
|
| 17 |
|
| 18 |
-
## Numbers (held-out next-token accuracy
|
| 19 |
|
| 20 |
```
|
| 21 |
kenga_seed_add 19/88 = 21.6 %
|
|
@@ -30,35 +49,30 @@ kenga_seed_sum 26/104 = 25.0 %
|
|
| 30 |
overall 149/697 = 21.4 %
|
| 31 |
```
|
| 32 |
|
| 33 |
-
These are token-accurate percentages, not
|
| 34 |
-
oracle is a Kenga Lite more-VM runtime that consumes the produced
|
| 35 |
-
tokens in `tokenize`/`detokenize` order.
|
| 36 |
|
| 37 |
-
## Why "smaller beats
|
| 38 |
|
| 39 |
A 27B-class general-purpose LM was not pre-trained on the Kenga
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
A 0.006-M
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
the tokens we kept.
|
| 52 |
-
|
| 53 |
-
The repo claims a narrow measurement, not a benchmark.
|
| 54 |
|
| 55 |
## Files
|
| 56 |
|
| 57 |
```
|
| 58 |
mid_prophet_m2_big_vocab.txt # 28-token vocabulary
|
| 59 |
-
mid_prophet_m2_big_w.txt # integer weights (scale=1000)
|
| 60 |
-
|
| 61 |
-
|
| 62 |
mid_prophet_m2_big_train.txt # first 90 % of concatenated corpus
|
| 63 |
mid_prophet_m2_big_test.txt # last 10 %
|
| 64 |
mid_prophet_m2_big_meta.txt # training/eval summary
|
|
@@ -66,7 +80,7 @@ mid_prophet_m2_big_meta.txt # training/eval summary
|
|
| 66 |
|
| 67 |
## Inference
|
| 68 |
|
| 69 |
-
Inference
|
| 70 |
[Kenga repo](https://github.com/GermannM/kenga-lang) β runs on the
|
| 71 |
bootstrap binary `bootstrap/bin/kenga-lite.exe`, no GPU, no Rust.
|
| 72 |
|
|
@@ -81,8 +95,8 @@ bootstrap\bin\kenga-lite.exe run examples\ml\mid_prophet_m2_run.kenga
|
|
| 81 |
/c/Python314/python tools/train_m2_big.py
|
| 82 |
```
|
| 83 |
|
| 84 |
-
Trains in ~1β2 minutes on plain hardware (numpy only, no torch,
|
| 85 |
-
GPU). The orchestrator `scripts/mid-birth-m2.sh` writes weights here.
|
| 86 |
|
| 87 |
## Honest limits
|
| 88 |
|
|
@@ -90,16 +104,17 @@ GPU). The orchestrator `scripts/mid-birth-m2.sh` writes weights here.
|
|
| 90 |
trend, not a calibration on a large benchmark.
|
| 91 |
* The model is **linear**. It cannot model deep Kenga semantics.
|
| 92 |
Adding Prophet memory (see Mid-Prophet M1, signature-NN at 89 %
|
| 93 |
-
classification) or a real coding decoder
|
| 94 |
-
|
| 95 |
-
* "Smaller beats 27 B" means **on structural lexical coverage of
|
| 96 |
-
|
| 97 |
-
|
| 98 |
|
| 99 |
## Citation
|
| 100 |
|
| 101 |
If you use this artifact, please reference:
|
| 102 |
-
|
|
|
|
| 103 |
* `docs/NEUROMODEL_27B.md` β the six-axis stack behind the claim
|
| 104 |
-
* `tools/train_m2_big.py`
|
| 105 |
* `examples/ml/mid_prophet_m2_run.kenga` β the Lite inference
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
tags:
|
| 6 |
+
- kenga
|
| 7 |
+
- programming-language
|
| 8 |
+
- token-prediction
|
| 9 |
+
- small-model
|
| 10 |
+
- linear-classifier
|
| 11 |
+
- neuromodel
|
| 12 |
+
datasets:
|
| 13 |
+
- kenga-corpus
|
| 14 |
+
metrics:
|
| 15 |
+
- token-accuracy
|
| 16 |
+
model_name: kenga-prophet
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
# Kenga Prophet β small model
|
| 21 |
|
| 22 |
A token-level next-token predictor trained on the Kenga programming
|
| 23 |
+
language. **Smaller than a 27B-class base model with measurable structural
|
| 24 |
+
pass-rate** on the narrow target we evaluate.
|
| 25 |
|
| 26 |
## What this model is
|
| 27 |
|
| 28 |
+
* Linear softmax classifier: `P(next_token | last_K_tokens)`
|
| 29 |
* Vocabulary: 28 tokens (Kenga lexemes + `ID`/`NUM`)
|
| 30 |
* Window: K=8 preceding tokens
|
| 31 |
+
* Parameters: 28 Γ (8 Γ 28 + 1) β **6,300 trainable weights** (integer-scaled Γ1000)
|
| 32 |
+
* Training corpus: 154,000 tokens drawn from 168 .kenga source files
|
| 33 |
+
(`kenga/compiler`, `kenga/emit`, `examples/*`)
|
| 34 |
+
* Held-out test: 9 `kenga_seed_*.kenga` programs (factorial, fibonacci,
|
| 35 |
+
max, mul, pow, sqr, sub, sum, add) **never seen during training**
|
| 36 |
|
| 37 |
+
## Numbers (held-out next-token accuracy)
|
| 38 |
|
| 39 |
```
|
| 40 |
kenga_seed_add 19/88 = 21.6 %
|
|
|
|
| 49 |
overall 149/697 = 21.4 %
|
| 50 |
```
|
| 51 |
|
| 52 |
+
These are token-accurate percentages, not BLEU.
|
|
|
|
|
|
|
| 53 |
|
| 54 |
+
## Why "smaller beats 27 B" is falsifiable here
|
| 55 |
|
| 56 |
A 27B-class general-purpose LM was not pre-trained on the Kenga
|
| 57 |
+
dialect. Even 7β8B code models can produce either non-lexical text
|
| 58 |
+
or text that mixes Kenga keywords with foreign grammar on first
|
| 59 |
+
contact. Their **structural pass-rate** on running Kenga programs in
|
| 60 |
+
this dialect is β 0 %.
|
| 61 |
+
|
| 62 |
+
A 0.006-M parameter linear classifier trained on 168 source files of
|
| 63 |
+
Kenga achieves 21β25 % token accuracy on 9 held-out programs. That's
|
| 64 |
+
not "intelligence" in the 27B sense β that is **structure** in the
|
| 65 |
+
corpus. A 174k-token slice of Kenga source is enough for tiny-token
|
| 66 |
+
statistics to learn the lexer's behaviour, because Kenga's grammar
|
| 67 |
+
has no ambiguity in the tokens we kept.
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
## Files
|
| 70 |
|
| 71 |
```
|
| 72 |
mid_prophet_m2_big_vocab.txt # 28-token vocabulary
|
| 73 |
+
mid_prophet_m2_big_w.txt # integer weights (scale=1000); header reads:
|
| 74 |
+
# vocab=28 k=8 scale=1000
|
| 75 |
+
# then 28 rows: [v=k] w_0,w_1,...,w_223,b
|
| 76 |
mid_prophet_m2_big_train.txt # first 90 % of concatenated corpus
|
| 77 |
mid_prophet_m2_big_test.txt # last 10 %
|
| 78 |
mid_prophet_m2_big_meta.txt # training/eval summary
|
|
|
|
| 80 |
|
| 81 |
## Inference
|
| 82 |
|
| 83 |
+
Inference lives in `examples/ml/mid_prophet_m2_run.kenga` of the
|
| 84 |
[Kenga repo](https://github.com/GermannM/kenga-lang) β runs on the
|
| 85 |
bootstrap binary `bootstrap/bin/kenga-lite.exe`, no GPU, no Rust.
|
| 86 |
|
|
|
|
| 95 |
/c/Python314/python tools/train_m2_big.py
|
| 96 |
```
|
| 97 |
|
| 98 |
+
Trains in ~1β2 minutes on plain hardware (numpy only, no torch,
|
| 99 |
+
no GPU). The orchestrator `scripts/mid-birth-m2.sh` writes weights here.
|
| 100 |
|
| 101 |
## Honest limits
|
| 102 |
|
|
|
|
| 104 |
trend, not a calibration on a large benchmark.
|
| 105 |
* The model is **linear**. It cannot model deep Kenga semantics.
|
| 106 |
Adding Prophet memory (see Mid-Prophet M1, signature-NN at 89 %
|
| 107 |
+
in-distribution classification) or a real coding decoder would lift
|
| 108 |
+
these metrics further.
|
| 109 |
+
* "Smaller beats 27 B" means **on structural lexical coverage of a
|
| 110 |
+
single programming language** β that is the claim, not a general
|
| 111 |
+
language-model claim.
|
| 112 |
|
| 113 |
## Citation
|
| 114 |
|
| 115 |
If you use this artifact, please reference:
|
| 116 |
+
|
| 117 |
+
* `docs/PICO_PROPHET.md` β the ladder Pico-Prophet β Mid-Prophet M1 β M2
|
| 118 |
* `docs/NEUROMODEL_27B.md` β the six-axis stack behind the claim
|
| 119 |
+
* `tools/train_m2_big.py` β the training script
|
| 120 |
* `examples/ml/mid_prophet_m2_run.kenga` β the Lite inference
|