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", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("SlayerLab/pollock-mini-lm-125m", trust_remote_code=True, 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
Pollock 1.6 - r008
Wydanie eksperymentalne / Experimental release. Model nie jest przeznaczony do zastosowaล produkcyjnych ani wysokiego ryzyka. Caลy model pozostaje poniลผej 128M parametrรณw. / The model is not intended for production or high-risk use. The complete model 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 i wลasnym tokenizerze byte-level BPE. Jest to model do uzupeลniania tekstu, nie asystent konwersacyjny.
R008 zastฤpuje klasyczny blok GELU MLP blokiem SwiGLU dopasowanym do tego samego
budลผetu poniลผej 128M parametrรณw. Tokenizer, korpus, kontekst, liczba warstw,
szerokoลฤ modelu, attention i effective batch pozostajฤ
zgodne z R007. Peลna
historia techniczna znajduje siฤ w training-history/r008.md,
a rรณลผnice miฤdzy wydaniami w CHANGELOG.md.
Architektura i tokenizer
| Wลaลciwoลฤ | Wartoลฤ |
|---|---|
| Rewizja / wydanie | r008 / Pollock 1.6 |
| Typ | decoder-only Transformer w stylu GPT-2 z SwiGLU |
| Warstwy / gลowy / embedding | 16 / 12 / 768 |
| Szerokoลฤ SwiGLU | 2 144 |
| Maksymalny kontekst | 2 048 tokenรณw |
| Sลownik | 12 288 tokenรณw |
| ลฤ czne unikalne parametry trenowalne | 127 820 544 |
| Tokenizer | byte-level BPE, pretokenizacja w stylu GPT-2 |
| Tokeny specjalne | <|endoftext|>, <|im_start|>, <|im_end|> |
Model uลผywa wลasnej klasy Transformers PollockForCausalLM, poniewaลผ standardowy
GPT2LMHeadModel nie implementuje tego wariantu SwiGLU. Wybrany checkpoint z
aktualizacji 32 000 ma SHA-256
25b8cac7d5142c75e1be0b42fa24d980896e6f911e912c883566747a3baa56f0.
Konwersja w Transformers 5.15.1 wykazaลa maksymalnฤ
bezwzglฤdnฤ
rรณลผnicฤ logits
0.0 na deterministycznej prรณbie [2, 64]. SHA-256 pliku
model.safetensors to
1c1002909119b4913841ee29efd44bd86d62d81f2ae27de01602b64d4af0dbec.
Artefakt Transformers ma 127 975 936 parametrรณw, w tym zerowe tensory bias
wymagane przez implementacjฤ pakietowฤ
; model natywny ma 127 820 544 parametrรณw.
Muon optymalizuje kwalifikujฤ ce siฤ ukryte macierze attention i MLP. AdamW obsลuguje embeddingi tokenรณw, powiฤ zanฤ gลowicฤ wyjลciowฤ , parametry normalizacji i biasy. Podziaล parametrรณw jest sprawdzany przed treningiem pod kฤ tem nakลadania siฤ i kompletnoลci.
Dane i trening
Model jest trenowany na
SlayerLab/minimal-en-corpus-5b
przypiฤtym do commita 38bebbd. Jest to subiektywnie dobrana mieszanka 15
anglojฤzycznych ลบrรณdeล po filtrowaniu jฤzyka, deduplikacji dokลadnej i
przybliลผonej oraz decontaminacji benchmarkรณw. R008 zachowuje tokenizer R007.
Loader stosuje globalnฤ permutacjฤ ze staลym seedem do niezmiennych okien tokenรณw w kaลผdym przebiegu, przydziela rozลฤ czne pozycje miฤdzy rangi DDP, maskuje koลcowy niepeลny batch i zapisuje globalny kursor, topologiฤ oraz ustawienia tasowania w kaลผdym checkpoincie.
| Parametr | Wartoลฤ |
|---|---|
| Tokeny treningowe / walidacyjne | 5 396 605 407 / 5 238 223 |
| Planowane maksimum / wybrana ekspozycja | 4 przebiegi / 15 728 561 562 targety |
| Wybrany checkpoint | aktualizacja 32 000, validation loss 2.4507743919 |
| Sekwencja / micro-batch na GPU | 2 048 / 6 |
| Akumulacja globalna / na GPU | 40 / 10 micro-stepรณw |
| Effective batch | 491 520 tokenรณw |
| Optymalizator | Muon plus fused AdamW, betas AdamW 0.9/0.95 |
| LR pierwszych dwรณch przebiegรณw | Muon 1e-2 -> 1e-3; AdamW 3e-4 -> 3e-5 |
| LR finalnej kontynuacji | Muon 1e-4; AdamW 3e-6, staลe |
| Warmup / weight decay / grad clip | 200 / 0.01 / 1.0 |
| Precyzja / sprzฤt | BF16 / 4x NVIDIA H100 80GB HBM3 |
Pierwsze dwa przebiegi zakoลczyลy siฤ na aktualizacji 21 959. Pierwotna
kontynuacja odziedziczyลa z R007 zbyt wysokie dla tej architektury dolne LR
1e-3 i 3e-5: pogorszyลy siฤ jednoczeลnie train-eval i peลny validation loss,
a norma parametrรณw spadลa o okoลo 6,5%. Kontynuacjฤ zatrzymano na aktualizacji
34 520. Finalny trening R008 rozpoczฤto ponownie z niezmienionego, zweryfikowanego
checkpointu E2, obniลผajฤ
c oba LR dziesiฤciokrotnie i pozostawiajฤ
c weight decay
bez zmian. Validation loss osiฤ
gnฤ
ล minimum 2.4507743919 przy aktualizacji
32 000, a nastฤpnie przeszedล w plateau i wzrรณsล do 2.4516 przy ostatnim
zapisanym checkpoincie 38 000. Trening zatrzymano celowo przy aktualizacji
38 140; checkpoint 32 000 wybrano przed benchmarkami downstream.
Ewaluacja
Loss treningowy jest szacowany na staลej, tasowanej prรณbie 2 457 600 tokenรณw z caลego splitu treningowego. Kaลผda ewaluacja walidacyjna obejmuje peลny split, czyli 5 238 222 targety. Wybrany checkpoint ma train-eval loss 2.4182 oraz peลny validation loss 2.4507743919.
| Benchmark | Gลรณwna metryka | Wynik | Prรณbki |
|---|---|---|---|
| BLiMP | acc | 78.0358% | 67 000 |
| LAMBADA | acc / perplexity | 31.3216% / 42.0738 | 5 153 |
| HellaSwag | acc_norm | 30.4322% | 10 042 |
| PIQA | acc_norm | 61.6975% | 1 838 |
| SciQ | acc_norm | 64.3000% | 1 000 |
| ARC-Easy | acc_norm | 42.5505% | 2 376 |
| ARC-Challenge | acc_norm | 24.7440% | 1 172 |
Wyniki pochodzฤ
z peลnych splitรณw, zero-shot, w lm-eval 0.4.12,
Transformers 5.15.1 i PyTorch 2.8.0+cu128 na RTX A4500. Tabela model-card uลผywa
BF16, batch 8 i maksymalnego kontekstu 1 024. Tiny-ML WikiText-2 osiฤ
ga byte
perplexity 1.9423491827, 0.9578025823 bits/byte i word perplexity 34.8189798815.
Kanoniczny Open SLM FP32 Intelligence Index wynosi 13.4419562655; peลne wyniki,
prรณbki i protokรณล sฤ
powiฤ
zane z tym samym hashem modelu.
Staลe, nieprzebierane prรณbki generacji z seedem 1337 sฤ zachowane razem z artefaktami ewaluacji. Pokazujฤ rรณwnieลผ typowe ograniczenia maลego modelu bazowego, w tym powtรณrzenia i bลฤdy faktograficzne.
Peลne publiczne podsumowanie znajduje siฤ w benchmarks/english.json,
a prรณbki i skrypt odtwarzajฤ
cy w inference-samples/r008/.
Uลผycie z Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SlayerLab/pollock-mini-lm-125m"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
trust_remote_code=True,
)
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))
trust_remote_code=True jest wymagane, poniewaลผ repozytorium zawiera maลฤ
,
audytowalnฤ
implementacjฤ wลasnego bloku SwiGLU. Przed uลผyciem naleลผy przejrzeฤ
modeling_pollock.py w przypiฤtej rewizji modelu.
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 and a custom byte-level BPE tokenizer. It is a completion model, not a conversational assistant.
R008 replaces the GELU MLP with a parameter-matched SwiGLU block while retaining
R007's tokenizer, corpus, learned absolute positions, context, layer count,
model width, attention configuration, and effective batch. See
training-history/r008.md for the technical record
and CHANGELOG.md for release-to-release changes.
Architecture and tokenizer
| Property | Value |
|---|---|
| Revision / release | r008 / Pollock 1.6 |
| Type | GPT-2-style decoder-only Transformer with SwiGLU |
| Layers / heads / width | 16 / 12 / 768 |
| SwiGLU width | 2,144 |
| Maximum context | 2,048 tokens |
| Vocabulary | 12,288 tokens |
| Total unique trainable parameters | 127,820,544 |
| Tokenizer | byte-level BPE, GPT-2-style pretokenization |
| Special tokens | `< |
The artifact uses the custom PollockForCausalLM Transformers class because
standard GPT2LMHeadModel does not implement this SwiGLU variant. The selected
step-32,000 checkpoint was converted with a maximum absolute native/Transformers
logit difference of 0.0. Its SHA-256 is
25b8cac7d5142c75e1be0b42fa24d980896e6f911e912c883566747a3baa56f0;
the resulting model.safetensors SHA-256 is
1c1002909119b4913841ee29efd44bd86d62d81f2ae27de01602b64d4af0dbec.
Data and training
The model is trained on
SlayerLab/minimal-en-corpus-5b,
pinned to commit 38bebbd. The deterministic loader, four-pass target,
491,520-target effective batch, and validation protocol match the Polish section.
The first two passes ended at update 21,959. The initial continuation inherited
R007-derived floor learning rates that proved too high for this architecture:
fixed train-eval and full-validation loss both degraded while parameter norm
fell by about 6.5%. It was stopped at update 34,520. Final R008 training restarted
from the unchanged, checksum-verified E2 checkpoint with fixed Muon and AdamW
learning rates reduced by 10x to 1e-4 and 3e-6; weight decay remained
1e-2. Full-validation loss reached its minimum of 2.4507743919 at step 32,000
after 15,728,561,562 target presentations. Training was intentionally stopped
at step 38,140 after the metric plateaued; the preselected best-validation
checkpoint was then used for all release benchmarks.
Evaluation
The model-index and Polish table report the complete zero-shot standard suite.
Evaluation used full splits with lm-eval 0.4.12, Transformers 5.15.1,
PyTorch 2.8.0+cu128, and the exact converted model identified above. Tiny-ML
WikiText-2 word perplexity is 34.8189798815. The canonical FP32 Open SLM scores
are HellaSwag 30.4521%, ARC-Easy 42.3401%, ARC-Challenge 24.5734%, PIQA
61.0990%, ArithMark-3 34.6000%, and Intelligence Index 13.4419562655.
The machine-readable summary is available at
benchmarks/english.json, and the fixed samples
plus replay script at inference-samples/r008/.
Usage
Use the Transformers example in the Polish section. Loading requires
trust_remote_code=True; review modeling_pollock.py at the pinned model
revision before use.
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 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 and the dataset card.
Pochodzenie / Attribution
Model i dataset / Model and dataset: Dawid Majewski / SlayerLab. Trening bazuje na / Training is based on karpathy/nanoGPT.
- Downloads last month
- 2,217
Dataset used to train SlayerLab/pollock-mini-lm-125m
Spaces using SlayerLab/pollock-mini-lm-125m 2
Evaluation results
- Full-validation loss on Minimal EN validation (full split)validation set self-reported2.451
- Accuracy on BLiMPself-reported0.780
- Accuracy on LAMBADA OpenAIself-reported0.313
- Perplexity on LAMBADA OpenAIself-reported42.074
- Normalized accuracy on HellaSwagself-reported0.304
- Normalized accuracy on PIQAself-reported0.617
- Normalized accuracy on SciQself-reported0.643
- Normalized accuracy on ARC-Easyself-reported0.426