Instructions to use disinfozone/kenosistron-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use disinfozone/kenosistron-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16") model = PeftModel.from_pretrained(base_model, "disinfozone/kenosistron-lora") - MLX
How to use disinfozone/kenosistron-lora with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("disinfozone/kenosistron-lora") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use disinfozone/kenosistron-lora with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "disinfozone/kenosistron-lora" --prompt "Once upon a time"
kenosistron-lora: the reproducibility kit
This repo contains everything needed to rebuild disinfozone/kenosistron from the public base model: the adapter, the retrained speculative head, the quantization calibration data, and the scripts that connect them. Read the main model card first; this is the parts drawer.
Contents
| File | What it is |
|---|---|
adapter_model.safetensors + adapter_config.json |
The kenosistron v3 LoRA (PEFT format, rank 8, alpha 32, all-linear), trained on the Tinker service against the disinfo.zone corpus. Applies to the stock base. |
mtp_head.safetensors |
The retrained MTP (multi-token prediction) draft head: 123.8M trainable params (eh_proj, attention sublayer, norms, router; the 512 routed experts stay frozen at base values). Trained with a pure KL objective toward the fine-tuned trunk's own next-token distribution over ~2M tokens of self-generated text. Greedy speculative acceptance: 61.9% to 72.1% (p<0.05). |
imatrix.oqe.json / imatrix.oqe.npz |
The importance-matrix calibration used for the oQ5e quant. Reusable for other bit-levels (e.g. an oQ4e pass) without re-calibrating. |
scripts/ |
The full pipeline, in order below. |
Rebuild chain
Starting from nvidia/NVIDIA-Nemotron-3-Super-120B-A12B-BF16 (public, ~247 GB):
scripts/merge_nemotron_tinker_lora3.py: merge the LoRA into the base at BF16 (verifies all 41,233 tensors map; preserves themtp.*tensors andlm_head).scripts/splice_mtp.py: splicemtp_head.safetensorsover the stock MTP head in the merged checkpoint (hardlinks unchanged shards; rewrites only the two shards that carrymtp.*).scripts/quant_oq5e_mtp.py: imatrix-calibrated 5-bit affine MLX quant (group 64, 8-bit embeddings, 6-bit first-layer Mamba projections), keeping the MTP head. Env-parameterized (SRC,OUT,OQ_LEVEL,OUT_SUFFIX); reuses the shipped imatrix.
Also included, for the MTP-head-curious: scripts/train_mtp_head.py (the KL trainer; --ce-lambda 0 is the winning configuration, since mixing in cross-entropy against real text made the head worse than pure self-agreement), scripts/dump_triples.py (dumps trunk hiddens plus top-64 logit targets), scripts/gen_corpus.py (self-generation harness), and scripts/bench_accept.py (measures real speculative acceptance over the serving API; benchmark greedy, since sampler noise at temperature 1.3 is ~4x the effect size).
The merged result of steps 1 and 2 is also published directly as disinfozone/kenosistron-bf16 if you'd rather download 230 GB than compute it.
Using just the adapter
The adapter is standard PEFT and applies to the stock base with transformers + peft if you have the RAM for it. Note that the adapter alone gives you the kenosistron voice with the stock (misaligned) MTP head. If you serve with speculative decoding you want the retrained head spliced in too, which is the whole reason this repo exists.
License
The adapter, MTP head weights, imatrix, and scripts in this repo are MIT. The base model they apply to is governed by the NVIDIA Nemotron Open Model License, and merged/quantized artifacts (the sibling repos) inherit it.
- Downloads last month
- 21
Quantized