~/blog/inkling-own-work-sft

[Benchmark] Fine-Tuning Inkling 2 Mini on My Own Work: 1.1 Hours on One RTX 5090, 117/144 vs. DeepSeek's 111

❯ cat --toc

TL;DR

I fine-tuned Inkling 2 Mini on our newsroom work with one RTX 5090 in 1.1 hours. The same NF4 setup went from 76 to 125 passes on 144 held-out jobs. On the native serving checkpoint, the adapter passed 117. Our DeepSeek V4.1 Flash service passed 111 under its own decoding settings. These are automated checks. The deployed adapter passed 9 of 25 translation jobs.

Inkling 2 Mini fine-tuned on one RTX 5090. The deployed adapter passed 117 of 144 automated newsroom checks.

Inkling 2 Mini loops its middle layers three times and fits on one GPU

Inkling 2 Mini's official model card describes an Apache 2.0 vision-language model from Thinking Machines Lab: images and text in, text out. It's a mixture of experts with 26.4 billion parameters. Each token uses a subset of the experts, and the card lists 3.4 billion active parameters before counting the extra passes.

The model stores 24 layers of weights and sends each token through the middle 12 layers three times. That gives it 48 layer applications per token while storing one copy of the middle layers. The native checkpoint is about 20 GB. On my 32 GB RTX 5090, the unmodified model generated 165.8 tokens/sec in one stream and processed a 2,048-token prompt at 18,190 tokens/sec with vLLM. Prefill is the work of reading the input before the answer starts. Generation speed is how fast the answer follows. Both figures come from the December 2 run with a BF16 KV cache and DSpark off.

I had tried adding a loop to Qwen after reading the Looped-Qwen experiment. My 27B trial didn't improve the score. On the 4B follow-up, the base got 33 of 60. Plain LoRA on the same training data got 40, and the two loop variants got 35 and 36. That gave me a better experiment to run. Could I leave Inkling's built-in loop alone and teach it the jobs we send to a model every day? The earlier Inkling variable-loop run used a separate research checkpoint with an adjustable pass count.

Split the work by date before generating any answers

Our news pipeline uses models to classify stories, score candidates, pull evidence out of source text, translate narration, and rewrite copy. For a first run on your own work, pick a task where you can check the output. For example, take a news title and summary and ask for a category from a fixed list and a short reason in Traditional Chinese. Your script can check that the answer parses as JSON, has the required fields, and uses a category from the list. Add human labels if you want to measure whether it picked the right category.

  1. Freeze the inputs. I reconstructed requests from saved newsroom inputs. Training used work from before November 26. The test set used new jobs from November 26 through December 1, plus 20 older cases I reserved for evaluation. Keep all jobs about the same story together. Before generating answers I checked story folders and slugs, normalized URLs and titles, near-duplicate titles, and exact input hashes. None overlapped across the split under those checks.
  2. Generate training answers with a teacher model. Our DeepSeek V4.1 Flash service on two GX10s supplied every training answer. I ran each candidate through a validator. It checked JSON, fields, allowed values, length limits, and whether quoted evidence appeared in the supplied text where required. If an answer failed, I retried, then sent the validation errors back to the teacher for a fresh answer. I kept the first passing answer, up to 12 attempts per job. OpenAI and Anthropic outputs were excluded from the answer pool.
  3. Save training and test data separately. Write one JSONL row per job with its ID, timestamp, task and chat messages. The accepted answer goes in the assistant message for training. For testing, send the system and user messages and score the model's own reply. Keep every frozen test job, even if the teacher fails it. I ended up with 1,253 training examples and 144 test jobs. I ran the teacher through the test once per job to get its reference score.

Train an attention adapter with a 2,048-token budget

After two days trying to secure a G4 or A100 for the run in Colab, I switched to training on my 5090 under WSL2. Training the whole model as-is won't fit in 32 GB, so I used two tricks to save memory.

First, shrink the base. Model weights are usually stored at 16 bits per number. Unsloth's Inkling loader packs the main linear-layer weights into NF4, a 4-bit format, and the training run never updates them. Second, LoRA: leave the original model alone and train a small set of extra weights next to it. Here that's about 8.75 million parameters, roughly 1/3,000 of the model. I only added it to attention, the part where the model decides which earlier tokens to look at, and left the experts, vision and loop controls untouched. A 4-bit base plus LoRA is called QLoRA.

The full training config is in the deep dive at the end, ready to copy.

One more thing before training: each example is capped at 2,048 tokens, so long jobs have to be trimmed. My first attempt trimmed off the answers the model was supposed to learn, and the whole scoring task vanished. Keeping the full answer and cutting from the middle of the prompt fixed it; the details are in the deep dive. That left 1,252 usable examples. Two epochs took 1.1 hours, including model loading and checkpoint saves.

The deployed adapter passed 117 of 144 checks

I first scored the base NF4 model and both adapters on the same inputs. One epoch took it from 76 to 125 passes. The second epoch came in at 121, so I took the first adapter forward. I used this same set to choose the checkpoint. The comparison still needs a fresh test for an independent estimate.

For serving I loaded the official mixed NVFP4/MXFP8 checkpoint and the first-epoch adapter in vLLM, with a BF16 KV cache. The adapter passed 117 checks on that stack. Our DeepSeek V4.1 Flash service passed 111.

Automated passes by task for Inkling before training, after one epoch on NF4, after deployment on the native checkpoint, and DeepSeek V4.1 Flash

