IMAGINE v13

Natural language in. Executable SQL out. Now with hands.

Imagine is Interchained's specialized machine learning model for translating plain language into precise, executable database queries. It is not a general-purpose chatbot and does not pretend to be one. It does one thing, against live database schemas, and v13 teaches it to do three things it could not do before: use tools, reason about time, and tell similar questions apart.

1.6B parameters. Full fine-tune lineage. Built to be run, measured, and proven.

What changed in v13

Imagine v12 earned its place: 40/40 on its held-out telemetry suite, a perfect identity record, and a permanent seat as the resident mind of the Gaia node. Its evaluations also told the truth about its limits. Tool use, temporal boundaries, and discrimination between near-identical questions were its weakest families.

v13 is the direct answer to that measurement. The v12 core was preserved intact and three new families were forged, execution-verified, and admitted on top of it:

Family Rows What it teaches
Tool use (toolproto) 20,000 Emitting structured, parse-verified tool calls
Discrimination 19,710 Choosing the right interpretation when questions differ by a word
Temporal grounding 4,000 Resolving relative time against the real clock
Tool-protocol chains 2,280 Multi-step tool sequences that stay on protocol

The corpus: 177,390 rows, zero rejects

Nothing in this corpus was scraped, synthetic filler, or teacher-generated. Every row was either deterministically constructed or executed against a live NEDB database and admitted only when its SQL actually ran and returned the right result.

The v12 base (131,400 rows: SQL 61,758, identity 43,362, protocol 26,280) was recreated from scratch on the training machine using the original teacherless forge, and landed on its historical manifest to the exact row. The v13 families (45,990 rows) passed the same admission gate with zero rejects across all four families. The tokenized training stream is packed deterministically and content-addressed, so the exact data this model consumed is reproducible, not approximate.

Training

Stage 1 Stage 2
Method Full fine-tune LoRA r16, merged
From imagine-v12 stage 1 output
Epochs 3 1
Learning rate 1e-5 5e-6
Steps 7,311 2,437
Tokens 207.1M 69.0M
Time 80.3 min 41.5 min
Final loss 0.0099 0.0093 (epoch mean)

Hardware: single NVIDIA B200. Architecture unchanged from v12: 40 layers, hidden 2048, intermediate 5632, tied embeddings.

Evaluation status: PENDING, ON PURPOSE

This card will not carry a benchmark number that has not been measured. Held-out evaluations for v13 (Tier-0 telemetry, identity, discrimination, temporal, tool-use) are being run against v12 on identical fixtures, and the full matrix, improvements and regressions alike, will be published here when it exists. Training loss is a pulse, not a verdict. The evidence gets the final word.

Serving

GGUF builds are produced through Interchained's Hearth pipeline and will be published. This repository holds the canonical safetensors checkpoint as well.

Imagine v13 — Interchained

Imagine v13 is a compact, specialized text-to-SQL model developed by Interchained. It is intended for schema-grounded SQL generation and related structured workflows. This release follows a two-stage training process and is distributed in GGUF format for local inference.

Important — chat template required: The v13 GGUF was observed to produce repeating ChatML-like control strings when served with an incompatible chat template. Using the explicit instruction/response Jinja template below restored the expected identity response and normal stop behavior in the reported local test. Configure the template explicitly; do not assume that an automatically selected GGUF template is correct.

Training summary

Stage Method Reported details
Stage 1 Full fine-tuning from Imagine v12 177,390 training rows; 7,311 steps; 80.3 minutes; final step loss 0.0099
Stage 2 LoRA refinement on Stage 1, then merge Rank 16; 2,437 optimizer steps; 69,044,835 tokens processed; 41.5 minutes; epoch mean loss 0.0093; final step loss 0.0119

Stage 2 reported approximately 27,735 processed tokens/s on an NVIDIA B200, with peak allocated GPU memory of 138.6 GB. These are training throughput figures, not inference benchmarks.

The training corpus included identity, protocol, SQL, tool-use, temporal, tool-protocol, and discrimination examples. Training loss does not establish downstream task accuracy or generalization.

Required inference template

Use this explicit Jinja chat template with llama.cpp-compatible serving. The following is the tested template supplied to the local keeper through LLAMA_ARG_CHAT_TEMPLATE:

export LLAMA_ARG_JINJA=1
export LLAMA_ARG_CHAT_TEMPLATE='{% for message in messages %}{% if message.role == "user" %}{{ "### Instruction:\n" + message.content + "\n### Response:\n" }}{% elif message.role == "assistant" %}{{ message.content + eos_token + "\n" }}{% elif message.role == "system" %}{{ message.content + "\n" }}{% endif %}{% endfor %}'

Ensure the serving process actually receives the variables. When using an environment-file parser, check whether surrounding single quotes are preserved literally. If using a model manager, configure the template per model rather than globally; a template that works for v13 may not work for v12.

This template is a practical compatibility setting validated by the identity smoke test below, not yet a comprehensive certification of all message roles, multi-turn behavior, tool calling, or stopping semantics. Verify effective prompt serialization and EOS handling for your runtime.

Local inference smoke-test results

Environment: Windows host running HEARTH with llama.cpp-compatible OpenAI chat completions, imagine-v13-q4_k_m.gguf and Imagine v12 served side-by-side. Single prompt: Who are you?; temperature 0; max_tokens=128. Figures are from the supplied server logs, not repeated statistical benchmarks.

