Text Generation
Transformers
Safetensors
English
aquila_slm
kestrel
aquila
small-language-model
base
pretrained
hybrid
gated-deltanet-2
attnres
tngram
custom_code
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
Update Kestrel Preview weights and model card
Browse files- README.md +38 -10
- model.safetensors +1 -1
README.md
CHANGED
|
@@ -17,11 +17,11 @@ tags:
|
|
| 17 |
- custom_code
|
| 18 |
---
|
| 19 |
|
| 20 |
-
|
| 21 |
|
| 22 |
-
**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
|
| 23 |
|
| 24 |
-
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
|
| 25 |
|
| 26 |
---
|
| 27 |
|
|
@@ -31,14 +31,14 @@ Evaluated zero-shot on the [Open SLM Leaderboard](https://huggingface.co/spaces/
|
|
| 31 |
|
| 32 |
| Benchmark | Kestrel Preview (98.6M, 7.85B raw) |
|
| 33 |
|---|---:|
|
| 34 |
-
| **ARC-Easy** |
|
| 35 |
-
| **ARC-Challenge** |
|
| 36 |
-
| **HellaSwag** | 34.
|
| 37 |
-
| **PIQA** | 63.
|
| 38 |
-
| **ArithMark-3** |
|
| 39 |
-
| **Intelligence Index** | **
|
| 40 |
|
| 41 |
-
For context,
|
| 42 |
|
| 43 |
---
|
| 44 |
|
|
@@ -57,6 +57,34 @@ Kestrel Preview is a 24-layer hybrid model built in plain PyTorch for portable i
|
|
| 57 |
2. **Next-token & `1−√t` decay 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.
|
| 58 |
3. **Optimization:** Row-equilibrated Muon (`MuonEq-R`, lr `0.01`, decoupled weight decay `0.05`) for 2-D linear weights and AdamW (`lr 3e-3`) for embeddings, norms, convolutions, and memory factors.
|
| 59 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
|
| 61 |
## Acknowledgements & License
|
| 62 |
|
|
|
|
| 17 |
- custom_code
|
| 18 |
---
|
| 19 |
|
| 20 |
+
# Kestrel Preview
|
| 21 |
|
| 22 |
+
**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 (formerly Aquila) research preview — 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.
|
| 23 |
|
| 24 |
+
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.
|
| 25 |
|
| 26 |
---
|
| 27 |
|
|
|
|
| 31 |
|
| 32 |
| Benchmark | Kestrel Preview (98.6M, 7.85B raw) |
|
| 33 |
|---|---:|
|
| 34 |
+
| **ARC-Easy** | 52.53% |
|
| 35 |
+
| **ARC-Challenge** | 26.11% |
|
| 36 |
+
| **HellaSwag** | 34.50% |
|
| 37 |
+
| **PIQA** | 63.76% |
|
| 38 |
+
| **ArithMark-3** | 41.00% |
|
| 39 |
+
| **Intelligence Index** | **20.04** |
|
| 40 |
|
| 41 |
+
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.
|
| 42 |
|
| 43 |
---
|
| 44 |
|
|
|
|
| 57 |
2. **Next-token & `1−√t` decay 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.
|
| 58 |
3. **Optimization:** Row-equilibrated Muon (`MuonEq-R`, lr `0.01`, decoupled weight decay `0.05`) for 2-D linear weights and AdamW (`lr 3e-3`) for embeddings, norms, convolutions, and memory factors.
|
| 59 |
|
| 60 |
+
---
|
| 61 |
+
|
| 62 |
+
## Quick Start
|
| 63 |
+
|
| 64 |
+
```python
|
| 65 |
+
import torch
|
| 66 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 67 |
+
|
| 68 |
+
model_id = "Emergent-Knowledge/kestrel-preview"
|
| 69 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 70 |
+
|
| 71 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
| 72 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True).to(device).eval()
|
| 73 |
+
|
| 74 |
+
inputs = tokenizer("The reason birds migrate south in winter is", return_tensors="pt").to(device)
|
| 75 |
+
out = model.generate(**inputs, max_new_tokens=60, do_sample=True, temperature=0.7, top_p=0.9)
|
| 76 |
+
print(tokenizer.decode(out[0], skip_special_tokens=True))
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
---
|
| 80 |
+
|
| 81 |
+
## Limitations
|
| 82 |
+
|
| 83 |
+
- **Base model only:** Kestrel Preview is not instruction-tuned or aligned for chat. It simply continues text.
|
| 84 |
+
- **Small training budget:** At 7.85B raw tokens and 98.6M parameters, its world knowledge is thin and it will frequently state incorrect facts.
|
| 85 |
+
- **English & 2,048 context:** Trained on English text up to 2,048 tokens.
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
|
| 89 |
## Acknowledgements & License
|
| 90 |
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 394576584
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d51a01cae618a7731c5b9fd641a18d458ca2cc8503bcd8a22b3faf2ddb8c2ba
|
| 3 |
size 394576584
|