Rewriting went from 2 to 21 passes on NF4 and came in at 20 after deployment. Translation was the hardest task for the deployed adapter at 9 of 25, down from 13 on NF4. The validator could check things like output length and format. We had no human blind review for faithfulness or writing quality. The new classification jobs lacked human labels, and the extraction check could accept an empty list, so a pass can miss a bad category or a missed extraction. Inkling generated greedily with its answer channel prefilled. DeepSeek ran with thinking off and the temperature set for each job.

One 5090 generated 139.1 tokens/sec with the adapter loaded

The speed comparison uses the deployed Inkling adapter on the RTX 5090 and our existing DeepSeek V4.1 Flash TensorFold setup on two GX10s. I used the same five jobs, one from each task, for the single-stream numbers. The adapter generated at 139.1 tok/s and DeepSeek at 94.9 tok/s after the first token. The models use different tokenizers and serving engines, and DeepSeek kept its existing draft-token setup. I didn't measure DeepSeek's prefill or eight-stream throughput in this run.

December 2 speed tests. At one stream, base Inkling is 165.8 tok/s, deployed Inkling is 139.1, and DeepSeek V4.1 Flash is 94.9. The figure also shows prefill and eight-stream throughput where measured.

The adapter processed the 2,048-token prefill probe at 17,249 tok/s. At eight concurrent requests, it produced 395.4 output tok/s in total on the fixed job queue. That rate includes prompt processing and request overhead. Separately, one warmed run of the full 144-job suite at one request at a time took 4.3 minutes on the adapter, including request overhead and saving results.

Test draft tokens in the language you serve

DSpark drafts several tokens for the model to verify together. With the same adapter and an FP8 KV cache in both runs, it sped up my English probe from 141.5 to 197.5 tok/s. On the paired Chinese probe, it dropped from 141.3 to 125.6 tok/s. The verification step yielded about 1.5 tokens on Chinese, including the bonus token. For this Chinese-heavy workload I'd start with DSpark off and run the on/off test on your own prompts. I've also seen a draft model slow down another local model in llama.cpp.

Deep dive

You can use the recipe above without this section.

The training config

Use the official Inkling 2 Mini as the base. The first four lines matter most: the 2,048-token length cap, the base format, where LoRA goes, and how big it is (a higher rank can learn more and costs more memory). The rest are common trainer settings.

Training sequence and fixed padding: 2048 tokens
Base weight format: bitsandbytes NF4, BF16 compute
LoRA targets: attention Q, K, V, O projections and attention output gate
LoRA rank: 16
LoRA alpha: 16
Gradient checkpointing: unsloth
Per-device batch size: 1
Gradient accumulation: 4
Learning rate: 2e-4
Optimizer: AdamW8bit
Schedule: 5 warmup steps, then linear decay
Weight decay: 0.001
Gradient clipping: 1
Epochs: 2
Seed: 3407
Loss: assistant answer tokens only

Why did the scoring task disappear?

At first I right-truncated each conversation at 2,048 tokens. Because the answer comes last, 470 examples lost all supervised answer tokens, including every scoring example. The per-task check caught it in the smoke test.

Right truncation loses the answer. Reserving its space first lets you preserve both the complete answer and the ends of the input.

For the full training run I reserved room for the complete answer first, plus at least 64 prompt tokens. I kept up to 256 tokens at the start of the prompt, or half the remaining prompt budget when shorter, then kept the tail. That cut the middle of 518 prompts. One extraction example couldn't fit its complete answer plus the 64-token prompt minimum, so I dropped it. Cutting the middle can remove relevant evidence, so inspect your longest examples before accepting that policy.

In practice, apply the model's chat template before measuring length and count the separator tokens too. Before training, print the number of examples with any supervised answer tokens, grouped by task, then decode a long example after truncation and check that the answer still ends where it should. PyTorch reserved memory peaked at 34.9 GiB in the 4,096-token smoke test and 25.6 GiB in the 2,048-token run. The training environment used Unsloth 2026.11.13, Transformers 5.24.0 and bitsandbytes 0.50.2.

The same adapter needs another test on the serving weights

The NF4 path requantized the official weights for training. To switch back to the native checkpoint I mapped the attention adapter's tensor names to the serving engine's names. The tensor contents stayed the same and I kept the adapter separate from the base weights. That was enough to load it. It still went from 125 passes in the NF4 Transformers run to 117 in vLLM with BF16 KV. The FP8 KV run passed 116. The engine and weight format both changed in the move from the training setup, so the score gap can't identify the effect of either in isolation.

Rerun the whole test with the checkpoint, adapter, KV precision and generation settings you plan to serve. For this run, that meant the native checkpoint with the first-epoch adapter, BF16 KV and DSpark off.

FAQ

Can you fine-tune Inkling 2 Mini on one RTX 5090?
Yes. On a 32 GB RTX 5090, I used Unsloth, NF4 weights, rank-16 attention LoRA, and a 2,048-token training sequence. Two epochs over 1,252 usable examples took 1.1 hours for the training stage.
Does the Inkling 2 Mini LoRA keep its score on the original weights?
My first-epoch adapter passed 125 of 144 automated checks on the NF4 training weights and 117 on the native NVFP4/MXFP8 checkpoint with vLLM and a BF16 KV cache. I reran the complete suite on the serving stack before comparing it with our production model.

Read next

Don't miss the next one

Subscribe, and you won't.

One-click unsubscribe anytime.