Instructions to use Emergent-Knowledge/kestrel-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Emergent-Knowledge/kestrel-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Emergent-Knowledge/kestrel-preview", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Emergent-Knowledge/kestrel-preview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Emergent-Knowledge/kestrel-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Emergent-Knowledge/kestrel-preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Emergent-Knowledge/kestrel-preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Emergent-Knowledge/kestrel-preview
- SGLang
How to use Emergent-Knowledge/kestrel-preview with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Emergent-Knowledge/kestrel-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Emergent-Knowledge/kestrel-preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Emergent-Knowledge/kestrel-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Emergent-Knowledge/kestrel-preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Emergent-Knowledge/kestrel-preview with Docker Model Runner:
docker model run hf.co/Emergent-Knowledge/kestrel-preview
Kestrel Preview is a small, experimental 98.6M-parameter English base language model trained from scratch in a single 8-hour run on one GPU. It is our first working checkpoint from the Kestrel Architecture, built to test whether modern recurrent-hybrid architectures, tensorized n-gram memory, and token-superposition training can make small models meaningfully more sample-efficient before scaling up.
It is still very early. With only 7.85B raw tokens seen (3.15B forward positions), Kestrel Preview is not meant to compete with heavily trained models yet, it is a transparent baseline and a starting point for what comes next.
Results
Evaluated zero-shot on the Open SLM Leaderboard suite (lm-eval 0.4.13, acc_norm on ARC/HellaSwag/PIQA; official continuation log-likelihood scoring on ArithMark-3):
| Benchmark | Kestrel Preview (98.6M, 7.85B raw) |
|---|---|
| ARC-Easy | 52.53% |
| ARC-Challenge | 26.11% |
| HellaSwag | 34.50% |
| PIQA | 63.76% |
| ArithMark-3 | 41.00% |
| Intelligence Index | 20.04 |
For context, crossing an Intelligence Index of 20 typically takes 15Bβ50B tokens for standard 100Mβ150M Transformers on the same leaderboard. We are encouraged by the efficiency, while mindful that commonsense fluency (especially HellaSwag and PIQA) still has a long way to go with more training tokens.
Architecture & Training
Kestrel Preview is a 24-layer hybrid model built in plain PyTorch for portable inference (trust_remote_code=True, runs on CUDA, Apple Silicon, or CPU without custom kernels):
- Parameters: 98,631,096 (tied input/output embeddings)
- Backbone: 24 layers, hidden size 576, 3:1 Gated DeltaNet-2 (18 layers, 4 heads Γ 128) to Grouped-Query Attention (6 layers, 9 Q / 3 KV heads Γ 64, RoPE, QK-norm, value residual mixing)
- Feed-forward: SwiGLU (hidden size 1,088)
- Residuals: Block Attention Residuals (8 blocks of 3 layers)
- Memory: TN-gram tensorized n-gram embeddings (orders 2, 3, 4, and 5; CP rank 224; inserted before layers 2 and 18)
- Context & Tokenizer: 2,048 tokens; reuses the 4,100-token (4,160-padded) Apache-2.0 tokenizer from MinimaLabs/KLM-1.6
- Training Recipe: 12,000 steps (128 Γ 2,048) on 1Γ RTX PRO 6000 Blackwell (~8.1 hours):
- Superposition phase (steps 0β2,999): Token-Superposition Training (
s = 7, ~5.50B raw tokens of ClimbMix) with TN-gram bypassed. - Next-token &
1ββtdecay phase (steps 3,000β11,999): ~2.35B tokens from a balanced, strictly decontaminated mix (ClimbMix, FinePhrase, Cosmopedia v2, FineWeb-Edu, Dolmino Q&A & flashcards, WikiHow, Pretrain-Behaviors, FineMath-4+, OpenMathInstruct-2, Dolmino math, SciQ/QASC train splits, and procedural arithmetic), with TN-gram ramped smoothly over 763 steps. - Optimization: Row-equilibrated Muon (
MuonEq-R, lr0.01, decoupled weight decay0.05) for 2-D linear weights and AdamW (lr 3e-3) for embeddings, norms, convolutions, and memory factors.
- Superposition phase (steps 0β2,999): Token-Superposition Training (
Acknowledgements & License
Kestrel Preview builds directly on open research and open weights from the community β especially MinimaLabs/KLM-1.6 (Apache-2.0) for its tokenizer and architectural inspiration, alongside Gated DeltaNet-2 (arXiv:2605.22791), Attention Residuals (arXiv:2603.15031), TN-gram (arXiv:2606.08347), Token-Superposition Training (arXiv:2605.06546), and MuonEq (arXiv:2603.28254).
Released under the Apache-2.0 license.
- Downloads last month
- -