NTK-Mirror — LLM Fine-Tuning Tools tool screenshot
LLM Fine-Tuning Tools

NTK-Mirror Review: LoRA-Free Alternative to PEFT

7 min read·

NTK-Mirror adapts frozen causal LLMs with sparse signed log-gate controllers, so you can tune behavior without LoRA modules or permanent weight edits.

Pricing

Open-Source

Tech Stack

Python, PyTorch, Hugging Face Transformers, JSONL, CLI

Target

ML engineers, researchers, and indie hackers fine-tuning Hugging Face causal LLMs

Category

LLM Fine-Tuning Tools

What Is NTK-Mirror?

NTK-Mirror is an open-source LLM fine-tuning tool from Hassana Labs by Leon Chlon that learns sparse signed log-gate controllers for frozen Hugging Face causal language models, and it is one of the best LLM Fine-Tuning Tools for ML engineers, researchers, and indie hackers. It trains a small controller instead of touching base weights, with defaults like --gates 5000 and --steps 240, so adaptation stays lightweight while the original model remains intact.

NTK-Mirror targets people who want task-specific adaptation, controller composition, or memory injection without the operational drag of LoRA stacks. The repo ships with a CLI, a Python API, JSONL ingestion, and examples built around Qwen/Qwen2.5 checkpoints.

Quick Overview

AttributeDetails
TypeLLM Fine-Tuning Tools
Best ForML engineers, researchers, and indie hackers fine-tuning Hugging Face causal LLMs
Language/StackPython, PyTorch, Hugging Face Transformers, JSONL, CLI
LicenseMIT
GitHub StarsN/A as of Feb 2026
PricingOpen-Source
Last ReleaseN/A

Who Should Use NTK-Mirror?

  • Solo builders shipping custom assistants who need fast adaptation on a small curated dataset without standing up a full LoRA training pipeline.
  • ML engineers experimenting with task vectors who want to compose behaviors, inspect controller state, and keep the base model frozen during iteration.
  • Research teams benchmarking adaptation methods that need a clean comparison against LoRA, full fine-tuning, and other parameter-efficient methods.
  • Product teams building memory-aware chat systems that want retrieval-backed behavior injection without stuffing more text into every prompt.

Not ideal for:

  • Teams that need full-weight model updates for long-horizon pretraining or broad domain transfer.
  • Users who want a turnkey training UI with hosted datasets, managed GPUs, and one-click eval dashboards.
  • Workloads that depend on dense vector retrieval out of the box and cannot tolerate a TF-IDF first-pass retriever.

Key Features of NTK-Mirror

  • LoRA-free signed log-gate controllers — NTK-Mirror learns a sparse set of shared log-gates on decoder-layer output channels, then applies them as multiplicative activation scaling. The base Transformer stays frozen, which makes the adaptation reversible and easy to reason about.
  • Teacher-forced controller fitting — The training loop uses prompt/completion pairs and learns only controller parameters, not model weights. That keeps the optimization surface small and lets you fit task behavior with a few hundred steps instead of a full fine-tuning run.
  • Frozen-model inference attachment — The controller is attached only during evaluation or generation. That means you can compare base vs adapted outputs on the same Hugging Face model without exporting a new checkpoint.
  • Controller composition — NTK-Mirror can add signed log-gates from multiple task controllers, clip them to a safe budget, and build a composed controller. That is useful when you want one model to carry GSM8K-style arithmetic and MBPP-style code behavior at the same time.
  • Persistent controller memory — The memory subsystem stores one controller per user, document, task style, or procedure, then retrieves and composes relevant items at inference time. The default retriever is dependency-free lexical TF-IDF, which keeps first-run setup simple and avoids an immediate vector database dependency.
  • JSONL-first data ingestion — NTK-Mirror accepts prompt/completion pairs and also understands instruction/response, question/answer, and raw text records. That makes it easy to point the tool at existing fine-tuning corpora without reshaping every dataset by hand.
  • Python API and CLI parity — The CLI covers fit, eval, generate, compose, inspect, and memory workflows, while the Python API exposes ForwardFineTuner for direct integration into training scripts. If you already run experiments in notebooks or jobs, you can keep the same controller logic in code.

NTK-Mirror vs Alternatives

ToolBest ForKey DifferentiatorPricing
NTK-MirrorFrozen-model adaptation with controller compositionLearns sparse signed log-gates instead of LoRA adapters or full weight editsOpen-Source
PEFT (LoRA)General parameter-efficient fine-tuningLow-rank adapters are better known and more widely used in productionOpen-Source
AxolotlLarge-scale fine-tuning runsStrong config-driven training pipeline for many model familiesOpen-Source
Open R1Reasoning-model training and eval workflowsMore focused on open reasoning research and benchmark pipelinesOpen-Source

