"Machine learning" fits a sub-part of the AI space, but "artificial intelligence" has been stretched to cover simple state machines and hard-coded keyword matchers. This is the ongoing research behind the Ariadne AI Platform — and the honest account of what is solved and what is not.
Our aim is a system that learns dynamically from observation, holds long-term intents, and fulfils them in the lowest-effort, least-impacting way — while watching its own actions and their effects.
Normal software and systems. Deterministic behaviour, no learning.
Attempts multiple defined or random solutions and stores successful approaches to satisfy defined goals. Useful for translation, recognition and the like.
Generates, simulates and implements strategies to improve conditions or resolve problems — taking previously undefined actions toward long-term goals while storing every outcome.
Able to adjust its own goals. This is the frontier we are working at today.
Fine-tuning can only reach conclusions that were already reachable from human-written text — it is gated at human-level intellect, which makes it a poor route to Level 3. So we built the other thing: AMQL, a C# tool that turns a checkpoint into a graph database, then lets you name the relationships between tokens, follow them, change them, and carry the result back out as an ordinary model. Since September it has grown a server, a visualiser, a GPU engine — and Entail, a language whose statements compile straight into weights.
encode maps a raw Hugging Face checkpoint into a canonical VINDEX3 container — weights, an operator table and a judged system graph. verify then re-derives every hash from disk alone, prints the operator census, and reports whether the primary text component actually plans and executes, refusing anything the runtime doesn't yet serve by name rather than approximating it.
From there, the container is the thing you query. layers reports the per-layer attention policy — operator, span, position policy, head geometry — alongside the tensor inventory it was derived from.
# checkpoint in, container out
amql-cli encode ./Qwen3.5-0.8B --out ./containers/Qwen3.5-0.8B
amql-cli verify ./containers/Qwen3.5-0.8B
amql-cli layers ./containers/Qwen3.5-0.8B
component 'target' role=PrimaryText layers=28 hidden=2048
attention: linear_attention × 4, softmax × 24
L 0: linear_attention full position none (NoPE) heads 4×128
L 1: softmax full partial rope θ=10000 f=0.25 heads 16×128Template probing scores what one token is to another (France → capital-of → Paris) and reports the attention coordinates — layer, head, query and key position — that carry it. Causal tracing then weights each layer by how much of the effect it restores, which is the list of tensors worth patching.
Where route names the link, path shows the chain the model itself would walk: a bidirectional best-first search across the next-token continuation graph, each edge costed at −log P, meeting in the middle. No relation names — just the model's own terrain.
The embedding profile of a token (row, range, mean, L2 norm) and its nearest neighbours by cosine similarity — plus, given a context and an executable component, the model's actual logit and rank for that token at the end of it.
change-tensor reads a weight out of the container, applies a single-cell edit, and records the delta into a safetensors patch file. The container is never rewritten, so its integrity checks and the original model both stay intact. Repeated edits compose into one patch, and an edit that lands back on the base value removes its own entry.
Every pathway accepts --patch, merging the deltas in as the weights load — so route, path, generate and inspect-token all observe the edited model, and you can watch a score move exactly where the patch touches the mechanism.
lora_A/lora_B pairs by truncated SVD with the standard alpha/r scaling, reproducing the patch exactly where the rank allows.encode: a plain checkpoint again, with patch deltas baked into the stored tensors and untouched tensors copied byte-identically.# target a tensor that route named as a patch site
amql-cli change-tensor ./containers/Qwen3.5-0.8B \
target.decoder_stack 14.self_attn.q_proj.weight 100,50 \
--add 0.01 --out patches/capital.safetensors
# ship it as an adapter, or bake it into a checkpoint
amql-cli save-lora patches/capital.safetensors --out lora/capital \
--rank 8 --alpha 16
amql-cli export ./containers/Qwen3.5-0.8B --out ./models/edited \
--patch patches/capital.safetensorsThe piece we are most interested in. import puts a second model into an existing container, so both end up in one VIndex3 and export materialises the result as a single checkpoint. It works in three parts:
The two vocabularies are related by token string — ids are opaque, so identical strings are the only relationship this build is willing to judge. The merged vocabulary keeps the base model's ids stable and appends the imported-only tokens after them.
A ridge least-squares map is fitted from the imported embedding space into the base space on the shared-token anchors. Shared tokens take the blended row ½·(base + aligned·imported), imported-only tokens take the aligned row, and base-only rows stay verbatim.
Differently-shaped stacks cannot be averaged, so the model with the larger shape scaffolds the result and its intermediate tensors are copied byte-identically. A tensor kind the scaffold lacks is grown in from the other model, zero-padded.
None of it is hidden in the process. token-map.json records every token's kind and both source ids, the anchor count and the alignment residual, and a per-layer provenance table naming the source and operation behind each tensor. The stack that was replaced is preserved inside the container rather than discarded.
amql-cli import ./containers/Qwen3.5-0.8B ./models/Qwen3.5-2B \
--out ./containers/merged
imported: Qwen3.5-2B into Qwen3.5-0.8B
scaffold: Qwen3.5-2B (hidden 2048, layers 24)
vocab: 248044 + 248044 → 248044 (248044 blended, 0 aligned-new)
preserved: 3 segments of the replaced stack under segments/source/
note: alignment: 248044 shared-token anchors, residual L² 402.1generate --trace-json records every operator of every generated token: magnitude, timing, MoE routing, top-k with entropy and margin. AMQL Studio draws it as a zoomable map — one column per layer, edges coloured by activation — and fills it in live while the run happens in a CLI child process.
Three overlays answer what loudness cannot: ROME-style causal attribution (corrupt a token, restore each layer's clean residual, re-measure), the logit lens (the depth at which a prediction forms), and per-head attention weights. Right-click a weight node for its edit command and the re-run command; compare two traces and the map recolours on a diverging ramp — the edit-and-rerun loop, closed.
amql-cli generate ./containers/Qwen3.5-0.8B \
--prompt "The capital of France is" --trace-json trace.json \
--attribute --logit-lens --trace-attention
amql-gui --trace trace.json
# the map is meant to be acted on: right-click a weight →
# edit-tensor command + generate --patch … --trace-json …Containers over HTTP: OpenAI-compatible /v1/chat/completions, /v1/responses (streaming) and /v1/embeddings, TypeSafe /v1/decisions for Von decision models on an in-process C# ModernBERT encoder, and /v1/classify. generate reports logprobs, entropy and perplexity, so a run can be scored as well as read.
Support is property-driven, not a list of names: Granite, Gemma 4, LFM 2.5/3 and their vision towers, ModernBERT/Von, Jev classifiers, nomic embeddings, masked-diffusion dLLMs, MoE import and moe-ify. Rope scaling (linear, llama3, yarn, longrope); GGUF in and out with Q4_0/MXFP4/Q8_0 and ternary Bonsai packings plus recipe/imatrix quantisation; ONNX at FP16/INT4; NVFP4/MXFP4 checkpoints — and Qwen4 Flash-Next running lean under 10 GB.
prune drops whole decoder layers to a byte budget with provenance, corpus or random ranking and exact pre-commit size verification. star-elastic prunes width instead: FFN channels ranked by activation magnitude (Σ|x·W_upᵀ|) on one forward pass, sliced homogeneously across layers, with a joint channel-and-head budget. Zero-shot — quality is gated, not recovered.
Consensus-gated token alignment: shared tokens that agree are blended and restored to full energy, disagreements keep the scaffold's row. The fit now runs on GPU in blocked fp64 (cuSOLVER Cholesky), the fitted alignment map is applied in the right direction, and --blend/--vocab choose the base. strip yields a slim single-encoding container about the size of the equivalent GGUF.
generate-mtp bootstraps a speculative drafter for models without one, then fits it by ridge least squares with a K-projector mixture: held-out draft acceptance 0.3% → 16.8%. fine-tune adapts the output head teacher-forced, no autograd; lora-train trains LoRA factors with an exact gradient through head and final norm, finite-difference checked, spike-guarded and anchored on the model's own replies.
The device-resident CUDA engine keeps weights, activations, KV and recurrent state on the GPU and replays one graph per decode step: ~679 tok/s decode against llama.cpp's ~440–500 on the same F16 weights, and 64k tok/s prefill at 512 tokens against ~21k — 2–4×. Chunked Gated DeltaNet adds 11%; zero-copy unified memory serves Grace-Hopper, and DGX Spark builds cross-platform. CPU decode ~44 tok/s against ~39.
bake-predicate solves a rule into the weights: the model reads a predicate in context, answers probe prompts, and the FFN down-projections of a few middle layers are solved in closed form (minimum-norm ridge, layer by layer, on CUDA) so the model without the predicate reproduces its hidden states with it. The output is an ordinary patch, reported with KL and top-1 agreement.
Entail is the deterministic counterpart: a small language in which every statement compiles to a specific group of weights — nothing learned, sampled or fitted. Grafted into Qwen 3.5 0.8B it takes direct arithmetic from 43.8% to 100% with prose predictions unchanged; as an adapter it runs beside the untouched model in about a megabyte. The theory, the exactness mathematics and the measured results have their own page.
amql-cli bake-predicate ./containers/Qwen3.5-0.8B \
--predicate "Always reply in French" --out patches/fr.safetensors
amql-cli entail compile mathematics.entail.txt --out model
amql-cli entail graft mathematics.entail.txt --host qwen --out grafted
amql-cli entail adapter dates.entail.txt --tokenizer qwen --out adapters/dates
direct arithmetic: 92/210 (43.8%) → 210/210 (100%)
prose top-1 agreement with base: 767/767Every current model has flaws and no way to self-improve. Once the edges of the graph have been identified, a flaw becomes an address: remove an association that should not exist, add one in a familiar form, or correct a relationship that exists but is of the wrong type. Those embedding-layer repairs work today.
The layer above is more interesting. Relationships humanity has not described linguistically but infers anyway can be adjusted the same way — and combined with reinforcement derived from internal traces taken during inference, that reaches things fine-tuning cannot: hallucination as a user-satisfaction signal added in post-training, or the wrong tool picked during agentic work.
The hope beyond that is to represent an approach to a problem space — applying first-order logic to an understanding a model was never trained into, whether for want of source material or model density. Generating genuinely novel solution vectors remains a separate problem; AMQL lets you apply one once it has been found.
The research on this page — and the tooling that comes out of it — is what powers the Ariadne AI Platform. See how it comes together in production.