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)# pip install -U transformers accelerate # 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
- 1,065
Dataset used to train SlayerLab/pollock-mini-lm-125m
Spaces using SlayerLab/pollock-mini-lm-125m 3
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