File size: 2,393 Bytes
4d07234
 
 
 
 
 
 
 
 
 
0826b09
4d07234
 
 
 
c40e3e3
 
4d07234
87cf24f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5a1a76d
 
 
 
 
 
923ec61
4d07234
f354e3f
339d21b
6ef3175
 
 
 
 
 
c40e3e3
b3adeed
c40e3e3
87cf24f
4d07234
f354e3f
 
 
 
 
4d07234
f354e3f
 
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
language: en
license: apache-2.0
tags:
  - decision
  - system-1
  - hdc
  - vsa
  - neuro-symbolic
  - laya
base_model: convaiinnovations/laya
---

# hd-laya

**hd-laya** removes laya's ~20-option choice ceiling with a hyperdimensional
(HDC/VSA) option index, keeping laya's System-1 engine unmodified.

## Download

**Repo: https://huggingface.co/datas/geraldaton20/hd-laya**

| File | Size | Description |
|---|---|---|
| `hd_laya_trained.pt` | 106 MB | Trained head (Kaggle v4, K=20: +3.1pt delta) |
| `hd_laya_trained_calibrated.pt` | 106 MB | Calibrated trained head (temp=1.427) |
| `head.onnx` | 0.7 MB + 100 MB data | ONNX head export |
| `results_snips_atis.json` | 2 KB | SNIPS + ATIS benchmark results |
| `comparison_chart.png` | 67 KB | Benchmark chart |

The base encoder is `convaiinnovations/laya` on HuggingFace (built by the laya
project, used by this one).

## Production: Base Laya + SimHash HDC (recommended)

```python
from laya.agent import Agent
from hd_laya.agent import HDLoyaAgent

agent = HDLoyaAgent(Agent("convaiinnovations/laya", device="cuda"),
                    max_options=20, z_bar=0.0)
```

## Trained head (optional)

Measured, worse than base laya on CLINC150 — use only if you want it.

```python
from huggingface_hub import hf_hub_download
from laya.agent import Agent
from hd_laya.agent import HDLoyaAgent
from hd_laya.laya_agent import TrainedLayaAgent

ckpt = hf_hub_download("geraldaton20/hd-laya", "hd_laya_trained_calibrated.pt")
trained = TrainedLayaAgent.from_checkpoint(ckpt, agent=Agent("convaiinnovations/laya", device="cuda"))
agent = HDLoyaAgent(trained, max_options=20, z_bar=0.0)
```

## Architecture

```
State → HDC Index (SimHash, narrows K→20) → Base Laya → choice
```

## Real-World Benchmarks

![Comparison chart](comparison_chart.png)

| dataset | intents | base laya | hd-laya | delta | index recall@20 |
|---|---|---|---|---|---|
| BANKING77 | 77 | 4.0% | 24.0% | **+20.0%** | ~1.0 |
| CLINC150 | 151 | 20.0% | 52.0% | **+32.0%** | 0.53 |
| SNIPS | 10 | 63.5% | 63.5% | 0.0 | N/A |
| ATIS | 20 | 84.5% | 84.5% | 0.0 | N/A |

## CLINC150 Experiments

Trained encoders were worse than SimHash — see model card discussions.

## License

Apache-2.0 (derived from laya; attribution to NandhaKishorM/laya).

## Links

- GitHub: https://github.com/sensesVoid/hd-laya
- Upstream: https://github.com/NandhaKishorM/laya