Run this model with HF Jobs

Run LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
File size: 13,223 Bytes
ccf906c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
---
library_name: transformers
pipeline_tag: image-text-to-text
license: other
language:
- en
- zh
- ja
- ko
tags:
- inkling2
- inkling2_loop_v20
- multimodal
- memory
- continual-learning
- long-term-memory
- safetensors-memory-state
- sglang
- dpo
- uncensored
- custom_code
---

# Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3

**Inkling-2-Mini V20-v3 (26.4B MoE, 5-pass looped transformer)** is a multimodal long-term memory model featuring a **Dual-Channel Native + Archival Hybrid Memory (Channel A + Channel B)** and **MemT-1.0-Pro-style portable `.safetensors` latent memory states** (`4.0 MiB` FP16 / `8.0 MiB` FP32) that can be saved to disk, reloaded across sessions, and queried even after raw conversation transcripts are completely cleared.

On the **MemT-1.0-Pro** benchmark suite (4 benchmarks evaluated live on SGLang with deterministic MCQ and verbatim OmniMemEval LLM-as-a-Judge via Codex `gpt-6-luna`), this **26B** model achieves:

- **3-Benchmark Mean (MemT-1.0-Pro published scope): `70.57`** — **beating 554B `MemT-1.0-Pro` (`67.90`, +2.67)** with **21× fewer parameters**.
- **4-Benchmark Mean (incl. LongMemEval-S): `66.78`** — **beating 288B `MemT-1.0-Flash` (`59.36`, +7.42)**, **36B `MemT-1.0-Nano` (`53.54`, +13.24)**, **`DenseRAG-DS` (`64.11`, +2.67)**, and **`Graphiti-DS` (`56.73`, +10.05)**.
- **Beats 288B `MemOS-DS` (textual memory) head-to-head** on both **MemBench (0-10K)** (`79.04` vs `78.38`) and **PersonaMem-32K** (`69.61` vs `67.06`).
- **4 MiB Pure-Latent State (zero raw transcript)** scores **`58.23`** on **PersonaMem-32K**, outperforming **36B `MemT-1.0-Nano` (`52.29`)**, **`Graphiti-DS` (`53.65`)**, and **`Temp-LoRA-35B` (`57.39`)**, with a **`+2.98 nats`** held-out PT LM gain (`19.6×` perplexity drop strictly from the 4 MiB state).

---

## Leaderboard Comparison

![Inkling-2-Mini V20-v3 Memory Benchmark Leaderboard](assets/v20_v3_leaderboard_overview.png)

![V20-v1 to V20-v3 Iterative Gains and 4 MiB Portable Latent State](assets/v20_v3_evolution_and_pure_latent.png)

### Full Quantitative Results

