File size: 7,420 Bytes
90e4c64 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | ---
license: apache-2.0
language:
- en
tags:
- text-generation
- causal-lm
- pytorch
- sft
- instruction-tuned
- chat
- reasoning
- tool-use
- hybrid
- gated-deltanet
- gqa
- tercet
pipeline_tag: text-generation
library_name: tiny_gdn
datasets:
- HuggingFaceFW/fineweb-edu
- HuggingFaceTB/smoltalk2
- HuggingFaceTB/smoltalk
- nvidia/Llama-Nemotron-Post-Training-Dataset
- nvidia/Nemotron-Post-Training-Dataset-v1
- nvidia/Nemotron-Agentic-v1
- nvidia/Nemotron-SFT-Agentic-v2
- nvidia/Nemotron-SFT-Instruction-Following-Chat-v2
- nvidia/Nemotron-Instruction-Following-Chat-v1
- nvidia/Nemotron-Cascade-2-SFT-Data
- Agent-Ark/Toucan-1.5M
- interstellarninja/hermes_reasoning_tool_use
- NousResearch/Hermes-3-Dataset
- allenai/WildChat-4.8M
- open-thoughts/OpenThoughts3-1.2M
- teknium/OpenHermes-2.5
- open-r1/Mixture-of-Thoughts
- CohereLabs/aya_dataset
- NousResearch/hermes-function-calling-v1
- simplescaling/s1K-1.1
- allenai/tulu-3-sft-personas-instruction-following
- Salesforce/xlam-function-calling-60k
- THUDM/LongAlign-10k
base_model: kerzgrr/Tercet-R-1.0
---
<div align="center">
# Tercet-R-1.1
### Reasoning + tool-call chat model (~502M) — latest Tercet-R snapshot
[](.)
[](.)
[](LICENSE)
[](https://huggingface.co/spaces/kerzgrr/tercet-r-1.1-demo)
*A ~502M hybrid GDN-2 + GQA model, continued on multi-turn tools and instruction following*
</div>
---
## What this is
**Tercet-R-1.1** is the latest public reasoning / tool-use checkpoint in the Tercet-R line.
- Previous public snapshot: [`kerzgrr/Tercet-R-1.0`](https://huggingface.co/kerzgrr/Tercet-R-1.0)
- Base (pretrain): [`kerzgrr/Tercet-base`](https://huggingface.co/kerzgrr/Tercet-base)
- Live demo: [`kerzgrr/tercet-r-1.1-demo`](https://huggingface.co/spaces/kerzgrr/tercet-r-1.1-demo)
- Hub weights are the **EMA** snapshot in **bfloat16**
This upload is the latest **complete** stage-3 SFT checkpoint (optimizer step **5,300**). The stage-3 run is still in progress toward a much longer schedule; 1.1 is the snapshot that existed when this repo was published.
Initialization was the instruct-run EMA at step 5,000 (`tercet-r-instruct`), not the public 1.0 file (that release packaged instruct step 4,500). The chat contract is unchanged.
---
## Chat contract
### Thinking
Each assistant turn is prefixed with a **zero-loss control token**:
| Mode | Prefix | Typical body |
|------|--------|----------------|
| think | `<\|think\|>\n` | `<think>…</think>` then the answer |
| no-think | `<\|no_think\|>\n` | answer only |
`inference.py` streams the `<think>` region live (dim yellow) and hides the control tokens.
### Tool calls (SmolTalk JSON)
```
<tool_call>
{"name": "web-search", "arguments": {"query": "…"}}
</tool_call>
```
Stage-3 also saw `stateful_python_code_exec` leftovers from earlier Cascade-2 SFT. `inference.py` auto-runs:
| Built-in | Tool name | Observation |
|----------|-----------|-------------|
| `--tools web-search` | `web-search` | Tavily-shaped JSON (Tavily if `TAVILY_API_KEY` is set, else DuckDuckGo + Wikipedia) |
| `--tools python` | `stateful_python_code_exec` | Jupyter-style stdout / last value from a restricted interpreter |
| `--tools calculator` | `calculator` | Numeric result of a math expression |
### Tool results
Each observation is a `tool` (or `user`) turn prefixed with:
```
<|tool_response|>
{observation}
```
---
## Install & run
```bash
pip install torch safetensors tokenizers huggingface_hub
hf download kerzgrr/Tercet-R-1.1 inference.py --local-dir .
python inference.py
```
```bash
python inference.py --prompt "What is the capital of France?"
python inference.py --tools web-search,python,calculator
python inference.py --no-think --prompt "Reply in one sentence."
```
`inference.py` auto-downloads weights / tokenizer / `tiny_gdn/` and auto-installs pinned `flash-linear-attention`. Git is required on `PATH`.
| Flag | Default | Description |
|------|---------|-------------|
| `--prompt` | — | One-shot user message |
| `--system` | — | System prompt, used verbatim |
| `--think` / `--no-think` | think | Assistant control prefix |
| `--tools` | — | Built-ins: `web-search`, `python`, `calculator` (comma-separated) |
| `--temperature` | `0.7` | Sampling temperature |
| `--max-new-tokens` | `4096` | Max generation length |
| `--device` | `cuda` if available | `cuda` / `cpu` |
Interactive commands: `/think` `/no_think` `/system …` `/reset` `/exit`.
---
## Model architecture
Same TinyGDN hybrid as [`Tercet-base`](https://huggingface.co/kerzgrr/Tercet-base) (501,635,264 parameters):
| | |
|--|--|
| **Layers** | 32 (GDN-2 ×3 + GQA every 4th) |
| **Hidden** | 1,024 |
| **MLP** | SwiGLU 2,624 |
| **Attention** | 8 Q / 2 KV, head dim 128, partial RoPE |
| **Linear** | Gated DeltaNet-2, 8 heads × 128 |
| **Vocab** | 49,152 BPE |
| **Context** | 16,384 |
---
## Training
| Stage | Details |
|-------|---------|
| **Base** | [HuggingFaceFW/fineweb-edu](https://huggingface.co/datasets/HuggingFaceFW/fineweb-edu) → [`Tercet-base`](https://huggingface.co/kerzgrr/Tercet-base) |
| **Mid + instruct SFT** | [HuggingFaceTB/smoltalk2](https://huggingface.co/datasets/HuggingFaceTB/smoltalk2) Mid / SFT → instruct EMA @ step 5,000 |
| **Stage-3 SFT** | Multi-turn mix: Nemotron PTD v1, Agentic v1/v2 (including `web-search`), IF-Chat v1/v2, Cascade-2 instruction following, Toucan 1.5M, Hermes-3, Hermes reasoning tool-use, WildChat-4.8M. Seq 16,384, AdamW 3×10⁻⁵, 27.5 hours so far, 602M training tokens |
| **Checkpoint** | optimizer step 5,300 (latest complete stage-3 snapshot) |
| **Weights** | EMA (this repo's `model.safetensors`) |
| **Val loss (EMA)** | 2.027 (ppl 7.59) on the stage-3 holdout — a harder mix than the instruct-only 1.0 val set |
Stage-3 does **not** re-include Cascade-2 `math/math_tool.jsonl`. The restricted Python tool in `inference.py` is there so leftover `stateful_python_code_exec` calls still compute instead of failing open.
---
## Limitations
- **In-progress run**: this is a mid-stage-3 snapshot, not a finished 1.1 train
- **Scale**: ~502M is a research / edge model, not a frontier system
- Requires `flash-linear-attention`; not GGUF / llama.cpp compatible today
- The Python tool is a restricted interpreter (math-oriented imports only)
---
## Model family
| Model | Stage | Hub |
|-------|-------|-----|
| Tercet-base | Pretrain | [`kerzgrr/Tercet-base`](https://huggingface.co/kerzgrr/Tercet-base) |
| Tercet | SFT chat | [`kerzgrr/Tercet`](https://huggingface.co/kerzgrr/Tercet) |
| Tercet-R-1.0 | SFT reasoning + tools | [`kerzgrr/Tercet-R-1.0`](https://huggingface.co/kerzgrr/Tercet-R-1.0) |
| **Tercet-R-1.1** | **Stage-3 SFT (latest)** | **this repo** |
| Demo | ZeroGPU Space | [`kerzgrr/tercet-r-1.1-demo`](https://huggingface.co/spaces/kerzgrr/tercet-r-1.1-demo) |
---
## Citation
```bibtex
@misc{tercetr11,
title={Tercet-R-1.1: A 502M Hybrid GDN-2 + GQA Reasoning Model},
author={kerzgrr},
year={2026},
url={https://huggingface.co/kerzgrr/Tercet-R-1.1}
}
```
---
<div align="center">
*R is for reasoning.*
</div>
|