---
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.2
results:
- task: {type: text-generation, name: Language modeling}
dataset: {type: SlayerLab/minimal-en-corpus-2.5b, name: Minimal EN validation (sampled), split: validation}
metrics: [{type: loss, value: 2.5352059555, name: Final sampled validation loss}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: blimp, name: BLiMP, split: train}
metrics: [{type: acc, value: 0.7720149254}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: EleutherAI/lambada_openai, name: LAMBADA OpenAI, split: test}
metrics: [{type: acc, value: 0.2928391228}, {type: perplexity, value: 47.56334054}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: hellaswag, name: HellaSwag, split: validation}
metrics: [{type: acc_norm, value: 0.3006373232}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: piqa, name: PIQA, split: validation}
metrics: [{type: acc_norm, value: 0.6077257889}]
- task: {type: text-generation, name: Zero-shot evaluation}
dataset: {type: sciq, name: SciQ, split: test}
metrics: [{type: acc_norm, value: 0.67}]
- 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.4225589226}]
- 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.2346416382}]
---
# Pollock 1.2 — r004

> **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/r004.md`](./training-history/r004.md), a różnice między wydaniami w [`CHANGELOG.md`](./CHANGELOG.md).
### Architektura i tokenizer
| Właściwość | Wartość |
|---|---:|
| Rewizja / wydanie | r004 / Pollock 1.2 |
| Typ | decoder-only Transformer w stylu GPT-2 |
| Warstwy / głowy / embedding | 14 / 13 / 832 |
| Maksymalny kontekst | 1024 tokeny |
| Słownik | 12 288 tokenów |
| Parametry nanoGPT | 126 541 376 |
| Łączne unikalne parametry trenowalne | 127 393 344 |
| Tokenizer | byte-level BPE, pretokenizacja w stylu GPT-2 |
| Tokeny specjalne | <|endoftext|>, <|im_start|>, <|im_end|> |
Artefakt Transformers ma 127 522 304 parametry, w tym 128 960 zerowych parametrów bias dla zgodności z `GPT2LMHeadModel`. Natywny model był trenowany z `bias=False`.
### Dane i trening
Model wytrenowano na [`SlayerLab/minimal-en-corpus-2.5b`](https://huggingface.co/datasets/SlayerLab/minimal-en-corpus-2.5b), subiektywnie dobranej mieszance 15 anglojęzycznych źródeł. Przygotowanie obejmowało deduplikację dokładną i przybliżoną, filtrowanie języka oraz decontaminację benchmarków.
| Parametr | Wartość |
|---|---:|
| Tokeny treningowe / walidacyjne | 2 703 768 815 / 5 267 742 |
| Finalny checkpoint | aktualizacja 22 004 |
| Przetworzone tokeny | 10 815 406 080 (około 4 epoki) |
| Sekwencja / micro-batch na GPU | 1024 / 12 |
| Akumulacja globalna / na GPU | 40 / 40 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 | 1× NVIDIA GeForce RTX 5090 |
| 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.535206**; najlepszy wynik to **2.535055** w kroku 22 000. Nie należy porównywać tych wartości bezpośrednio z r003, ponieważ rewizje używały różnych offsetów podzbioru 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 | accuracy | 0.772015 | 67 000 |
| LAMBADA OpenAI | accuracy | 0.292839 | 5 153 |
| HellaSwag | normalized accuracy | 0.300637 | 10 042 |
| PIQA | normalized accuracy | 0.607726 | 1 838 |
| SciQ | normalized accuracy | 0.670000 | 1 000 |
| ARC-Easy | normalized accuracy | 0.422559 | 2 376 |
| ARC-Challenge | normalized accuracy | 0.234642 | 1 172 |
LAMBADA osiągnęła perplexity 47.563341. Pełne metryki i protokół zapisano w historii r004.
### 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. Dla r004 nie opublikowano jeszcze próbek generacji. Historyczne próbki są przypisane do poprzednich wag w historii r001.
### 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/r004.md`](./training-history/r004.md) for the complete technical record and [`CHANGELOG.md`](./CHANGELOG.md) for release-to-release changes.
### Architecture and tokenizer
| Property | Value |
|---|---:|
| Revision / release | r004 / Pollock 1.2 |
| Type | GPT-2-style decoder-only Transformer |
| Layers / heads / width | 14 / 13 / 832 |
| Maximum context | 1,024 tokens |
| Vocabulary | 12,288 tokens |
| nanoGPT parameters | 126,541,376 |
| Total unique trainable parameters | 127,393,344 |
| Tokenizer | byte-level BPE, GPT-2-style pretokenization |
| Special tokens | `<|endoftext|>`, `<|im_start|>`, `<|im_end|>` |
The Transformers artifact has 127,522,304 parameters, including 128,960 zero-valued compatibility bias parameters required by `GPT2LMHeadModel`. The native model was trained with `bias=False`.
### Data and training
The model was trained on [`SlayerLab/minimal-en-corpus-2.5b`](https://huggingface.co/datasets/SlayerLab/minimal-en-corpus-2.5b), a subjectively selected mixture of 15 English-language sources. Preparation included exact and approximate deduplication, language filtering, and benchmark decontamination.
| Setting | Value |
|---|---:|
| Training / validation tokens | 2,703,768,815 / 5,267,742 |
| Final checkpoint | update 22,004 |
| Token presentations | 10,815,406,080 (approximately 4 epochs) |
| Sequence / micro-batch per GPU | 1,024 / 12 |
| Global / per-GPU accumulation | 40 / 40 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 | 1× NVIDIA GeForce RTX 5090 |
| 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.535206**; the best result was **2.535055** at step 22,000. These values are not directly comparable with r003 because the revisions used different validation-subset offsets.
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 | accuracy | 0.772015 | 67,000 |
| LAMBADA OpenAI | accuracy | 0.292839 | 5,153 |
| HellaSwag | normalized accuracy | 0.300637 | 10,042 |
| PIQA | normalized accuracy | 0.607726 | 1,838 |
| SciQ | normalized accuracy | 0.670000 | 1,000 |
| ARC-Easy | normalized accuracy | 0.422559 | 2,376 |
| ARC-Challenge | normalized accuracy | 0.234642 | 1,172 |
LAMBADA perplexity was 47.563341. Full metrics and protocol details are recorded in the r004 history.
### Usage
Use the Transformers example in the Polish section. The artifact uses standard `GPT2LMHeadModel`; `trust_remote_code=True` is unnecessary. No r004 generation samples have been published yet. Historical samples are explicitly attached to the predecessor weights in the r001 history.
### 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).