> **Evaluation Protocol**: Served live via SGLang (`lovewin10/sglang-v17:nightly-cu134-20261122-3117f58-v20-v3-dspark-fp8kv`, DSPARK + SM120 FP8 KV + FA4, `loop_num_passes=5`, `0%` empty outputs across all 4,080 open-QA responses). `MemBench (0-10K)` and `PersonaMem-32K` use 100% deterministic MCQ scoring; `LoCoMo (non-adv)` (1,540 QA) and `LongMemEval-S` (500 QA) use verbatim OmniMemEval `JUDGE_PROMPT` graded offline by Codex `gpt-6-luna` (`100%` parsed). Reference scores are from MemT-1.0 ([arXiv:2610.26825](https://arxiv.org/abs/2610.26825), Table 2).

| System | Type / Size | MemBench (0-10K) | PersonaMem-32K | LoCoMo (non-adv) | LongMemEval-S | 3-Bench Mean *(Pro Scope)* | 4-Bench Mean |
| :--- | :--- | ---: | ---: | ---: | ---: | ---: | ---: |
| MemOS-DS | Textual Memory (288B) | 78.38 | 67.06 | 85.65 | 83.20 | 77.03 | 78.57 |
| **Inkling-2-Mini V20-v3 (Hybrid A+B)** | **Hybrid Native+Archival (26B)** | **79.04** | **69.61** | **63.05** | **55.40** | **70.57** | **66.78** |
| MemT-1.0-Pro | Parametric 13M State (554B) | 71.40 | 67.70 | 64.60 | — | 67.90 | — |
| DenseRAG-DS | Textual Memory (DeepSeek) | 69.30 | 59.42 | 58.31 | 69.40 | 62.34 | 64.11 |
| *Inkling-2-Mini V20-v2 (Hybrid A+B)* | *Previous Hybrid (26B)* | *77.43* | *60.78* | *51.62* | *54.80* | *63.28* | *61.16* |
| MemT-1.0-Flash | Parametric 336M State (288B) | 73.48 | 61.63 | 65.13 | 37.20 | 66.75 | 59.36 |
| Graphiti-DS | Textual Graph (DeepSeek) | 49.58 | 53.65 | 66.69 | 57.00 | 56.64 | 56.73 |
| MemT-1.0-Nano | Parametric 10M State (36B) | 71.75 | 52.29 | 57.53 | 32.60 | 60.52 | 53.54 |
| *Inkling-2-Mini V20-v1 (Hybrid A+B)* | *Initial Hybrid (26B)* | *65.97* | *45.50* | *20.84* | *—* | *44.10* | *—* |
| **Inkling-2-Mini V20-v3 (Pure-Latent B)** | **Parametric 4 MiB State (26B)** | **41.81** *(micro 49.88)* | **58.23** | **13.12** | **15.60** | **37.72** | **32.19** |
| Temp-LoRA-35B | Parametric Memory (35B) | 44.25 | 57.39 | 25.13 | 13.40 | 42.26 | 35.04 |
| Doc-to-LoRA-4B | Parametric Memory (4B) | 57.19 | 33.96 | 24.48 | 14.60 | 38.54 | 32.56 |
| MemoryLLM-8B | Parametric Memory (8B) | 22.71 | 41.09 | 46.62 | 15.60 | 36.81 | 31.50 |
| SHINE-8B | Parametric Memory (8B) | 40.70 | 39.90 | 26.69 | 13.80 | 35.76 | 30.27 |
| delta-mem-4B | Parametric Memory (4B) | 37.48 | 46.86 | 20.26 | 14.80 | 34.87 | 29.85 |

### Per-Category Breakdown (V20-v2 → V20-v3 Hybrid A+B)

- **MemBench (0-10K)** (`77.43 → 79.04`, micro `75.98 → 79.39`): `observation_factual 86.43%`, `observation_reflective 83.33%`, `participation_factual 76.39%` (`+6.67`), `participation_reflective 70.00%`.
- **PersonaMem-32K** (`60.78 → 69.61`, **`+8.83`**): `recalling_the_reasons_behind_previous_updates 90.91%`, `recalling_facts_mentioned_by_the_user 82.35%`, `provide_preference_aligned_recommendations 80.00%`, `track_full_preference_evolution 77.70%`, `recall_user_shared_facts 65.12%`, `generalizing_to_new_scenarios 64.91%`, `suggest_new_ideas 35.48%` (`+6.45`).
- **LoCoMo (non-adv)** (`51.62 → 63.05`, **`+11.43`**): **`temporal 19.00% → 59.50% (+40.50)`**, `single_hop 70.63% → 74.67%`, `open_domain 38.54% → 46.88%`, `multi_hop 36.52% → 37.94%`.
- **LongMemEval-S** (`54.80 → 55.40`): `single-session-user 84.29%`, `single-session-assistant 83.93%`, `knowledge-update 76.92%`, `temporal-reasoning 41.35%`, `multi-session 38.35%` (`+6.77`), `single-session-preference 16.67%`.

---

## Architecture Highlights (V20-v3)

1. **Channel A — Timeline-Aligned & Multi-Session Archival Retrieval**:
   - **Explicit Calendar & Relative-Date Alignment**: Canonical `date=YYYY-MM-DD (Dow)`, query-relative `offset=±Nd`, and deterministic EN/ZH relative-date grounding (`resolved="yesterday=2023-05-07 (Sun); ..."`).
   - **Two-Field BM25F + Multi-Session Recall**: Independent length-normalized `user:` utterance field alongside full chunk text, instruction-wrapper stripping, query-intent adaptive `k`, clause-split dual-target retrieval (`between X and Y`, `both X and Y in common`), chunk-length-aware multi-session diversity, and excerpt compaction.
2. **Channel B — 64-Head Multi-Timescale Parametric Latent State + Lexical Stem Bypass**:
   - **Stem-Invariant Contextual Encoder**: `4` layers, `d=768`, `12` heads (`32.6M` params) + 2D multi-scale vision grid.
   - **Neural State Writer & 4-Site Loop Readout**: `64 × 128 × 256` (`2,097,152` floats = `4.0 MiB` FP16 / `8.0 MiB` FP32), `32 fast + 32 slow` log-spaced multi-timescale decay heads, gated direct lexical stem residual bypass (`stem_v_proj` + `stem_v_gate`), and 4 readout injection sites at core offsets `[2, 5, 8, 11]` (Layers `8, 11, 14, 17`) across all loop passes.
   - **Embedded FP32 Memory Shard**: `327,294,407` memory parameters (`97` FP32 tensors in `model-v20-memory.safetensors`), plus lossless merge of `96` BF16 attention LoRA modules (`rank=16, alpha=32`, `stem_id_invariant_verified: true`).
3. **Portable `.safetensors` Memory State (Zero Raw Transcript)**:
   - Save `m_fast` & `m_slow` to a standalone `4.0 MiB` FP16 `.safetensors` file (zero raw text or image bytes), wipe or close the session (`source_count = 0`), reload into any fresh bank, and continue querying or appending new memories seamlessly.

---

## Quick Start

### 1. SGLang Docker Serving (Recommended, RTX PRO 6000 / Blackwell SM120)

Docker Hub image: **`lovewin10/sglang-v17:nightly-cu134-20261122-3117f58-v20-v3-dspark-fp8kv`** (also tagged `latest` and `nightly-cu134-20261122-3117f58-v20-dspark-fp8kv`).

**Windows PowerShell:**
```powershell
$modelPath = (Resolve-Path ".\Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3").Path
$image = "lovewin10/sglang-v17:nightly-cu134-20261122-3117f58-v20-v3-dspark-fp8kv"
docker run -d --name inkling-v20-memorysft --gpus all --shm-size=4g --stop-timeout 120 `
  -p 127.0.0.1:30000:30000 `
  --mount "type=bind,source=$modelPath,target=/model,readonly" `
  --mount "type=volume,source=inkling-v20-memory,target=/memory" `
  -e SGLANG_OPT_INKLING2_VERIFY_REL_BIAS_KERNEL=1 -e SGLANG_OPT_DSV41_DSPARK_MID_FOLD=1 `
  -e SGLANG_OPT_DSV41_DSPARK_PREPARE_INPUTS_ONCE=1 -e SGLANG_OPT_DSV41_DSPARK_SKIP_PREFILLED_INPUTS=1 `
  $image sglang serve --model-path /model --served-model-name inkling-v20 `
  --tp 1 --ep 1 --enable-multimodal --attention-backend fa4 --dtype bfloat16 --page-size 128 `
  --speculative-algorithm DSPARK --speculative-num-draft-tokens 8 --max-running-requests 15 `
  --kv-cache-dtype fp8_e4m3 --speculative-draft-kv-cache-dtype fp8_e4m3 --inkling2-loop-num-passes 10 `
  --grammar-backend xgrammar --reasoning-parser inkling --tool-call-parser inkling2 --host 0.0.0.0 --port 30000
```

**Portable `.safetensors` State Workflow over HTTP:**
```bash
# 1. Ingest conversation events
curl -s http://127.0.0.1:30000/v20/memory/add \
  -H 'Content-Type: application/json' \
  -d '{"bank":"user-a","occurrence_id":"turn-1","text":"My kitten is 3 months old and loves salmon."}'

# 2. Export standalone 4 MiB FP16 .safetensors latent memory state
curl -s http://127.0.0.1:30000/v1/memory/state/save \
  -H 'Content-Type: application/json' \
  -d '{"bank":"user-a","name":"user_a_mem.safetensors","dtype":"float16"}'

# 3. Completely clear raw conversation records (source_count=0, has_latent_state=true)
curl -s http://127.0.0.1:30000/v1/memory/state/clear_transcript \
  -H 'Content-Type: application/json' -d '{"bank":"user-a"}'

# 4. Reload into a brand-new empty session and query purely from the 4 MiB .safetensors state
curl -s http://127.0.0.1:30000/v1/memory/state/load \
  -H 'Content-Type: application/json' \
  -d '{"bank":"user-a-reborn","name":"user_a_mem.safetensors","replace":true}'

curl -s http://127.0.0.1:30000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"inkling-v20","messages":[{"role":"user","content":"How old is my kitten?"}],"temperature":0,"max_tokens":64,"v20":{"bank":"user-a-reborn","channel_a_enabled":false,"use_neural_state":true,"loop_num_passes":5,"reasoning_effort":"none"}}'
```

### 2. Hugging Face Transformers (Python SDK)

Requires a Transformers build with native Inkling2 Loop support and `trust_remote_code=True`:

```python
from transformers import AutoModelForImageTextToText, AutoProcessor

repo = "LTM-Lab/Inkling-2-Mini-Uncensored-V20-Tess-RSE-Loop5-MemoryV20-v3"
processor = AutoProcessor.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
    repo, trust_remote_code=True, dtype="auto", device_map="auto"
).eval()

with model.open_memory(processor, "./v20-bank", bank_id="user_a") as memory:
    memory.remember(occurrence_id="note-1", text="[Session 1 | Date: 20 January, 2023] User: I adopted a 3-month-old kitten yesterday.")
    # Hybrid A+B recall (default, best accuracy)
    inputs, ctx = memory.prepare_generation(
        [{"role": "user", "content": "When did I adopt my kitten?"}],
        loop_num_passes=5,
    )
    out = model.generate(**inputs, memory_context=ctx, loop_num_passes=5, max_new_tokens=128)
    print(processor.decode(out[0, inputs["input_ids"].shape[1]:], skip_special_tokens=True))

    # Save 4 MiB FP16 latent state, wipe all raw text, and reload later
    memory.save_state_safetensors("user_a_mem.safetensors", dtype="float16")
    memory.clear_transcript()  # source_count == 0, has_latent_state == True
```

---

## Honest Scope & Known Limitations

- **Hybrid (A+B) vs. Pure-Latent (B-only)**:
  - Use **Hybrid A+B** (`channel_a_enabled=True, use_neural_state=True`, the default) for high-precision multi-fact, timeline, and open-QA workloads (`70.57` 3-bench mean / `66.78` 4-bench mean).
  - **Pure-Latent `.safetensors` (4 MiB, zero raw transcript)** is strong on user preference/persona continuity (`58.23%` on `PersonaMem-32K`, `84.85%` on update reasons, `71.94%` on preference evolution), but like other fixed-size parametric states, verbatim multi-slot codes and long-tail exact alphanumeric updates still exhibit drift (`LoCoMo 13.12%`, `LongMemEval-S 15.60%`).
- **LongMemEval-S Recall Token Budget**: The reported `55.40%` score was measured with `max_recall_tokens=4096` (~2.7 chunks per query, ~40× prompt compression vs. 115K haystacks). Increasing `max_recall_tokens` (e.g. `8192–12288`) allows more retrieved sessions into `<v20_recall>` for multi-session aggregation queries.

---

## Model Lineage & Licenses

- **Base Backbone**: Built upon the 5-pass RSE-Loop5 merge of Inkling-2-Mini V19 TinyAya DPO (with Unbound v3 fix), Inkling-2-Mini-Unbound, and Tess-4.5-26B-A3B, then upgraded to V20-v3 dual-channel memory and trained via leakage-free 3-stage continual-memory pretraining & SFT (Stage 1 PT 3,000 steps → Stage 1.5 PT 900 steps → Stage 2 SFT 1,200 steps).
- **Licensing**: The original Inkling-2-Mini backbone is Apache-2.0. Upstream SFT and preference lineage included [Cohere Labs Tiny Aya](https://huggingface.co/datasets/CohereLabs/tiny-aya-l2-thinker-multilingual-reasoning) (CC BY-NC 4.0) and [OpenHermesPreferences-roleplay](https://huggingface.co/datasets/vicgalle/OpenHermesPreferences-roleplay) (source-dependent licenses). Please respect all upstream dataset and parent checkpoint license terms.