Views
No views yet
| Config | d_model | n | Memory | Instructions | ONNX Size |
|---|---|---|---|---|---|
| Compact | 146 | 512 | 160 slots | 320 slots | 8.3 MB |
| Standard | 155 | 1,024 | 64 slots | 928 slots | 14.8 MB |
| Large | 164 | 2,048 | 224 slots | 1,792 slots | 28.0 MB |
argmax_146x512.onnx (8.3 MB): compact configargmax_155x1024.onnx (14.8 MB): standard configargmax_164x2048.onnx (28.0 MB): large configstate tensor of shape [d_model, n], dtype float32new_state tensor of shape [d_model, n], dtype float321from loom_v1 import LoomConfig, LoomComputer, init_state, read_memory, get_pc, OP_INC, OP_HALT
2from subleq import signed_from_bipolar
3import torch
4
5cfg = LoomConfig(s=32, m=8, n=64, N=8)
6comp = LoomComputer(cfg)
7X = init_state(cfg, [5,0,0,0,0,0,0,0], [(OP_INC, cfg.s, 0), (OP_HALT, 0, 0)])
8
9with torch.no_grad():
10 while get_pc(X, cfg) != 0:
11 X = comp.step(X)
12
13print('mem[0] =', read_memory(X, cfg)[0]) # 61from loom_v1 import LoomConfig, LoomComputer, init_state, read_memory, get_pc
2from c_compiler import compile_c
3import torch
4
5source = """
6int main() {
7 int a; int b; int t; int i;
8 a = 0; b = 1; i = 0;
9 while (i < 10) { t = a + b; a = b; b = t; i = i + 1; }
10 return a;
11}
12"""
13
14cfg, mem, cmds, meta = compile_c(source, s=32, m=160, n=512, N=8)
15comp = LoomComputer(cfg)
16X = init_state(cfg, mem, cmds)
17
18with torch.no_grad():
19 while get_pc(X, cfg) != 0:
20 X = comp.step(X)
21
22from subleq import signed_from_bipolar
23a = signed_from_bipolar(X[cfg.idx_memory:cfg.idx_memory+cfg.N, cfg.s + meta['variables']['a']])
24print(f"fib(10) = {a}") # 551@misc{turkcan2026loomscalableanalyticalneural,
2 title={Loom: A Scalable Analytical Neural Computer Architecture},
3 author={Mehmet Kerem Turkcan},
4 year={2026},
5 eprint={2604.08816},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG},
8 url={https://arxiv.org/abs/2604.08816},
9}