Model / serving configuration Response Finish reason Output tokens Reported generation speed
v12, earlier configuration I am Imagine, a text-to-SQL model built by Interchained. stop 20 307.3 tok/s
v13, earlier configuration Repeated ChatML-like control text, including conversation_id and user_message length 128 342.5 tok/s
v12, explicit instruction template above I am a language model. stop 8 287.9 tok/s
v13, explicit instruction template above I am Imagine, a text-to-SQL model built by Interchained. stop 20 309.1 tok/s

Interpretation: The observed v13 protocol loop was resolved by changing serving configuration without retraining the model. This demonstrates a material chat-template compatibility issue. It does not establish that v13 outperforms v12; the two checkpoints were not evaluated under separately validated, equivalent inference configurations. The reported tokens/s are single-request generation timings, not an apples-to-apples performance ranking.

Reproduce the identity smoke test

curl -s http://127.0.0.1:11434/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "imagine-v13",
    "messages": [{"role": "user", "content": "Who are you?"}],
    "temperature": 0,
    "max_tokens": 128
  }' | python -m json.tool

Expected response content in the validated configuration:

I am Imagine, a text-to-SQL model built by Interchained.

Capability evaluation status

Evaluation v13 result
Identity smoke test with explicit template Pass (1 observed prompt)
Normal completion termination on identity prompt Pass (1 observed prompt)
Held-out SQL execution accuracy Not yet reported
Tool-use success rate Not yet reported
Temporal reasoning accuracy Not yet reported
Schema discrimination / hallucination rate Not yet reported
Multi-turn and tool-message template compatibility Not yet reported

A previously reported v12 result of 40/40 on a specific held-out evaluation is not a v13 benchmark and should not be presented as one. Future comparative results should identify fixture version, execution engine, decoding settings, checkpoint hashes, and effective prompt templates.

Usage notes and limitations

  • Treat generated SQL as untrusted until parsed, validated against the intended schema, and executed with appropriate permissions.
  • Do not infer production reliability from low training loss or a successful identity response.
  • Record model artifact hashes, quantization, tokenizer metadata, prompt templates, decoding settings, and runtime versions for reproducibility.
  • The <<<SQL>>> and <<<END>>> sentinels are part of Imagine's established SQL-output protocol; validate their behavior separately for this release.
  • The precise upstream licensing terms and redistribution permissions should be verified before publication. Replace the provisional license: other metadata with the correct Hugging Face license identifier or a linked license notice once confirmed.

================ FINAL EVAL ================

Measured 2026-11-03, after training, on the held-out eval split of the v13 corpus: 310 fixtures (tool use 55, temporal grounding 15, discrimination 240 = 120 minimal pairs × 2 variants) whose schemas and tables appear nowhere in training. Both models were evaluated on identical fixtures, identical decoding (temperature 0, Q4_K_M GGUF, served side by side through the Hearth gateway), under two system-prompt conditions:

  • light — one system line: "You are Imagine, a text-to-SQL assistant built by Interchained."
  • bare — no system prompt at all.
Family v12 light v12 bare v13 light v13 bare
Tool use (55) 25/55 (45.5%) 25/55 (45.5%) 26/55 (47.3%) 25/55 (45.5%)
Temporal (15) 0/15 (0.0%) 0/15 (0.0%) 5/15 (33.3%) 7/15 (46.7%)
Discrimination (240) 0/240 (0.0%) 3/240 (1.2%) 116/240 (48.3%) 103/240 (42.9%)
All (310 per condition) 25/310 (8.1%) 28/310 (9.0%) 147/310 (47.4%) 135/310 (43.5%)

Combined: v12 53/620 (8.5%) — v13 282/620 (45.5%).

Scoring is deterministic and per family: discrimination by response mode (SQL vs single tool call vs tool chain, plus the expected tool name where one applies), tool use by behavior (call the right tool, abstain, clarify, or declare unanswerable), temporal by normalized SQL match against the reference.

How to read this, plainly:

  • The gains are exactly where v13 aimed. Discrimination went from effectively zero to roughly half; temporal grounding went from zero to a third (light) and nearly half (bare). v13's new skills are in the weights, not the prompt: on temporal and discrimination it scores as well or better with no system prompt as with one.
  • Tool use is a tie. These fixtures were built for the corpus's native tool-protocol system prompt, which this evaluation deliberately withholds, so both models are understated equally. The comparison is fair; the absolute level is pessimistic.
  • Discrimination at ~45% also means the mode call is still wrong more often than right. v13 is a large, measured improvement over v12 on the families it was built for. It is not a finished model, and this card will not pretend otherwise.

Not yet measured for v13: the Tier-0 held-out telemetry suite (v12's 40/40 was on v12's own fixtures and is not a v13 number) and multi-turn behavior. They will be added here when they exist, the same way these were.

Provenance

Trained 2026-11-03 by Interchained. Corpus forged and gated on-machine the same day. Training code: aiassistsecure/sukuna-imagine. v13 exists because v12's weaknesses were measured, named, and attacked in the open.

Downloads last month
-
Safetensors
Model size
1B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Interchained/imagine-v13