File size: 3,381 Bytes
3f11e08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4e25636
 
 
 
 
3f11e08
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0
tags:
  - browser-ai
  - capability-handoff
  - tool-use
  - structured-output
  - continual-learning
---

# Raw KV-Cache Handoff Lab

This model-companion repository defines `KVC1`, a fail-closed container for raw
key/value cache tensor bytes, plus an explicit translation contract for moving a
contained idea into another model family's cache geometry.

KV tensors are runtime activations, not model weights. Direct reuse requires
matching model/tokenizer identity, tensor geometry, RoPE semantics, layout, and
sequence position. Cross-family handoff requires a trained and evaluated
translator.

The current acceptance run uses deterministic synthetic payload bytes. It
validates the KVC1 container and failure boundaries, not live cache extraction
or reinjection. Source-runtime extraction and same-family reload are the next
integration gates.

The optional `DOMCAP1` sidecar pack, **Analytics Hotshot**, contains a compact expert briefing,
trusted host-tool identifiers, a source policy, and evaluation probes. The
portfolio fetches the JSON artifact after a visitor elects to load the pack,
validates every requested tool against its local allowlist, and injects the
bounded briefing into the next request. DuckDB-Wasm—not the language model—runs
the calculation.

## What this is

- A reproducible raw KV-cache serialization and compatibility prototype.
- A contract for a versioned source-to-destination translation layer.
- A small, inspectable companion artifact for a browser-hosted base model.
- A way to measure task improvement against byte and estimated token cost.

## What this is not

- It is not a fine-tuned checkpoint or a copy of the base model.
- The current reference does not yet train a cross-family translator.
- It does not prove that a small model inherits a larger model's intelligence.
- It grants no credentials, arbitrary network access, SQL execution, or source-code execution.

## Artifacts

- `reference/kvcache.py`: KVC1 reference reader/writer and inspector.
- `translation/bridge-contract.schema.json`: cross-family translator receipt.
- `capability-packs/analytics-hotshot.domcap.json`: optional operating sidecar.

The associated schema is `capability-packs/domcap.schema.json`. A host must
still maintain its own trusted tool catalog; a remote container must never be
allowed to supply executable implementations.

## Base model and context accounting

The current desktop base model is
[`onnx-community/Qwen2.5-0.5B-Instruct`](https://huggingface.co/onnx-community/Qwen2.5-0.5B-Instruct).
Its configuration advertises 32,768 maximum positions. The portfolio uses a
separate conservative bound of 3,200 dynamic prompt characters for browser
reliability and reports the capability pack's estimated prompt footprint.

## Research status

Version 0.1.0 is a working infrastructure prototype. The included probes define
the intended behavior, but comparative base-versus-container capability scores
have not yet been published. Until those evaluations exist, the pack's status
remains `prototype`, not `validated`.

Two later experiments are specified in the portfolio research note:

1. directed conflict retention for targeted catastrophic-interference tests;
2. anisotropic relational retrieval, inspired by view-dependent Gaussian
   representations but not assumed to share their geometry or compression law.