NextTransformer KDA: an alternative language model checkpoint with a recurrent backend
2 min readupdated
The NextTransformer KDA model is a final 1.41-billion parameter checkpoint with a 2,048-token context, trained on 49.15 billion tokens using the ClimbMix dataset. It uses a specialized recurrent method and comes with its own library and a tiktoken-based tokenizer. The checkpoint targets researchers and developers exploring alternative text generation architectures instead of classical transformers. The model is suitable for local running, experiments with recurrent layers, and testing new pre-training approaches.
Key features
- KDA architecture: an experimental recurrent-type method optimized for efficient training and inference.
- 1.41 billion parameters: a compact model size allowing it to run on consumer hardware.
- 2,048-token context: standard window length for text processing.
- Pre-training on ClimbMix: training completed in 46,875 weight update steps with a fixed seed.
What you can do
- Run inference: test text generation on a CPU using the recurrent backend.
- Integrate into research: explore the custom layer implementation and model configuration in the NextTransformer repository.
- Compare metrics: use saved BPB and CORE-22 validation results to evaluate architecture efficiency.
Example
import json
import os
from pathlib import Path
os.environ["CUDA_VISIBLE_DEVICES"] = ""
import tiktoken
import torch
from huggingface_hub import snapshot_download
from safetensors.torch import load_file
from nexttransformer.models import build_model, config_from_dict
root = Path(snapshot_download("NextTransformer/KDA-49B-Tokens"))
raw = json.loads((root / "model_config.json").read_text())
config = config_from_dict({**raw, "backend": "reference"})
model = build_model(config, device="cpu")
model.load_state_dict(load_file(root / "model.safetensors"), strict=True)
model.set_step(46875)
model.eval()
Read more
Details• Validation BPB: 0.6644 (measured on 20,971,520 tokens)
• CORE-22 (×100): 31.06 (average over 22 tasks)
• Hardware requirements: Python 3.10–3.13, CPU run support
• Limitations: requires installing the special nexttransformer library from GitHub










Comments