Text Generation
Transformers
Safetensors
English
gpt2
causal-lm
nanogpt
bpe
educational
base-model
Eval Results (legacy)
text-generation-inference
Instructions to use SlayerLab/pollock-mini-lm-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SlayerLab/pollock-mini-lm-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SlayerLab/pollock-mini-lm-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("SlayerLab/pollock-mini-lm-125m") model = AutoModelForCausalLM.from_pretrained("SlayerLab/pollock-mini-lm-125m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SlayerLab/pollock-mini-lm-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SlayerLab/pollock-mini-lm-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SlayerLab/pollock-mini-lm-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SlayerLab/pollock-mini-lm-125m
- SGLang
How to use SlayerLab/pollock-mini-lm-125m 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 "SlayerLab/pollock-mini-lm-125m" \ --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": "SlayerLab/pollock-mini-lm-125m", "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 "SlayerLab/pollock-mini-lm-125m" \ --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": "SlayerLab/pollock-mini-lm-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SlayerLab/pollock-mini-lm-125m with Docker Model Runner:
docker model run hf.co/SlayerLab/pollock-mini-lm-125m
File size: 16,650 Bytes
05658ff 5e571cd 99df2d0 05658ff a2e53d9 5e571cd 99df2d0 a2e53d9 99df2d0 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd a2e53d9 05658ff 99df2d0 a2e53d9 99df2d0 5e571cd 99df2d0 5e571cd 99df2d0 698984b 99df2d0 a2e53d9 99df2d0 a2e53d9 5e571cd e780025 5e571cd 99df2d0 e780025 99df2d0 5b8f825 99df2d0 e780025 99df2d0 5e571cd 99df2d0 a2e53d9 99df2d0 a2e53d9 5e571cd a2e53d9 5e571cd 99df2d0 698984b 5e571cd 99df2d0 a2e53d9 99df2d0 a2e53d9 99df2d0 5e571cd 99df2d0 5e571cd a2e53d9 5e571cd a2e53d9 99df2d0 5e571cd 99df2d0 8bda8c7 a2e53d9 8bda8c7 b9abe2f a2e53d9 e780025 8bda8c7 99df2d0 5e571cd 99df2d0 698984b 99df2d0 a2e53d9 99df2d0 5e571cd a2e53d9 5e571cd e780025 5e571cd e780025 5e571cd e780025 99df2d0 a2e53d9 99df2d0 5e571cd a2e53d9 5e571cd a2e53d9 5e571cd 698984b 5e571cd a2e53d9 5e571cd 99df2d0 a2e53d9 99df2d0 698984b 99df2d0 5e571cd a2e53d9 99df2d0 a2e53d9 5e571cd 99df2d0 8bda8c7 a2e53d9 8bda8c7 b9abe2f a2e53d9 e780025 8bda8c7 99df2d0 5e571cd 99df2d0 5e571cd 99df2d0 698984b 99df2d0 5e571cd | 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 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | ---
language: [en]
library_name: transformers
pipeline_tag: text-generation
license: other
license_name: mixed-upstream-dataset-terms
license_link: https://huggingface.co/SlayerLab/pollock-mini-lm-125m/blob/main/LICENSE.md
datasets: [SlayerLab/minimal-en-corpus-2.5b]
tags: [causal-lm, gpt2, nanogpt, bpe, educational, base-model]
model-index:
- name: Pollock 1.4
results:
- task: {type: text-generation, name: Language modeling}
dataset: {type: SlayerLab/minimal-en-corpus-2.5b, name: Minimal EN 2.5B V2 validation (fixed subset), split: validation}
metrics: [{type: loss, value: 2.5363565445, name: Final fixed-subset validation loss}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: blimp, name: BLiMP, split: train}
metrics: [{type: acc, value: 0.7691641791}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: EleutherAI/lambada_openai, name: LAMBADA OpenAI, split: test}
metrics: [{type: acc, value: 0.2769260625}, {type: perplexity, value: 49.9072065519}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: hellaswag, name: HellaSwag, split: validation}
metrics: [{type: acc_norm, value: 0.3013343955}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: piqa, name: PIQA, split: validation}
metrics: [{type: acc_norm, value: 0.5968443961}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: sciq, name: SciQ, split: test}
metrics: [{type: acc_norm, value: 0.6640000000}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: allenai/ai2_arc, config: ARC-Easy, name: ARC-Easy, split: test}
metrics: [{type: acc_norm, value: 0.4343434343}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: allenai/ai2_arc, config: ARC-Challenge, name: ARC-Challenge, split: test}
metrics: [{type: acc_norm, value: 0.2414675768}]
---
# Pollock 1.4 — r006

> **Wydanie eksperymentalne / Experimental release.** Model nie jest przeznaczony do zastosowań produkcyjnych ani wysokiego ryzyka. Rozmiar może różnić się między rewizjami, ale cały model zawsze pozostaje poniżej 128M parametrów. / The model is not intended for production or high-risk use. Its size may vary between revisions, but the complete model always remains below 128M parameters.
## Polski
### Opis
Pollock to niewielki, anglojęzyczny model bazowy typu decoder-only, wytrenowany od zera jako czytelny eksperyment edukacyjny. Implementacja bazuje na [nanoGPT](https://github.com/karpathy/nanoGPT) i własnym tokenizerze byte-level BPE. Jest to model do uzupełniania tekstu, nie asystent konwersacyjny.
Nazwa luźno nawiązuje do gestu malarskiego Jacksona Pollocka: nanoGPT jest płótnem, na którym dane, konfiguracja i decyzje treningowe tworzą różne wzorce zachowania. Pełne dane techniczne tej wersji znajdują się w [`training-history/r006.md`](./training-history/r006.md), a różnice między wydaniami w [`CHANGELOG.md`](./CHANGELOG.md).
### Architektura i tokenizer
| Właściwość | Wartość |
|---|---:|
| Rewizja / wydanie | r006 / Pollock 1.4 |
| Typ | decoder-only Transformer w stylu GPT-2 |
| Warstwy / głowy / embedding | 12 / 14 / 896 |
| Maksymalny kontekst | 1024 tokeny |
| Słownik | 12 288 tokenów |
| Parametry nanoGPT | 126 637 952 |
| Łączne unikalne parametry trenowalne | 127 555 456 |
| Tokenizer | byte-level BPE, pretokenizacja w stylu GPT-2 |
| Tokeny specjalne | <code><|endoftext|></code>, <code><|im_start|></code>, <code><|im_end|></code> |
Artefakt Transformers ma 127 674 624 parametry, w tym 119 168 zerowych parametrów bias dla zgodności z `GPT2LMHeadModel`. Natywny model był trenowany z `bias=False`.
### Dane i trening
Model wytrenowano na wersji V2 datasetu [`SlayerLab/minimal-en-corpus-2.5b`](https://huggingface.co/datasets/SlayerLab/minimal-en-corpus-2.5b) przypiętej do commita `d68d992`. Jest to subiektywnie dobrana mieszanka 15 anglojęzycznych źródeł po filtrowaniu języka, deduplikacji dokładnej i przybliżonej, decontaminacji benchmarków oraz dodatkowym czyszczeniu boilerplate'u i błędnie połączonych rekordów. R006 wraca do tokenizera używanego przez r003-r004; nie jest on zgodny z tokenizerem r005 poza rozmiarem słownika i identyfikatorami tokenów specjalnych.
| Parametr | Wartość |
|---|---:|
| Tokeny treningowe / walidacyjne | 2 689 323 439 / 5 236 486 |
| Finalny checkpoint | aktualizacja 22 003 |
| Przetworzone tokeny | 10 814 914 560 (około 4,02 epoki) |
| Sekwencja / micro-batch na GPU | 1024 / 12 |
| Akumulacja globalna / na GPU | 40 / 20 micro-stepów |
| Effective batch | 491 520 tokenów |
| Optymalizator | fused AdamW, betas 0.9/0.95 |
| Learning rate | 4e-4 → 4e-5, cosine decay |
| Warmup / weight decay / grad clip | 440 / 0.1 / 1.0 |
| Precyzja | BF16 |
| Sprzęt | 2× NVIDIA GeForce RTX 4090 |
| Framework | PyTorch 2.8.0+cu128, nanoGPT commit `3adf61e` |
### Ewaluacja
Loss treningowy szacowano na stałych podzbiorach po 1 228 800 tokenów na split. Finalny checkpoint uzyskał validation loss **2.536357**; najlepszy wynik to **2.536231** po 10 813 440 000 przetworzonych tokenów. Nie należy porównywać tych wartości bezpośrednio z r005, ponieważ r006 używa innego korpusu, tokenizera i zbioru walidacyjnego.
Benchmarki wykonano zero-shot na pełnych splitach przy użyciu `lm-evaluation-harness` 0.4.12, batch size 8 i BF16.
| Benchmark | Główna metryka | Wynik | Próbki |
|---|---|---:|---:|
| BLiMP | acc | 0.769164 | 67 000 |
| LAMBADA | acc | 0.276926 | 5 153 |
| HellaSwag | acc_norm | 0.301334 | 10 042 |
| PIQA | acc_norm | 0.596844 | 1 838 |
| SciQ | acc_norm | 0.664000 | 1 000 |
| ARC-Easy | acc_norm | 0.434343 | 2 376 |
| ARC-Challenge | acc_norm | 0.241468 | 1 172 |
LAMBADA osiągnęła perplexity 49.907207. Pełne metryki i protokół zapisano w [`benchmarks/english.json`](./benchmarks/english.json).
### Użycie z Transformers
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SlayerLab/pollock-mini-lm-125m"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
inputs = tokenizer("Once upon a time", return_tensors="pt")
output = model.generate(
**inputs, max_new_tokens=100, do_sample=True, temperature=0.7, top_k=50
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
```
Model używa standardowego `GPT2LMHeadModel`; `trust_remote_code=True` nie jest potrzebne.
### Stałe próbki inferencji
Wspólny zestaw [`fixed-sampling-v1`](./inference-samples/README.md) pokazuje te same cztery prompty wygenerowane przez r001-r006. Wszystkie opublikowane rewizje są ładowane z pełnych, niezmiennych SHA commitów, a SHA-256 każdego pliku z wagami jest sprawdzane przed inferencją. Referencyjny protokół używa macOS 26.2 na arm64, CPU, float32, jednego wątku, Transformers 5.15.1, seed 1337 resetowanego dla każdego promptu, temperature 0.7, top-k 50 i limitu 100 nowych tokenów.
| Rewizja | Wydanie | Wagi | Historia |
|---|---|---|---|
| **r006** | **Pollock 1.4** | [`a2e53d9`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/a2e53d9f1b690ebfbea375cf8bd3b5bdf69dece9) | [`r006.md`](./training-history/r006.md) |
| r005 | Pollock 1.3 | [`e780025`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/e780025f15e06bc3765a74d973906eb8a11c022c) | [`r005.md`](./training-history/r005.md) |
| r004 | Pollock 1.2 | [`30feb81`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/30feb81e5097eef13b939e1827d98e0458bf602d) | [`r004.md`](./training-history/r004.md) |
| r003 | Pollock 1.1 | [`698984b`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/698984b1d1b96c9b6ffaff00c7fc2e78e140e842) | [`r003.md`](./training-history/r003.md) |
| r002 | Pollock 1.0 | [`5e571cd`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/5e571cde09ef2d1124e13d1c31d0b75f8bd0e513) | [`r002.md`](./training-history/r002.md) |
| r001 | poprzednik eksperymentalny | [`5b8f825`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/5b8f82515c4e31d9a4a8a222eabdaab3ad5171b0) | [`r001.md`](./training-history/r001.md) |
Pełne teksty są przeznaczone do porównywania zachowania, nie są benchmarkiem ani deklaracją poprawności. [`results.json`](./inference-samples/results.json) zapisuje także dokładne identyfikatory tokenów, a [`generate.py`](./inference-samples/generate.py) odtwarza i weryfikuje cały zestaw. Dokładny replay potwierdzono w zapisanym środowisku; inny system operacyjny lub CPU może zmienić wynik samplingu. Starsze próbki osadzone w historii r001 pozostają historycznym zapisem i nie są używane do bezpośredniego porównania, ponieważ nie przypięto całego ich środowiska wykonania.
### Ograniczenia i odpowiedzialne użycie
- Jest to surowy model bazowy bez instruction tuningu, RLHF ani alignmentu.
- Może halucynować oraz generować treści toksyczne, stronnicze, niebezpieczne lub podobne do danych treningowych.
- Mały rozmiar ogranicza wiedzę, rozumowanie, spójność długiego tekstu i jakość kodu.
- Model trenowano i oceniano głównie po angielsku.
- Nie należy używać go do porad medycznych, prawnych i finansowych, decyzji o ludziach ani zastosowań wysokiego ryzyka.
- Użytkownik odpowiada za ocenę warunków źródeł danych dla swojego zastosowania.
## English
### Overview
Pollock is a small English decoder-only base language model trained from scratch as a readable educational experiment. It is based on [nanoGPT](https://github.com/karpathy/nanoGPT) and a custom byte-level BPE tokenizer. It is a completion model, not a conversational assistant.
The name loosely refers to Jackson Pollock's painterly gesture: nanoGPT is the canvas on which data, configuration, and training decisions create different behavioral patterns. See [`training-history/r006.md`](./training-history/r006.md) for the complete technical record and [`CHANGELOG.md`](./CHANGELOG.md) for release-to-release changes.
### Architecture and tokenizer
| Property | Value |
|---|---:|
| Revision / release | r006 / Pollock 1.4 |
| Type | GPT-2-style decoder-only Transformer |
| Layers / heads / width | 12 / 14 / 896 |
| Maximum context | 1,024 tokens |
| Vocabulary | 12,288 tokens |
| nanoGPT parameters | 126,637,952 |
| Total unique trainable parameters | 127,555,456 |
| Tokenizer | byte-level BPE, GPT-2-style pretokenization |
| Special tokens | `<|endoftext|>`, `<|im_start|>`, `<|im_end|>` |
The Transformers artifact has 127,674,624 parameters, including 119,168 zero-valued compatibility bias parameters required by `GPT2LMHeadModel`. The native model was trained with `bias=False`.
### Data and training
The model was trained on V2 of [`SlayerLab/minimal-en-corpus-2.5b`](https://huggingface.co/datasets/SlayerLab/minimal-en-corpus-2.5b), pinned to commit `d68d992`. It is a subjectively selected mixture of 15 English-language sources after language filtering, exact and approximate deduplication, benchmark decontamination, and additional cleanup of boilerplate and incorrectly concatenated records. R006 returns to the tokenizer used by r003-r004; it is not compatible with r005's tokenizer beyond the vocabulary size and special-token IDs.
| Setting | Value |
|---|---:|
| Training / validation tokens | 2,689,323,439 / 5,236,486 |
| Final checkpoint | update 22,003 |
| Token presentations | 10,814,914,560 (approximately 4.02 epochs) |
| Sequence / micro-batch per GPU | 1,024 / 12 |
| Global / per-GPU accumulation | 40 / 20 micro-steps |
| Effective batch | 491,520 tokens |
| Optimizer | fused AdamW, betas 0.9/0.95 |
| Learning rate | 4e-4 → 4e-5, cosine decay |
| Warmup / weight decay / grad clip | 440 / 0.1 / 1.0 |
| Precision | BF16 |
| Hardware | 2× NVIDIA GeForce RTX 4090 |
| Framework | PyTorch 2.8.0+cu128, nanoGPT commit `3adf61e` |
### Evaluation
Training-time loss was estimated on fixed subsets of 1,228,800 tokens per split. The final checkpoint achieved validation loss **2.536357**; the best result was **2.536231** after 10,813,440,000 token presentations. These values are not directly comparable with r005 because r006 uses a different corpus, tokenizer, and validation set.
Benchmarks used complete splits with `lm-evaluation-harness` 0.4.12, zero few-shot examples, batch size 8, and BF16.
| Benchmark | Primary metric | Score | Samples |
|---|---|---:|---:|
| BLiMP | acc | 0.769164 | 67,000 |
| LAMBADA | acc | 0.276926 | 5,153 |
| HellaSwag | acc_norm | 0.301334 | 10,042 |
| PIQA | acc_norm | 0.596844 | 1,838 |
| SciQ | acc_norm | 0.664000 | 1,000 |
| ARC-Easy | acc_norm | 0.434343 | 2,376 |
| ARC-Challenge | acc_norm | 0.241468 | 1,172 |
LAMBADA perplexity was 49.907207. Full metrics and protocol details are recorded in [`benchmarks/english.json`](./benchmarks/english.json).
### Usage
Use the Transformers example in the Polish section. The artifact uses standard `GPT2LMHeadModel`; `trust_remote_code=True` is unnecessary.
### Fixed inference samples
The shared [`fixed-sampling-v1`](./inference-samples/README.md) suite runs the same four prompts on r001-r006. All published revisions are loaded from full immutable commit SHAs, and every weight-file SHA-256 is verified before inference. The reference protocol uses macOS 26.2 on arm64, CPU float32 with one thread, Transformers 5.15.1, seed 1337 reset for every prompt, temperature 0.7, top-k 50, and a 100-new-token limit.
| Revision | Release | Weights | History |
|---|---|---|---|
| **r006** | **Pollock 1.4** | [`a2e53d9`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/a2e53d9f1b690ebfbea375cf8bd3b5bdf69dece9) | [`r006.md`](./training-history/r006.md) |
| r005 | Pollock 1.3 | [`e780025`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/e780025f15e06bc3765a74d973906eb8a11c022c) | [`r005.md`](./training-history/r005.md) |
| r004 | Pollock 1.2 | [`30feb81`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/30feb81e5097eef13b939e1827d98e0458bf602d) | [`r004.md`](./training-history/r004.md) |
| r003 | Pollock 1.1 | [`698984b`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/698984b1d1b96c9b6ffaff00c7fc2e78e140e842) | [`r003.md`](./training-history/r003.md) |
| r002 | Pollock 1.0 | [`5e571cd`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/5e571cde09ef2d1124e13d1c31d0b75f8bd0e513) | [`r002.md`](./training-history/r002.md) |
| r001 | experimental predecessor | [`5b8f825`](https://huggingface.co/SlayerLab/pollock-mini-lm-125m/commit/5b8f82515c4e31d9a4a8a222eabdaab3ad5171b0) | [`r001.md`](./training-history/r001.md) |
The complete texts are behavioral examples, not benchmarks or factuality claims. [`results.json`](./inference-samples/results.json) also records exact token IDs, while [`generate.py`](./inference-samples/generate.py) reproduces and verifies the suite. Exact replay was confirmed in the recorded environment; another operating system or CPU can change sampled outputs. The older samples embedded in the r001 history remain a historical record and are excluded from direct comparison because their complete execution environment was not pinned.
### Limitations and responsible use
- This is a raw base model without instruction tuning, RLHF, or safety alignment.
- It may hallucinate and generate toxic, biased, unsafe, or training-like text.
- Its small size limits knowledge, reasoning, long-form coherence, and code quality.
- It was trained and evaluated primarily in English.
- Do not use it for medical, legal, financial, high-impact, or production decisions without independent safeguards.
- Users must evaluate upstream dataset terms for their intended use.
## Licencja / License
Kod nanoGPT jest na licencji MIT. Korpus łączy źródła o różnych warunkach i nie ma jednej wspólnej licencji, dlatego model oznaczono jako `license: other`. Szczegóły: [`LICENSE.md`](./LICENSE.md) i karta datasetu.
nanoGPT code is MIT-licensed. The corpus combines sources governed by different terms and has no single common license, so the model is marked as `license: other`. See [`LICENSE.md`](./LICENSE.md) and the dataset card.
## Pochodzenie / Attribution
Model i dataset / Model and dataset: Dawid Majewski / SlayerLab. Trening bazuje na / Training is based on [karpathy/nanoGPT](https://github.com/karpathy/nanoGPT).
|