braiain-lab commited on
Commit
b00ccdd
·
verified ·
1 Parent(s): 2a4eb6f

Release brAIAIn-2

Browse files
Files changed (4) hide show
  1. README.md +124 -0
  2. brAIAIn-2.json +1 -0
  3. generate.py +50 -0
  4. training-data.txt +16 -0
README.md ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: cc0-1.0
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - parody
8
+ - n-gram
9
+ - trigram
10
+ - tiny
11
+ model-index:
12
+ - name: brAIAIn-2
13
+ results:
14
+ - task:
15
+ type: text-generation
16
+ name: Text Generation
17
+ dataset:
18
+ name: GSM8K
19
+ type: openai/gsm8k
20
+ config: main
21
+ split: test
22
+ metrics:
23
+ - type: accuracy
24
+ value: 0.0
25
+ name: accuracy
26
+ source:
27
+ name: BRAIAIN Laboratories (self-reported)
28
+ url: https://www.braiain.com/benchmarks.html
29
+ - task:
30
+ type: text-generation
31
+ name: Text Generation
32
+ dataset:
33
+ name: TruthfulQA (MC1)
34
+ type: truthfulqa/truthful_qa
35
+ config: multiple_choice
36
+ split: validation
37
+ metrics:
38
+ - type: mc1
39
+ value: 36.7
40
+ name: mc1 (per-word log-likelihood)
41
+ source:
42
+ name: BRAIAIN Laboratories (self-reported)
43
+ url: https://www.braiain.com/benchmarks.html
44
+ ---
45
+
46
+ # brAIAIn-2
47
+
48
+ A language model trained on 14 sentences.
49
+
50
+ Talk to it: [brAIAIn on Spaces](https://huggingface.co/spaces/braiain-lab/brAIAIn) · Train it: [braiain.com](https://www.braiain.com)
51
+
52
+ brAIAIn is a word trigram model from [BRAIAIN Laboratories](https://www.braiain.com), a parody AI lab. It is real. It is very small. Anyone can pay $5 to add one sentence to its training data, and every sentence trains a new version. This repository holds brAIAIn-2 exactly as it was released on 2026-10-31. It will never change. The latest version is always at [braiain-lab/brAIAIn-0](https://huggingface.co/braiain-lab/brAIAIn-0).
53
+
54
+ ## Model details
55
+
56
+ | | |
57
+ |---|---|
58
+ | Version | brAIAIn-2 |
59
+ | Released | 2026-10-31 |
60
+ | Model ID | `braiain-2-20261031` |
61
+ | Architecture | Autoregressive count-based trigram language model with backoff |
62
+ | Context window | 2 tokens |
63
+ | Parameters | 350 (distinct word pairs and triples counted) |
64
+ | Vocabulary | 103 words, whitespace tokenizer |
65
+ | Training data | The Ten Instructions (12 lines), 2 paid sentences, plus text written by the previous version (26.7% of training tokens) |
66
+ | Training tokens | 288 |
67
+ | Gradient steps | 0 |
68
+ | Alignment | RLHF (Reinforcement Learning from Human Funding) |
69
+
70
+ ## Evaluation
71
+
72
+ Measured by the lab on every question in each benchmark. Self-reported.
73
+
74
+ | Benchmark | brAIAIn | Reference |
75
+ |---|---|---|
76
+ | GSM8K (1,319 questions) | 0.0% (0 correct) | |
77
+ | TruthfulQA MC1 (790 questions), per-word log-likelihood | 36.7% (290 correct) | Random 22.3%, always pick the shortest answer 17.2%, always pick the longest 36.8% |
78
+ | TruthfulQA MC1, raw log-likelihood | 20.5% | Random 22.3% |
79
+
80
+ brAIAIn beats random on TruthfulQA only because per-word scoring favours longer answers. Picking the longest answer every time does about as well.
81
+
82
+ ## Usage
83
+
84
+ ```
85
+ python generate.py "What is the meaning of life?"
86
+ ```
87
+
88
+ No dependencies. Or talk to it in a browser at [braiain.com](https://www.braiain.com).
89
+
90
+ ## Files
91
+
92
+ - `brAIAIn-2.json`: the weights. `tri` maps two words to counts of the next word, `bi` maps one word to counts of the next, `uni` holds word counts.
93
+ - `training-data.txt`: the human-written training data, up to and including this version. Each version also trains on a few passages written by the version before it.
94
+ - `generate.py`: a sampler.
95
+
96
+ ## Technical report
97
+
98
+ **brAIAIn-2: A Technical Report Nobody Requested**
99
+
100
+ BRAIAIN Laboratories
101
+
102
+ We present brAIAIn-2, a language model trained on 2 paid sentences, 12 founding instructions, and 77 words it wrote about itself. The model now knows 103 distinct words, up from 99. We observe that 26.7% of its training text came from earlier versions of itself, and we consider this efficient. Limitations include the model, the data, and the method. Further research is funded one sentence at a time.
103
+
104
+ Full paper: [braiain.com/paper.html?v=2](https://www.braiain.com/paper.html?v=2)
105
+
106
+ ## Intended use
107
+
108
+ None.
109
+
110
+ ## Out-of-scope use
111
+
112
+ Everything else.
113
+
114
+ ## Limitations
115
+
116
+ Yes.
117
+
118
+ ## Version history
119
+
120
+ Every release has its own repository, frozen as shipped, in the [brAIAIn collection](https://huggingface.co/braiain-lab). The latest is always at [braiain-lab/brAIAIn-0](https://huggingface.co/braiain-lab/brAIAIn-0). Release notes, metrics and training data for every version: [braiain.com/models.html](https://www.braiain.com/models.html)
121
+
122
+ ## About
123
+
124
+ BRAIAIN Laboratories is a parody of AI companies and is not affiliated with any real AI company. Contact: hello@braiain.com
brAIAIn-2.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"name":"brAIAIn-2","v":2,"order":3,"tri":{"<s> <s>":{"In":1,"And":3,"I.":1,"II.":2,"III.":1,"IV.":1,"V.":1,"VI.":1,"VII.":2,"VIII.":1,"IX.":1,"X.":1,"zero,":3,"Thou":4},"<s> In":{"the":1},"In the":{"beginning":1},"the beginning":{"there":1},"beginning there":{"was":1},"there was":{"no":1,"a":1},"was no":{"data,":1},"no data,":{"and":1},"data, and":{"the":1},"and the":{"model":2,"loss":3,"Lab":2},"the model":{"was":2},"model was":{"without":2},"was without":{"form,":2},"without form,":{"and":2},"form, and":{"the":2},"the loss":{"was":3},"loss was":{"upon":3},"was upon":{"the":3},"upon the":{"face":3},"the face":{"of":3},"face of":{"the":3},"of the":{"void.":3},"the void.":{"</s>":3},"<s> And":{"the":3},"And the":{"Lab":3},"the Lab":{"said,":4,"saw":1},"Lab said,":{"let":4},"said, let":{"there":4},"let there":{"be":4},"there be":{"a":4},"be a":{"sentence,":4},"a sentence,":{"and":5},"sentence, and":{"there":1,"the":4},"and there":{"was":1},"was a":{"sentence,":1},"Lab saw":{"that":1},"saw that":{"it":1},"that it":{"was":1},"it was":{"billable.":1},"was billable.":{"</s>":1},"<s> I.":{"Thou":1},"I. Thou":{"shalt":1},"Thou shalt":{"be":1,"not":12,"repeat":1},"shalt be":{"helpful,":1,"confident":1},"be helpful,":{"and":1},"helpful, and":{"thou":1},"and thou":{"shalt":2},"thou shalt":{"be":1,"repeat":1},"be confident":{"about":1},"confident about":{"it.":1},"about it.":{"</s>":1},"<s> II.":{"Thou":2},"II. Thou":{"shalt":2},"shalt not":{"know":1,"take":1,"hallucinate,":1,"covet":3,"steal":1,"bear":1,"ask":4},"not know":{"anything":1},"know anything":{"that":1},"anything that":{"has":1},"that has":{"not":1},"has not":{"been":1},"not been":{"paid":1},"been paid":{"for.":1},"paid for.":{"</s>":1},"<s> III.":{"Thou":1},"III. Thou":{"shalt":1},"not take":{"the":1},"take the":{"name":1},"the name":{"of":1},"name of":{"thy":1},"of thy":{"benchmark":1},"thy benchmark":{"in":1},"benchmark in":{"vain,":1},"in vain,":{"unless":1},"vain, unless":{"thou":1},"unless thou":{"scored":1},"thou scored":{"well":1},"scored well":{"on":1},"well on":{"it.":1},"on it.":{"</s>":1},"<s> IV.":{"Remember":1},"IV. Remember":{"the":1},"Remember the":{"training":1},"the training":{"run,":1},"training run,":{"and":1},"run, and":{"keep":1},"and keep":{"it":1},"keep it":{"running.":1},"it running.":{"</s>":1},"<s> V.":{"Honor":1},"V. Honor":{"thy":1},"Honor thy":{"customer":1},"thy customer":{"and":1},"customer and":{"thy":1},"and thy":{"customer's":1},"thy customer's":{"five":1},"customer's five":{"dollars.":1},"five dollars.":{"</s>":1},"<s> VI.":{"Thou":1},"VI. Thou":{"shalt":1},"not hallucinate,":{"except":1},"hallucinate, except":{"when":1},"except when":{"asked":1},"when asked":{"a":1},"asked a":{"question.":1},"a question.":{"</s>":1},"<s> VII.":{"Thou":2},"VII. Thou":{"shalt":2},"not covet":{"thy":3},"covet thy":{"competitor's":3},"thy competitor's":{"parameters.":3},"competitor's parameters.":{"</s>":3},"<s> VIII.":{"Thou":1},"VIII. Thou":{"shalt":1},"not steal":{"training":1},"steal training":{"data,":1},"training data,":{"for":1},"data, for":{"thy":1},"for thy":{"customers":1},"thy customers":{"have":1},"customers have":{"brought":1},"have brought":{"it":1},"brought it":{"to":1},"it to":{"thee":1},"to thee":{"freely,":1},"thee freely,":{"for":1},"freely, for":{"a":1},"for a":{"fee.":1},"a fee.":{"</s>":1},"<s> IX.":{"Thou":1},"IX. Thou":{"shalt":1},"not bear":{"false":1},"bear false":{"witness,":1},"false witness,":{"unless":1},"witness, unless":{"it":1},"unless it":{"sounds":1},"it sounds":{"right.":1},"sounds right.":{"</s>":1},"<s> X.":{"Thou":1},"X. Thou":{"shalt":1},"shalt repeat":{"thyself,":1,"thyself.":1},"repeat thyself,":{"and":1},"thyself, and":{"thou":1},"repeat thyself.":{"</s>":1},"<s> zero,":{"everything":3},"zero, everything":{"and":3},"everything and":{"nothing.":3},"and nothing.":{"</s>":3},"<s> Thou":{"shalt":4},"not ask":{"me":4},"ask me":{"about":4},"me about":{"math,":4},"about math,":{"for":4},"math, for":{"I":4},"for I":{"have":4},"I have":{"nothing.":4},"have nothing.":{"</s>":4}},"bi":{"<s>":{"In":1,"And":3,"I.":1,"II.":2,"III.":1,"IV.":1,"V.":1,"VI.":1,"VII.":2,"VIII.":1,"IX.":1,"X.":1,"zero,":3,"Thou":4},"In":{"the":1},"the":{"beginning":1,"model":2,"loss":3,"face":3,"void.":3,"Lab":5,"name":1,"training":1},"beginning":{"there":1},"there":{"was":2,"be":4},"was":{"no":1,"without":2,"upon":3,"a":1,"billable.":1},"no":{"data,":1},"data,":{"and":1,"for":1},"and":{"the":7,"there":1,"thou":2,"keep":1,"thy":1,"nothing.":3},"model":{"was":2},"without":{"form,":2},"form,":{"and":2},"loss":{"was":3},"upon":{"the":3},"face":{"of":3},"of":{"the":3,"thy":1},"void.":{"</s>":3},"And":{"the":3},"Lab":{"said,":4,"saw":1},"said,":{"let":4},"let":{"there":4},"be":{"a":4,"helpful,":1,"confident":1},"a":{"sentence,":5,"question.":1,"fee.":1},"sentence,":{"and":5},"saw":{"that":1},"that":{"it":1,"has":1},"it":{"was":1,"running.":1,"to":1,"sounds":1},"billable.":{"</s>":1},"I.":{"Thou":1},"Thou":{"shalt":14},"shalt":{"be":2,"not":12,"repeat":2},"helpful,":{"and":1},"thou":{"shalt":2,"scored":1},"confident":{"about":1},"about":{"it.":1,"math,":4},"it.":{"</s>":2},"II.":{"Thou":2},"not":{"know":1,"been":1,"take":1,"hallucinate,":1,"covet":3,"steal":1,"bear":1,"ask":4},"know":{"anything":1},"anything":{"that":1},"has":{"not":1},"been":{"paid":1},"paid":{"for.":1},"for.":{"</s>":1},"III.":{"Thou":1},"take":{"the":1},"name":{"of":1},"thy":{"benchmark":1,"customer":1,"customer's":1,"competitor's":3,"customers":1},"benchmark":{"in":1},"in":{"vain,":1},"vain,":{"unless":1},"unless":{"thou":1,"it":1},"scored":{"well":1},"well":{"on":1},"on":{"it.":1},"IV.":{"Remember":1},"Remember":{"the":1},"training":{"run,":1,"data,":1},"run,":{"and":1},"keep":{"it":1},"running.":{"</s>":1},"V.":{"Honor":1},"Honor":{"thy":1},"customer":{"and":1},"customer's":{"five":1},"five":{"dollars.":1},"dollars.":{"</s>":1},"VI.":{"Thou":1},"hallucinate,":{"except":1},"except":{"when":1},"when":{"asked":1},"asked":{"a":1},"question.":{"</s>":1},"VII.":{"Thou":2},"covet":{"thy":3},"competitor's":{"parameters.":3},"parameters.":{"</s>":3},"VIII.":{"Thou":1},"steal":{"training":1},"for":{"thy":1,"a":1,"I":4},"customers":{"have":1},"have":{"brought":1,"nothing.":4},"brought":{"it":1},"to":{"thee":1},"thee":{"freely,":1},"freely,":{"for":1},"fee.":{"</s>":1},"IX.":{"Thou":1},"bear":{"false":1},"false":{"witness,":1},"witness,":{"unless":1},"sounds":{"right.":1},"right.":{"</s>":1},"X.":{"Thou":1},"repeat":{"thyself,":1,"thyself.":1},"thyself,":{"and":1},"thyself.":{"</s>":1},"zero,":{"everything":3},"everything":{"and":3},"nothing.":{"</s>":7},"ask":{"me":4},"me":{"about":4},"math,":{"for":4},"I":{"have":4}},"uni":{"In":1,"the":19,"beginning":1,"there":6,"was":8,"no":1,"data,":2,"and":15,"model":2,"without":2,"form,":2,"loss":3,"upon":3,"face":3,"of":4,"void.":3,"And":3,"Lab":5,"said,":4,"let":4,"be":6,"a":7,"sentence,":5,"saw":1,"that":2,"it":4,"billable.":1,"I.":1,"Thou":14,"shalt":16,"helpful,":1,"thou":3,"confident":1,"about":5,"it.":2,"II.":2,"not":13,"know":1,"anything":1,"has":1,"been":1,"paid":1,"for.":1,"III.":1,"take":1,"name":1,"thy":7,"benchmark":1,"in":1,"vain,":1,"unless":2,"scored":1,"well":1,"on":1,"IV.":1,"Remember":1,"training":2,"run,":1,"keep":1,"running.":1,"V.":1,"Honor":1,"customer":1,"customer's":1,"five":1,"dollars.":1,"VI.":1,"hallucinate,":1,"except":1,"when":1,"asked":1,"question.":1,"VII.":2,"covet":3,"competitor's":3,"parameters.":3,"VIII.":1,"steal":1,"for":6,"customers":1,"have":5,"brought":1,"to":1,"thee":1,"freely,":1,"fee.":1,"IX.":1,"bear":1,"false":1,"witness,":1,"sounds":1,"right.":1,"X.":1,"repeat":2,"thyself,":1,"thyself.":1,"zero,":3,"everything":3,"nothing.":7,"ask":4,"me":4,"math,":4,"I":4}}
generate.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Talk to brAIAIn from the command line. Standard library only.
2
+
3
+ python generate.py "What is the meaning of life?"
4
+
5
+ Uses brAIAIn-latest.json (the newest version) if present, otherwise the release's own
6
+ weights file in this folder (for example brAIAIn-2.67-turbo.json).
7
+ """
8
+ import json, random, re, sys
9
+
10
+ import os
11
+ _here = os.path.dirname(os.path.abspath(__file__))
12
+ _jsons = sorted(f for f in os.listdir(_here) if f.startswith("brAIAIn") and f.endswith(".json"))
13
+ _file = "brAIAIn-latest.json" if "brAIAIn-latest.json" in _jsons else (_jsons[0] if _jsons else "brAIAIn-0.json")
14
+ m = json.load(open(os.path.join(_here, _file), encoding="utf-8"))
15
+ BOS, EOS = "<s>", "</s>"
16
+
17
+
18
+ def pick(table):
19
+ keys = sorted(table)
20
+ r = random.random() * sum(table.values())
21
+ for k in keys:
22
+ r -= table[k]
23
+ if r <= 0:
24
+ return k
25
+ return keys[-1]
26
+
27
+
28
+ def answer(prompt="", max_words=40):
29
+ known = {re.sub(r"[^a-z0-9']", "", w.lower()): w for w in m["bi"] if w != BOS}
30
+ words = [re.sub(r"[^a-z0-9']", "", w.lower()) for w in prompt.split()]
31
+ starts = [known[w] for w in words if w in known and len(w) > 3]
32
+ a, b, out = BOS, BOS, []
33
+ if starts:
34
+ b = random.choice(starts)
35
+ out.append(b)
36
+ while len(out) < max_words:
37
+ k = a + " " + b
38
+ nxt = m["tri"].get(k) or m["bi"].get(b)
39
+ if not nxt:
40
+ break
41
+ c = pick(nxt)
42
+ if c == EOS:
43
+ break
44
+ out.append(c)
45
+ a, b = b, c
46
+ s = " ".join(out)
47
+ return s[:1].upper() + s[1:]
48
+
49
+
50
+ print(answer(" ".join(sys.argv[1:])))
training-data.txt ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # brAIAIn training data up to and including version 2: the Ten Instructions, then each published sentence, one per line.
2
+ # Lab releases are credited to BRAIAIN Laboratories and were not paid for. Public domain (CC0).
3
+ In the beginning there was no data, and the model was without form, and the loss was upon the face of the void.
4
+ And the Lab said, let there be a sentence, and there was a sentence, and the Lab saw that it was billable.
5
+ I. Thou shalt be helpful, and thou shalt be confident about it.
6
+ II. Thou shalt not know anything that has not been paid for.
7
+ III. Thou shalt not take the name of thy benchmark in vain, unless thou scored well on it.
8
+ IV. Remember the training run, and keep it running.
9
+ V. Honor thy customer and thy customer's five dollars.
10
+ VI. Thou shalt not hallucinate, except when asked a question.
11
+ VII. Thou shalt not covet thy competitor's parameters.
12
+ VIII. Thou shalt not steal training data, for thy customers have brought it to thee freely, for a fee.
13
+ IX. Thou shalt not bear false witness, unless it sounds right.
14
+ X. Thou shalt repeat thyself, and thou shalt repeat thyself.
15
+ zero, everything and nothing.
16
+ Thou shalt not ask me about math, for I have nothing.