Pick Open R1 when the job is end-to-end reasoning research rather than controller-based adaptation. Pick DataHaven when your biggest pain is dataset curation, versioning, and storage before you ever touch a training loop.

How NTK-Mirror Works

NTK-Mirror works by treating adaptation as an activation-space controller problem rather than a weight-update problem. For each decoder layer and channel, it learns a signed log-gate s and applies h' = exp(s) h to the hidden activations, which means the base model stays frozen while the controller nudges token representations in a controlled way.

The training path is intentionally small. You feed teacher-forced examples from JSONL, the tool scores candidate gates across selected layers, and AdamW updates only the gate parameters under a bounded budget such as --max-log-gate 0.05. That design keeps memory use predictable and makes it easier to compare adaptation quality against LoRA on the same Hugging Face checkpoint.

A minimal controller fit looks like this:

ntkmirror fit \
  --model Qwen/Qwen2.5-0.5B-Instruct \
  --train train.jsonl \
  --out controller.pt

ntkmirror generate \
  --model Qwen/Qwen2.5-0.5B-Instruct \
  --controller controller.pt \
  --prompt "Question: 47 + 36 = ?\nAnswer:"

The first command learns a controller from supervised examples, and the second command attaches that controller at generation time. Expect outputs to reflect the learned task bias while the base model weights remain unchanged, which is useful for repeatable evals, rollback, and controller composition.

NTK-Mirror also treats memory as a controller retrieval problem. Instead of appending long memory text to the prompt, it retrieves an item, composes its signed log-gates, and attaches the result before generation; if you already have a retrieval stack, you can swap in a richer retriever while keeping the same compose_states interface. For teams that want to manage training data and controller metadata together, pairing NTK-Mirror with DataHaven keeps the dataset side from becoming the bottleneck.

Pros and Cons of NTK-Mirror

Pros:

  • Keeps the base model frozen, so the original checkpoint remains intact for auditability and rollback.
  • Uses a small controller parameterization, which is simpler to inspect than a full adapter stack.
  • Supports controller composition, which is rare in standard LoRA-centric tooling.
  • Works with plain JSONL, so it slots into existing data pipelines without custom schema machinery.
  • Includes both CLI and Python API entry points, which makes it usable in scripts and notebooks.
  • Has an explicit memory workflow for task-style or user-style adaptation at inference time.

Cons:

  • The default retriever is TF-IDF, so semantic recall is weaker than a tuned embedding or hybrid retrieval stack.
  • It is narrower than general fine-tuning frameworks for users who need distributed training, packed sequences, or broad model zoo coverage.
  • Controller behavior is less familiar to most teams than LoRA, so interpretation and ops runbooks take extra effort.
  • It is not a replacement for full pretraining or domain-adaptive training when you need broad weight-space changes.
  • Benchmark quality depends heavily on dataset construction and teacher-forced target quality.

Getting Started with NTK-Mirror

Install NTK-Mirror from the repository and run a minimal fit/eval cycle against a Hugging Face causal model:

git clone https://github.com/leochlon/ntkmirror.git
cd ntkmirror
pip install -e .

cat > train.jsonl <<'JSONL'
{"prompt":"Question: 14 + 27 = ?\nAnswer:","completion":" 41"}
{"prompt":"Question: 36 + 18 = ?\nAnswer:","completion":" 54"}
JSONL

ntkmirror fit \
  --model Qwen/Qwen2.5-0.5B-Instruct \
  --train train.jsonl \
  --out controller.pt

ntkmirror eval \
  --model Qwen/Qwen2.5-0.5B-Instruct \
  --controller controller.pt \
  --eval train.jsonl

After the fit step, NTK-Mirror writes a controller file that you can reuse for evaluation, generation, composition, or memory registration. If you use the Python API, the only extra requirement is a loaded AutoModelForCausalLM, a matching tokenizer, and a GPU if you want the fastest path through larger checkpoints.

Verdict

NTK-Mirror is the strongest option for frozen-model adaptation when you care about controller composition and inference-time memory instead of standard LoRA workflows. Its main advantage is that it leaves base weights untouched, but the trade-off is a smaller ecosystem and less familiar retrieval behavior. Use NTK-Mirror when you want clean, inspectable adaptation; choose LoRA tooling when you need mainstream training support.

Frequently Asked Questions

Looking for alternatives?

Compare NTK-Mirror with other LLM Fine-Tuning Tools tools.

See Alternatives →

You Might Also Like