File size: 7,158 Bytes
d3c8302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4d32849
d3c8302
4d32849
d3c8302
4d32849
d3c8302
4d32849
 
 
 
 
 
 
 
 
 
 
 
d3c8302
 
 
4d32849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437aca4
4d32849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d3c8302
 
 
 
 
 
4d32849
d3c8302
4d32849
 
 
d3c8302
4d32849
 
 
 
 
 
 
 
d3c8302
 
 
 
 
 
 
 
 
 
 
 
 
4d32849
d3c8302
4d32849
 
 
 
d3c8302
 
 
 
4d32849
d3c8302
 
 
 
 
 
 
 
 
 
 
 
 
4d32849
d3c8302
 
 
 
 
4d32849
 
d3c8302
 
 
 
4d32849
 
 
 
 
 
 
 
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
---
library_name: transformers
pipeline_tag: text-generation
base_model: Qwen/Qwen2.5-3B-Instruct
datasets:
  - muradil211/AetherSearch_SFT
tags:
  - aethersearch
  - agentic-search
  - search-augmented-generation
  - supervised-fine-tuning
  - qwen2
language:
  - en
---

<div align="center">

<img src="assets/aethersearch-mark.svg" alt="AetherSearch monogram" width="144">

# 🔭 AetherSearch SFT

### A compact search agent that learns to reason, retrieve, and answer

Fine-tuned from **Qwen2.5-3B-Instruct** on **2,000 complete search trajectories**.

<p>
  <a href="https://huggingface.co/Qwen/Qwen2.5-3B-Instruct"><img src="https://img.shields.io/badge/Base-Qwen2.5--3B--Instruct-7C3AED?style=flat-square" alt="Base model: Qwen2.5-3B-Instruct"></a>
  <img src="https://img.shields.io/badge/Weights-BF16-0F766E?style=flat-square" alt="Weights: BF16">
  <a href="https://huggingface.co/datasets/muradil211/AetherSearch_SFT"><img src="https://img.shields.io/badge/Trajectories-2%2C000-F59E0B?style=flat-square" alt="Training trajectories: 2,000"></a>
  <img src="https://img.shields.io/badge/Context-32K-2563EB?style=flat-square" alt="Context window: 32K">
</p>

