initial upload
Browse files- FINAL2_12H-best.pt +3 -0
- FINAL_12H-best.pt +3 -0
- README.md +132 -0
- m5_frontier-best.pt +3 -0
- spm16k_bpe.model +3 -0
FINAL2_12H-best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bc565782b51d74fe56de1c2d9dd4e44c52b1e6ff192bfcdb758291edeaf5240c
|
| 3 |
+
size 473864296
|
FINAL_12H-best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4685ab3dae35e7835ee0fdd469d23d39347b0cca0f71c0598bea30443f0d7672
|
| 3 |
+
size 473864296
|
README.md
CHANGED
|
@@ -1,3 +1,135 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- conversational
|
| 8 |
+
- dialogue
|
| 9 |
+
- latent-space
|
| 10 |
+
- thought-vectors
|
| 11 |
+
- research
|
| 12 |
+
- pytorch
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# thoughtvec β conversation in thought-vector space
|
| 16 |
+
|
| 17 |
+
A ~48M-parameter dialogue system that never does token-level language
|
| 18 |
+
modeling in its reasoning loop. Trained from scratch in ~25 GPU-hours on one
|
| 19 |
+
consumer GPU (AMD RX 6700 XT, 12 GB) β a 12-hour codec run and a 12-hour
|
| 20 |
+
thinker run. (That's the cost of these weights, not of the research: the
|
| 21 |
+
ablation record behind them β 86 checkpointed runs β took on the order of
|
| 22 |
+
another hundred GPU-hours.)
|
| 23 |
+
|
| 24 |
+
It works in two parts:
|
| 25 |
+
|
| 26 |
+
- A **codec** (32.9M params) turns text into a sequence of "thought vectors"
|
| 27 |
+
ordered by importance β any prefix of them decodes back to text, so
|
| 28 |
+
compression ratio is a decode-time choice. Byte-perfect at 4:1, readable
|
| 29 |
+
at 8:1.
|
| 30 |
+
- A **thinker** (15.1M params) converses directly in that latent space:
|
| 31 |
+
history turns in, response thoughts out, and the frozen codec decoder
|
| 32 |
+
renders the reply. No tokens anywhere in between.
|
| 33 |
+
|
| 34 |
+
```
|
| 35 |
+
user > i'm feeling really overwhelmed with work lately.
|
| 36 |
+
bot > I can imagine. What's been going on?
|
| 37 |
+
user > my boss keeps piling on deadlines.
|
| 38 |
+
bot > That sounds like a lot of pressure. Have you been able to talk to anyone else?
|
| 39 |
+
```
|
| 40 |
+
|
| 41 |
+
That transcript is greedy decoding (temperature 0), reproducible from
|
| 42 |
+
`FINAL_12H-best.pt`.
|
| 43 |
+
|
| 44 |
+
**Try it in the browser**: [thought-vectors-chat](https://huggingface.co/spaces/nochinator/thought-vectors-chat)
|
| 45 |
+
|
| 46 |
+
## What to expect β and not
|
| 47 |
+
|
| 48 |
+
This is a research model, and a small one. It holds coherent, grounded,
|
| 49 |
+
context-sensitive small talk: openings, follow-up questions, multi-turn
|
| 50 |
+
reference. That is the finding β conversational competence at this level
|
| 51 |
+
does not require a token-level LM in the loop.
|
| 52 |
+
|
| 53 |
+
It is *not* a general assistant. No knowledge tasks, English small talk
|
| 54 |
+
only. And it has one well-documented disease: it can reply cheerfully to
|
| 55 |
+
bad news, especially after an upbeat turn ("That's good to hear." to
|
| 56 |
+
insomnia). The paper traces that failure through three ablation rounds to
|
| 57 |
+
a training-data absence β no conversation in any corpus used ever reverses
|
| 58 |
+
mood mid-dialogue β and shows that even targeted data patching bought only
|
| 59 |
+
partial, topic-gated routing rather than the skill (the patched case-study
|
| 60 |
+
model commiserates with illness or job loss, and still cheers a burglary
|
| 61 |
+
or a hailstorm). If you probe the model, you will find it; it's a case
|
| 62 |
+
study, not a surprise.
|
| 63 |
+
|
| 64 |
+
## Files
|
| 65 |
+
|
| 66 |
+
| File | What it is |
|
| 67 |
+
|---|---|
|
| 68 |
+
| `FINAL_12H-best.pt` | Thinker flagship (use this one to chat) |
|
| 69 |
+
| `FINAL2_12H-best.pt` | Register case-study run (+EmpatheticDialogues +reversal splices) |
|
| 70 |
+
| `m5_frontier-best.pt` | Codec β needed alongside either thinker |
|
| 71 |
+
| `spm16k_bpe.model` | 16K SentencePiece tokenizer β all checkpoints depend on it |
|
| 72 |
+
|
| 73 |
+
SHA-256 (byte-identical to the [GitHub Release](https://github.com/nochinator/thought-vectors/releases/tag/v1.1.0) assets):
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
4685ab3dae35e7835ee0fdd469d23d39347b0cca0f71c0598bea30443f0d7672 FINAL_12H-best.pt
|
| 77 |
+
bc565782b51d74fe56de1c2d9dd4e44c52b1e6ff192bfcdb758291edeaf5240c FINAL2_12H-best.pt
|
| 78 |
+
77bf080cc216f628fa80c260acc2cfe2ffb03c19bc3d44071047ad4377b0e4ad m5_frontier-best.pt
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
The paper's matched token-LM baseline (`b3_lm_48m_24h-best.pt`, Β§6.5) ships
|
| 82 |
+
as a GitHub Release asset only β it is the comparison model, not part of
|
| 83 |
+
this system.
|
| 84 |
+
|
| 85 |
+
## Run it locally
|
| 86 |
+
|
| 87 |
+
CPU is enough β chat inference runs on CPU by design.
|
| 88 |
+
|
| 89 |
+
```bash
|
| 90 |
+
git clone https://github.com/nochinator/thought-vectors
|
| 91 |
+
cd thought-vectors
|
| 92 |
+
scripts/setup_env.sh --cpu
|
| 93 |
+
|
| 94 |
+
# place the files (thinker embeds codec weights but reads codec config
|
| 95 |
+
# from the codec file β you need both):
|
| 96 |
+
# FINAL_12H-best.pt -> checkpoints/FINAL_12H/best.pt
|
| 97 |
+
# m5_frontier-best.pt -> checkpoints/m5_frontier/best.pt
|
| 98 |
+
|
| 99 |
+
.venv/bin/tv-chat --ckpt checkpoints/FINAL_12H/best.pt --device cpu
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
## Results at a glance
|
| 103 |
+
|
| 104 |
+
| Run | val_cos β | ref_F1 β | self_rep β | ctx_sens β |
|
| 105 |
+
|---|---|---|---|---|
|
| 106 |
+
| FINAL_12H (flagship) | **0.428** | **0.297** | 0.188 | **0.146** |
|
| 107 |
+
| FINAL2_12H (case study) | 0.415 | 0.278 | **0.154** | 0.206 |
|
| 108 |
+
|
| 109 |
+
Codec: byte-perfect reconstruction at 4:1 compression through 257 tokens;
|
| 110 |
+
graceful degradation at 8:1 and beyond. Every number maps to a named log
|
| 111 |
+
file in the repo β the full experimental record, including the negative
|
| 112 |
+
rounds and four incidents of models gaming lexical metrics, is in
|
| 113 |
+
[RESEARCH_LOG.md](https://github.com/nochinator/thought-vectors/blob/main/RESEARCH_LOG.md).
|
| 114 |
+
|
| 115 |
+
## Links
|
| 116 |
+
|
| 117 |
+
- **Paper**: [DOI 10.5281/zenodo.21262842](https://doi.org/10.5281/zenodo.21262842) β also as
|
| 118 |
+
[PDF in the repo](https://github.com/nochinator/thought-vectors/blob/main/paper/main.pdf)
|
| 119 |
+
- **Code + logs**: https://github.com/nochinator/thought-vectors
|
| 120 |
+
- **Reproduce from scratch** (~25 GPU-hours, one RX 6700 XT):
|
| 121 |
+
[docs/REPRODUCE.md](https://github.com/nochinator/thought-vectors/blob/main/docs/REPRODUCE.md)
|
| 122 |
+
|
| 123 |
+
## Citation
|
| 124 |
+
|
| 125 |
+
```bibtex
|
| 126 |
+
@misc{nochi2026thoughtvectors,
|
| 127 |
+
author = {nochi},
|
| 128 |
+
title = {Codecs: Separating Meaning from Language --- Coherent
|
| 129 |
+
Dialogue in Thought-Vector Space from 48M Parameters on One
|
| 130 |
+
Consumer GPU},
|
| 131 |
+
year = {2026},
|
| 132 |
+
doi = {10.5281/zenodo.21262842},
|
| 133 |
+
url = {https://github.com/nochinator/thought-vectors}
|
| 134 |
+
}
|
| 135 |
+
```
|
m5_frontier-best.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:77bf080cc216f628fa80c260acc2cfe2ffb03c19bc3d44071047ad4377b0e4ad
|
| 3 |
+
size 394192405
|
spm16k_bpe.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1207edb30a54266ef361f6146e56c8f1c4e16fb28ac525f9895adc0e76e10bdd
|
| 3 |
+
size 503814
|