license: apache-2.0
base_model: LTM-Lab/Inkling-2-Mini-Uncensored-V18
base_model_relation: finetune
library_name: transformers
pipeline_tag: image-text-to-text
language:
- en
- zh
tags: - inkling2
- mixture-of-experts
- recurrent-transformer
- multimodal
- persistent-memory
- custom_code
- nvfp4
- mxfp8
- uncensored
Inkling-2-Mini-Uncensored-V19
Inkling V19 is a text-and-image language model with a persistent local memory bank. You can save a diagram with its revision note, close the bank, and later ask about the original image at that revision. A response can identify the source event and report whether the model actually received its visual features. This repository contains the complete Hugging Face checkpoint with the trained V19 memory weights, the backbone, the bundled MTP draft head, and the V19 Python implementation.
V19 可保存文字、原圖與來源版本,再從指定快照取回證據。本次發布包含完成兩階段圖文記憶訓練的權重。使用者的記憶庫會在本機建立,可按對話分支及修訂讀取。
What changed in V19
- A 64-dimensional gated scan reads an event's text in order and adds a learned residual to its search key. This gives the retriever a way to distinguish events with the same words in a different order.
- Each branch has a working state made of four 32 × 32 FP32 matrices (16 KiB). Committed events update this state, and later queries can use it to rank candidate events. Original text and image bytes remain in the disk-backed event store.
- The reader supports revision-pinned lookups, directed relations with source witnesses, and visual retrieval. An exact event ID can request its original image. Semantic image retrieval first selects candidates and can then supply their original images in a second prefill. The default loop depth is 3 passes. The model accepts 1–10 passes per generation.
The native memory bank can grow as disk capacity allows. Semantic lookup accuracy depends on the learned retriever and evidence available at the requested revision.
Model lineage and training
Thinking Machines Lab created the Inkling 2 Mini backbone. OpenUncensored produced the directional-ablation derivative. LTM-Lab trained the V18 grounded memory reader and used that checkpoint as the starting point for V19. The quantized backbone retains its packed NVFP4/MXFP8 expert weights. The memory shard contains 2,939,530 FP32 parameters across 25 tensors, including the 2,758,150 parameters inherited from V18. LTM-Lab V18 · OpenUncensored derivative · Thinking Machines backbone
| Routing phase, in training order | Steps | Parameters updated |
|---|---|---|
| Text — order-sensitive event keys | 700 | 49,280 |
| Text — working-memory updates and queries | 1,200 | 132,100 |
| Image/text — order-sensitive event keys | 4,000 | 49,280 |
| Image/text — working-memory updates and queries | 4,000 | 132,100 |
The last phase continued from the preceding 4,000-step order checkpoint. The V19 run trained the routing modules while keeping the backbone and inherited reader frozen. The text order phase used parallel Bible passages in English, Traditional Chinese, Simplified Chinese, Japanese and Korean. The text working phase used multilingual site and codebook histories with chronological reversals. The visual routing curriculum paired VisualWebInstruct source images with crops and constructed histories. These languages describe the routing curriculum. Generation quality across all five written forms remains to be evaluated.
Quick start
Use a Transformers build with native Inkling2 Loop support, PyTorch, Accelerate, Pillow and Safetensors. The HF implementation was checked with Python 3.12, PyTorch 2.10.0 and Transformers 5.24.0.dev0. The example uses BF16 compute. Allow memory for the runtime's weight conversion and generation caches in addition to the packed files. Tested upstream Transformers revision
Install the tested Transformers revision in a PyTorch environment with:
python -m pip install "git+https://github.com/huggingface/transformers.git@be48e7a0b63d2ff22ce1ebccbccbd0374c1592ef" accelerate pillow safetensors
from io import BytesIO
import torch
from PIL import Image, ImageDraw
from transformers import AutoModelForImageTextToText, AutoProcessor
repo_id = "LTM-Lab/Inkling-2-Mini-Uncensored-V19"
processor = AutoProcessor.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
repo_id, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
).eval()
# Create a source image and record its textual revision in the same event.
image = Image.new("RGB", (160, 160), "white")
ImageDraw.Draw(image).rectangle((45, 45, 115, 115), fill="green")
encoded = BytesIO()
image.save(encoded, format="PNG")
def open_bank():
return model.open_memory(processor, "./v19-memory", bank_id="panel")
with open_bank() as memory:
event_id = memory.remember(
occurrence_id="panel-drawing-rev-b",
text="Panel drawing, revision B.",
images=[encoded.getvalue()],
)
revision = memory.store.snapshot()
# Reopen the bank. The user message supplies a question; the archived event supplies the image.
question = "What color is the square in the archived drawing?"
with open_bank() as memory, torch.inference_mode():
inputs, ctx = memory.prepare_generation(
[{"role": "user", "content": [{"type": "text", "text": question}]}],
text=question, revision=revision, event_ids=[event_id],
require_source="image", force_read=True, loop_num_passes=3, reasoning_effort="none",
)
output = model.generate(
**inputs, memory_context=ctx, loop_num_passes=3,
max_new_tokens=128, do_sample=False,
)
suffix = output[0, inputs["input_ids"].shape[1]:]
print(processor.decode(suffix, skip_special_tokens=True))
print(ctx.grounding["target_event_id"], ctx.grounding["native_visual_consumed"])
For text-only events, call remember(occurrence_id=..., text=...) and request require_source="event". Keep the same loop depth in prepare_generation and generate. A missing required source raises a LookupError carrying status="insufficient_evidence" and a grounding record.
Evaluation
A small independent pilot tested the final checkpoint with greedy decoding and 3 loop passes. The visual cases used four source cards. The Chinese procedural tasks used new conversations at seven checkpoints and a deterministic action interpreter. The 82 procedure attempts include repeated tasks at different points in the curriculum.
| Task | Final checkpoint |
|---|---|
| Identify the color when directly shown the complete source image | 4/4 |
| Select the right original from four candidates using a monochrome crop and answer its color | 1/4 |
| Report a missing explicitly referenced source | 1/1 |
| Write a valid lesson from eight external training events under the autonomous intake protocol | 0/8 |
| Execute the work order after autonomous intake, across checkpoints | 0/82 |
| Execute the work order when the application stored every source verbatim | 3/82 |
All four crop queries selected the same blue original. In the autonomous intake condition, six intake decisions were incomplete and two skipped writing. All 82 work-order responses reached the 256-token output limit. The three successful verbatim attempts came from the same work order at different checkpoints. The initial, visual-order and final V19 checkpoints scored alike on the paired autonomous and four-image probes. These results leave improvement in general continual skill learning unestablished.
The assembled release also passed a Hugging Face GPU smoke test. The model loaded with no missing or mismatched weights, saved a blue image to disk, reopened the bank, retrieved the image by event ID and answered blue after consuming the original visual features.
A separate four-choice development evaluation measured routing during training. On 400 order examples, top-1 retrieval changed from 100/400 before visual-order training to 101/400 afterward. On 400 working-memory examples, the visual-order checkpoint scored 90/400 and the final checkpoint scored 92/400. These figures measure candidate selection on development data. The independent pilot above measures end-to-end behavior on different tasks.
License
Apache License 2.0, inherited from the upstream Inkling checkpoints. The bundled modeling code retains the Hugging Face team's attribution. Upstream license declaration · Apache License 2.0