File size: 1,868 Bytes
a1275fd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
pretty_name: declref-declref_symbols-1B
language:
- en
tags:
- pretokenized
- language-modeling
size_categories:
- 1B<n<10B
---

# declref-declref_symbols-1B

Procedurally generated **decl-ref** documents — a scoped declare/reference formal language whose trained-model entropy dynamics match language models on code and natural text — as flat `uint16` token-id `.bin` files. Each document is a random program of `{` `}` scopes, `DECL name value` statements (free, high-entropy content) and `REF name value` statements whose value tokens repeat an earlier declaration — predictable only by attending back to it. Names and values are 1–3 subtoken symbols; references are recency-weighted; keywords arrive in Markov runs. Token ids: 0=OPEN 1=CLOSE 2=DECL 3=REF, then name-parts and value-parts in disjoint blocks; vocab = 1,028.

**Grammar parameters**

| param | value |
| --- | --- |
| seq_length (document) | 2048 |
| shards (canonical layout) | 256 |

| file | split | tokens |
| --- | --- | --- |
| `train.bin` | train | 1,000,341,504 |
| `val.bin` | val | 9,961,472 |

The bin is a concatenation of fixed-length **2048-token documents** (`num_tokens` is a whole multiple of it): read via `tokens.reshape(-1, 2048)` to train one document per row. Document alignment matters — a window starting mid-document orphans its references. `train` (seed 0) and `val` (a disjoint seed) are independent streams of the same grammar; token count = `filesize / 2`; the metas carry the full config, including the shard layout that fixes the bin's exact content.

**Load a bin** with the standard Hugging Face downloader:

```python
from huggingface_hub import hf_hub_download
import numpy as np

path = hf_hub_download(repo_id="alexkstern/declref-declref_symbols-1B", filename="train.bin", repo_type="dataset")
tokens = np.memmap(path, dtype="uint16", mode="r")
```