[🏠 Project](https://github.com/Muradil-mamat-211/AetherSearch) ·
[🧪 Training code](https://github.com/Muradil-mamat-211/AetherSearch/tree/main/sft) ·
[📚 Dataset](https://huggingface.co/datasets/muradil211/AetherSearch_SFT)

</div>

> 🔌 **Bring your own retriever.** AetherSearch SFT is a search-agent policy,
> not a self-contained QA service. The host runtime must execute each
> `<search>...</search>` request and return evidence inside
> `<information>...</information>`.

## ✨ Highlights

- 🔎 **Search-native behavior** — learns when and what to search before answering.
- 🔁 **Single- and multi-search trajectories** — trained on 1,025 single-search
  and 975 multi-search examples.
- 🧾 **Evidence-in-the-loop reasoning** — retrieved passages stay visible as
  context while being excluded from the training loss.
-**Compact 3B backbone** — built on Qwen2.5-3B-Instruct for accessible
  experimentation and deployment.
- 🧪 **Reproducible release** — public trainer, launcher, data checksum, schema
  tests, and artifact manifest are included or linked.

## 🧠 How it works

```text
Question


<think>reason about what is missing</think>


<search>focused retrieval query</search> ─────► Search / RAG backend
   ▲                                                  │
   └──── <information>retrieved evidence</information> ◄────┘

   ├── repeat the search loop when more evidence is needed

<answer>evidence-grounded final answer</answer>
```

The model produces the reasoning, search, and answer spans. Your runtime owns
retrieval: parse a completed `<search>` span, run the query, append the result
as `<information>`, and resume generation until the model emits `<answer>`.

## 📊 Model at a glance

| Field | Value |
|---|---|
| 🧱 Base model | [`Qwen/Qwen2.5-3B-Instruct`](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct) |
| 🧬 Base revision | `aa8e72537993ba99e69dfaafa59ed015b17504d1` |
| 🏗️ Architecture | Qwen2 causal language model |
| 🔢 Parameters | 3,085,938,688 |
| 🎛️ Weight dtype | BF16 |
| 📏 Context | 32,768 positions; training sequences capped at 4,096 |
| 📚 Training data | 2,000 complete trajectories |
| 🔍 Search mix | 1,025 single-search + 975 multi-search trajectories |
| 🎓 Training stage | One full-trajectory SFT stage |

## 🚀 Quick start

```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "muradil211/AetherSearch_SFT"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
model.config.use_cache = True
model.eval()
```

> 💡 Loading the checkpoint is only the first step. For end-to-end use, wrap
> generation in the retrieval loop shown above and preserve the XML protocol
> exactly.

## 🧬 Checkpoint identity

This model was trained once on the 2,000 records in the canonical
`final_sft_2000.jsonl` dataset, using the same configuration as the public
AetherSearch SFT-2000 training code. The release contains the final model
artifacts and reproducible code, not server-local logs or optimizer state.

**Dataset SHA-256**

```text
fec609652d3832c7a6c0ee2861c6f946b6cf7c3d3d40fc5d9be9b75df6325dcb
```

## 🧪 Training recipe

| Setting | Value | Setting | Value |
|---|---:|---|---:|
| Epochs | 1 | Learning rate | `2e-6` |
| Scheduler | Cosine | Global batch size | 24 |
| Precision | BF16 + TF32 | Max sequence length | 4,096 |
| Padding | Dynamic | Distributed training | DeepSpeed ZeRO-3 |

The training configuration matches the public SFT-2000 recipe: one epoch,
learning rate `2e-6`, cosine scheduling, BF16, TF32, gradient checkpointing,
dynamic padding, effective global batch size 24, and DeepSpeed ZeRO-3. On the
three-worker training topology, per-device batch size 1 and gradient
accumulation 8 resolve to that global batch. The completed checkpoint is
exported as `final_model/`.

The public launcher is hardware-topology independent: it uses the devices made
visible by the surrounding runtime and derives gradient accumulation to keep
global batch 24 unchanged. It does not embed physical GPU IDs, node addresses,
NCCL fabric settings, allocator tuning, or server-local paths.

### 🎯 Supervision contract

- ⬛ System, user, and question tokens are **masked**.
- ⬛ Complete `<information>...</information>` spans are **masked**.
- ✅ Assistant `<think>`, `<search>`, and `<answer>` spans are **supervised**.
- ✅ The final assistant `<|im_end|>` token is **supervised**.

The trainer, launcher, configuration, checksum, and schema tests are published
in the [AetherSearch SFT directory](https://github.com/Muradil-mamat-211/AetherSearch/tree/main/sft).

## 📦 Files and integrity

The release contains two BF16 SafeTensors shards, the shard index, model and
generation configuration, tokenizer assets, this model card, the project logo,
and `MODEL_MANIFEST.sha256`. It intentionally excludes optimizer states,
intermediate checkpoints, `training_args.bin`, evaluation bundles, and all log
files.

After download, verify the release from its repository directory:

```bash
sha256sum -c MODEL_MANIFEST.sha256
```

## ⚠️ Limitations

Generated searches and answers can be incorrect, unsupported, or unsafe;
retrieval and answer verification remain the caller's responsibility. No
evaluation result is claimed by this model card.

## 📜 Terms

No additional blanket license is asserted here. Review the
[Qwen2.5-3B-Instruct license](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct/blob/main/LICENSE)
and the [AetherSearch SFT data attribution and rights status](https://github.com/Muradil-mamat-211/AetherSearch/blob/main/sft/ATTRIBUTION.md)
before redistribution or downstream use.

---

<div align="center">

**Built for experiments in agentic search and retrieval-augmented reasoning.** 🔎✨

</div>