Model card (training facts; results to follow)
Browse files
README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- pl
|
| 4 |
+
- en
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: pytorch
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
tags:
|
| 9 |
+
- polish
|
| 10 |
+
- causal-lm
|
| 11 |
+
- from-scratch
|
| 12 |
+
datasets:
|
| 13 |
+
- SlayerLab/slayer-pl-8x3b
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Slayer1B 1.01
|
| 17 |
+
|
| 18 |
+
Decoder-only language model, 1 073 912 851 parameters, Polish-dominant. **Slayer1B 1.01 is Slayer1B 1.00 trained
|
| 19 |
+
further**: training resumed from the last checkpoint of 1.00 before its learning-rate decay (step 1050) and continued to
|
| 20 |
+
2860 steps, i.e. twice the tokens per parameter of 1.00 (2 998 927 360 tokens, ≈ 2.8 tokens per parameter).
|
| 21 |
+
|
| 22 |
+
- Previous version: [SlayerLab/Slayer1B-1.00](https://huggingface.co/SlayerLab/Slayer1B-1.00)
|
| 23 |
+
- Training checkpoints (with optimizer state): [SlayerLab/Slayer1B-1.01-checkpoints](https://huggingface.co/SlayerLab/Slayer1B-1.01-checkpoints)
|
| 24 |
+
- Training curve and evaluations during training: https://track.fabryka.ai/run/4934429a-d393-42e0-8aac-03eae6b71ff7
|
| 25 |
+
|
| 26 |
+
## Results
|
| 27 |
+
|
| 28 |
+
The final evaluation of step 2860 (same protocol as the 1.00 card) is being computed and will be added to this section.
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
The weights are a plain PyTorch state dict in safetensors; they are not a `transformers` AutoModel. The model class
|
| 33 |
+
is `GPT` in `train_gpt_ref_r23.py` (included).
|
| 34 |
+
|
| 35 |
+
```python
|
| 36 |
+
import torch, load_slayer
|
| 37 |
+
from tokenizers import Tokenizer
|
| 38 |
+
model = load_slayer.load(".") # directory with the files of this repository
|
| 39 |
+
tok = Tokenizer.from_file("tokenizer.json")
|
| 40 |
+
ids = torch.tensor([tok.encode("Stolicą Polski jest").ids])
|
| 41 |
+
logits, _ = model(ids) # [batch, seq, 32768]
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
## Model
|
| 45 |
+
|
| 46 |
+
| | |
|
| 47 |
+
|---|---|
|
| 48 |
+
| Parameters | 1 073 912 851 (input and output embeddings tied, counted once) |
|
| 49 |
+
| Architecture | decoder-only transformer, 20 layers, d_model 2048, 16 attention heads (MHA, head dim 128) |
|
| 50 |
+
| Blocks | pre-norm RMSNorm, QK-norm, RoPE (θ = 500 000), value residual, SwiGLU MLP (hidden 5462), no biases |
|
| 51 |
+
| Context | 4096 tokens |
|
| 52 |
+
| Tokenizer | byte-level BPE, 32 768 tokens (`tokenizer.json`, sha256 `0640d3bd…`), EOS id 0 |
|
| 53 |
+
|
| 54 |
+
## Training data
|
| 55 |
+
|
| 56 |
+
Source: `SlayerLab/slayer-pl-8x3b`, revision `d50df04a6ad46876fa559a87cca5d3e2a96e7098`.
|
| 57 |
+
|
| 58 |
+
- Steps 1–1050 (from 1.00) and 1051–1800: the pack-00 stream of 1.00 (`train.bin` sha256 `760ef0cc…`), each 4096-token
|
| 59 |
+
window at most once, the same windows as 1.00 up to its step 1050.
|
| 60 |
+
- Steps 1801–2860: a new stream from pack-01 (its own disjoint web slice; core, legal and English documents selected
|
| 61 |
+
from a hash interval disjoint from the one used for pack-00), `train.bin` sha256 `0494df58…`,
|
| 62 |
+
1,880,520,445 tokens available, of which 1 059 × 1 048 576 were consumed.
|
| 63 |
+
|
| 64 |
+
Mixing weights of the pack (cl100k tokens): web 0.63, core 0.19, legal 0.08, English 0.10. In this tokenizer's tokens
|
| 65 |
+
the pack-01 stream is web 52.1 %, core 22.1 %, legal 8.2 %, English 17.6 % (pack-00: 51.8 / 22.2 / 8.5 / 17.6).
|
| 66 |
+
Personal data: same rule-based masking as in 1.00 (tags `[EMAIL]`, `[TELEFON]`, `[PESEL]`, `[NIP]`, `[REGON]`,
|
| 67 |
+
`[DOWOD]`); masking does not guarantee removal of every personal datum.
|
| 68 |
+
|
| 69 |
+
Overlap with evaluation sets (13-gram, pack-01 stream vs. the task files): no evaluation item has 90 % or more of its
|
| 70 |
+
13-grams in the stream; MultiBLiMP-pl has 10 of 3 272 items with ≥ 50 % overlap, WikiText-2 has 26 of 62 documents with
|
| 71 |
+
any shared 13-gram (none ≥ 50 %).
|
| 72 |
+
|
| 73 |
+
## Training
|
| 74 |
+
|
| 75 |
+
| | |
|
| 76 |
+
|---|---|
|
| 77 |
+
| Hardware | 8 × NVIDIA RTX 5090 (32 GB), DDP |
|
| 78 |
+
| Batch | 256 × 4096 = 1 048 576 tokens per step |
|
| 79 |
+
| Steps | resumed at 1050, ran 1051 → 2860 (13:56 → 18:54 UTC, ≈ 108 000 tokens/s) |
|
| 80 |
+
| Tokens | 2860 × 1 048 576 = 2 998 927 360 in total |
|
| 81 |
+
| Schedule | warmup 150, constant lr 6e-4 to step 2287, 1 − sqrt decay from step 2288 to lr / 10 |
|
| 82 |
+
| Optimizer | Muon (lr 0.02) for hidden weight matrices + AdamW (lr 6e-4, weight decay 0.1) for the rest |
|
| 83 |
+
| Final training loss | 2.5067 (step 2860); mean of the last 100 steps 2.5083 (1.00: 2.6990) |
|
| 84 |
+
| Resume check | mean training loss over steps 1060–1140 equal to the 1.00 run within 0.0001 nats |
|
| 85 |
+
| Checkpoints | every 150 steps + final; last before the decay: step 2250 |
|
| 86 |
+
|
| 87 |
+
## Limitations
|
| 88 |
+
|
| 89 |
+
- 1 073 912 851 parameters trained on 2 998 927 360 tokens (about 2.8 tokens per parameter).
|
| 90 |
+
- Polish-dominant data; English is a minority of the mixture.
|
| 91 |
+
- Base model: no instruction tuning, no safety tuning.
|
| 92 |
+
|
| 93 |
+
## License
|
| 94 |
+
|
| 95 |
+
Weights: Apache-2.0. Training data components carry their own licenses, including CC-BY-SA partitions (see the 1.00
|
| 96 |
+
card and the dataset card).
|