Instructions to use SlayerLab/pollock-2.0-polishdynaword-150m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SlayerLab/pollock-2.0-polishdynaword-150m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="SlayerLab/pollock-2.0-polishdynaword-150m", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("SlayerLab/pollock-2.0-polishdynaword-150m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SlayerLab/pollock-2.0-polishdynaword-150m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SlayerLab/pollock-2.0-polishdynaword-150m" # 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-2.0-polishdynaword-150m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SlayerLab/pollock-2.0-polishdynaword-150m
- SGLang
How to use SlayerLab/pollock-2.0-polishdynaword-150m 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-2.0-polishdynaword-150m" \ --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-2.0-polishdynaword-150m", "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-2.0-polishdynaword-150m" \ --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-2.0-polishdynaword-150m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SlayerLab/pollock-2.0-polishdynaword-150m with Docker Model Runner:
docker model run hf.co/SlayerLab/pollock-2.0-polishdynaword-150m
Pollock 2.0 PolishDynaword
Polski
O modelu
Pollock 2.0 PolishDynaword to polskojęzyczny model bazowy o 148 673 088 parametrach, rozwijany w ramach Fabryka AI.
Wersja PL DynaWord jest częścią eksperymentu, którego celem jest uzyskanie jak najwyższej jakości modelu na bazie datasetu Polish DynaWord. Model ma całkowicie przebudowaną architekturę względem modeli Pollock 1.x.
Architektura
| Element | Specyfikacja |
|---|---|
| Typ | Decoder-only Transformer |
| Unikalne parametry | 148 673 088 |
| Bloki Transformera | 32 |
| Szerokość modelu i embeddingów | 576 |
| Attention | Przyczynowe grouped-query attention (GQA) |
| Głowy query / key-value | 9 / 3 |
| Wymiar głowy | 64 |
| Wymiary projekcji Q / K / V | 576 / 192 / 192 |
| Pozycjonowanie | RoPE na Q i K, theta 10 000 |
| Warstwa feed-forward | SwiGLU, szerokość 1 664, bramkowanie SiLU |
| Normalizacja | Pre-LayerNorm i końcowy LayerNorm; epsilon 1e-5 |
| Połączenia rezydualne | Po attention i po SwiGLU |
| Głowica wyjściowa | Projekcja 576 → 49 152, współdzieląca wagi z embeddingami |
| Bias w projekcjach i LayerNorm | Wyłączony |
| Dropout | 0 |
| Maksymalny kontekst | 2 048 tokenów |
| Rozmiar słownika | 49 152 tokeny |
Tokenizer
Model korzysta z tokenizera Pollock DynaWord typu byte-level BPE. Słownik obejmuje 49 152 tokeny, w tym:
| Token | ID | Rola |
|---|---|---|
<|endoftext|> |
49149 | EOS; także identyfikator BOS i PAD |
<|im_start|> |
49150 | Zarezerwowany dla późniejszego dostrajania konwersacyjnego |
<|im_end|> |
49151 | Zarezerwowany dla późniejszego dostrajania konwersacyjnego |
Podczas przygotowania danych każdy dokument otrzymuje jeden token EOS. Dosłowne zapisy tokenów kontrolnych w treści dokumentu są kodowane jako zwykły tekst.
Dane i trening
Dane pochodzą z Polish DynaWord Pretraining Mix, przygotowanego z Polish DynaWord. Trening od losowej inicjalizacji przebiega w czterech etapach ze stopniowo zwiększanym kontekstem:
| Etap | Długość kontekstu |
|---|---|
| A512 | 512 tokenów |
| B1024 | 1 024 tokeny |
| C2048 | 2 048 tokenów |
| D2048 | 2 048 tokenów |
Receptura pollock-dynaword-v1 dobiera fragmenty tekstu z zachowaniem granic dokumentów i podziału na zbiory. Muon optymalizuje macierze attention i SwiGLU, a AdamW embeddingi, współdzieloną głowicę oraz parametry normalizacji. Trening wykorzystuje harmonogram cosine i precyzję BF16.
Checkpoint: D2048, krok 1 700 z 1 977. Do tego kroku model przetworzył łącznie 1 818 178 324 tokeny przewidywane podczas treningu, z uwzględnieniem powtórzeń między etapami. Szczegóły etapów i weryfikacji wag znajdują się w historii treningu.
Wyniki benchmarków
| Benchmark | Wynik | Zakres |
|---|---|---|
| MultiBLiMP-PL — accuracy ↑ | 96,58% | 3 160 / 3 272 par |
MultiBLiMP-PL: wybór zdania o wyższej sumie logarytmów prawdopodobieństw, zgodnie z kodem referencyjnym benchmarku. Protokoły, wyniki szczegółowe i skrypty.
Adaptacje promptowe zadań KLEJ — accuracy na pełnych zbiorach testowych:
| Zadanie | N | Zero-shot | Few-shot | Baseline większościowy |
|---|---|---|---|---|
| PolEmo2.0-IN | 722 | 41,27% | 27,42% | 41,55% |
| PolEmo2.0-OUT | 494 | 35,43% | 37,65% | 36,84% |
| CDSC-E | 1 000 | 23,10% | 6,60% | 74,40% |
| PSC | 1 078 | 69,02% | 38,31% | 69,57% |
Few-shot: po jednym przykładzie treningowym na klasę — odpowiednio 4, 4, 3 i 2. Bez dostrajania i obcinania tekstu; baseline zawsze wybiera najczęstszą klasę w zbiorze treningowym. Są to wyniki adaptacji promptowej, nie nadzorowanego benchmarku KLEJ. Macro-F1, prompty i wszystkie predykcje znajdują się w raporcie.
Zastosowania i ograniczenia
Model służy do eksperymentów z generowaniem polskiego tekstu, badania treningu małych modeli i dalszego dostrajania. Może generować błędy faktograficzne, powtórzenia, treści stronnicze lub szkodliwe oraz odtwarzać fragmenty danych. Zastosowania praktyczne wymagają oceny jakości, prywatności i bezpieczeństwa, szczególnie przy decyzjach medycznych, prawnych i finansowych.
English
Overview
Pollock 2.0 PolishDynaword is a Polish base language model with 148,673,088 parameters, developed as part of Fabryka AI.
The PL DynaWord version is part of an experiment aimed at obtaining the highest possible model quality from the Polish DynaWord dataset. Its architecture is completely redesigned compared with the Pollock 1.x models.
Architecture
| Component | Specification |
|---|---|
| Type | Decoder-only Transformer |
| Unique parameters | 148,673,088 |
| Transformer blocks | 32 |
| Model and embedding width | 576 |
| Attention | Causal grouped-query attention (GQA) |
| Query / key-value heads | 9 / 3 |
| Head dimension | 64 |
| Q / K / V projection widths | 576 / 192 / 192 |
| Position encoding | RoPE on Q and K, theta 10,000 |
| Feed-forward layer | SwiGLU, width 1,664, SiLU gating |
| Normalization | Pre-LayerNorm and final LayerNorm; epsilon 1e-5 |
| Residual connections | After attention and after SwiGLU |
| Output head | 576 → 49,152 projection, weight-tied to token embeddings |
| Projection and LayerNorm biases | Disabled |
| Dropout | 0 |
| Maximum context | 2,048 tokens |
| Vocabulary size | 49,152 tokens |
Tokenizer
The Pollock DynaWord byte-level BPE tokenizer has a vocabulary of 49,152 tokens, including:
| Token | ID | Role |
|---|---|---|
<|endoftext|> |
49149 | EOS; also the BOS and PAD identifier |
<|im_start|> |
49150 | Reserved for later conversational fine-tuning |
<|im_end|> |
49151 | Reserved for later conversational fine-tuning |
Data preparation appends one EOS per document. Literal control-token strings within document text are encoded as ordinary text.
Data and training
Training uses the Polish DynaWord Pretraining Mix, derived from Polish DynaWord. Starting from random initialization, training follows four stages with progressively longer context:
| Stage | Context length |
|---|---|
| A512 | 512 tokens |
| B1024 | 1,024 tokens |
| C2048 | 2,048 tokens |
| D2048 | 2,048 tokens |
The pollock-dynaword-v1 recipe selects text windows while preserving document and dataset-split boundaries. Muon optimizes attention and SwiGLU matrices; AdamW handles embeddings, the tied output head and normalization parameters. Training uses cosine learning-rate schedules and BF16 precision.
Checkpoint: D2048, step 1,700 of 1,977. Cumulative training exposure at this step is 1,818,178,324 predicted tokens, including repeated presentations across stages. Stage accounting and weight verification are documented in the training history.
Benchmark results
| Benchmark | Result | Coverage |
|---|---|---|
| MultiBLiMP-PL — accuracy ↑ | 96.58% | 3,160 / 3,272 pairs |
MultiBLiMP-PL: select the sentence with the higher summed log probability, following the benchmark's reference code. Protocols, detailed results and scripts.
Prompted KLEJ adaptations — accuracy on complete test sets:
| Task | N | Zero-shot | Few-shot | Majority baseline |
|---|---|---|---|---|
| PolEmo2.0-IN | 722 | 41.27% | 27.42% | 41.55% |
| PolEmo2.0-OUT | 494 | 35.43% | 37.65% | 36.84% |
| CDSC-E | 1,000 | 23.10% | 6.60% | 74.40% |
| PSC | 1,078 | 69.02% | 38.31% | 69.57% |
Few-shot: one training example per class — 4, 4, 3 and 2, respectively. No fine-tuning or text truncation; the baseline always predicts the training set's most frequent class. These are prompted adaptations, not supervised KLEJ leaderboard results. Macro-F1, prompts and every prediction are available in the report.
Uses and limitations
The model supports Polish text-generation experiments, research on small-model training and further fine-tuning. It can produce factual errors, repetition, biased or harmful text, and memorized training content. Practical applications require quality, privacy and safety assessment, particularly for medical, legal and financial decisions.
Użycie / Usage
Przykład generowania tekstu w Transformers. / Text generation with Transformers.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "SlayerLab/pollock-2.0-polishdynaword-150m"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
model.eval()
inputs = tokenizer("Język polski jest", return_tensors="pt")
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=64,
do_sample=True,
temperature=0.8,
top_k=40,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
trust_remote_code=True uruchamia dołączony kod modelu. Przed użyciem przejrzyj kod i przypnij wybraną rewizję. / trust_remote_code=True executes the packaged model code. Review the code and pin your selected revision before use.
Przykłady generacji / Generation examples
Trzy próbki z zestawu 12 przykładów inferencji. Ustawienia: CPU FP32, temperature=0.8, top_k=40, do 64 nowych tokenów. Poniżej pełne, nieedytowane kontynuacje.
Three samples from the 12-example inference set. Settings: CPU FP32, temperature=0.8, top_k=40, up to 64 new tokens. Full, unedited continuations follow.
01. Opowiadanie / Story
Seed: 20261112; tokeny / tokens: 64; stop: length.
Prompt:
Wieczorem pociąg zatrzymał się na małej stacji. Na peronie
Kontynuacja / Continuation:
nr 2 zatrzymał się pociąg towarowy relacji Warszawa - Kraków i zatrzymał się w niewielkiej odległości. W pociągu nie było nikogo.
W nocy z piątku na sobotę przejeżdżał autobus. Autokar jechał na trasie Łódź - Kraków - Tarnów Płd. z przystanku "Wicher". Wjechali na peron, w
03. Encyklopedia / Encyclopedia
Seed: 20261114; tokeny / tokens: 42; stop: eos.
Prompt:
Wisła jest najdłuższą rzeką Polski. Jej
Kontynuacja / Continuation:
długość wynosi 2814 km, a największa część to około 981 km.
Przebieg
Wisła ma długość ok. 5 km.
Zobacz też
Rzeki Polski
Linki zewnętrzne
Morze w Polsce<|endoftext|>
09. Korespondencja / Correspondence
Seed: 20261120; tokeny / tokens: 64; stop: length.
Prompt:
Szanowni Państwo,
w odpowiedzi na Państwa pismo informujemy, że
Kontynuacja / Continuation:
w związku z zaistniałą sytuacją, iż Agencja Restrukturyzacji i Modernizacji Rolnictwa, do której skierowano wnioski o wypłatę środków finansowych w ramach „Projektu wsparcia rolników w związku z wystąpieniem zagrożeń”, wszczęła postępowanie w sprawie wniosku o wypłatę środków finansowych, którego zakres był ograniczony do podmiotów gospodarczych, których dotyczy wniosek, oraz do Komisji Europejskiej.
Licencja / License
Kod: MIT. Dane treningowe podlegają warunkom poszczególnych źródeł. Użycie i dystrybucja wag wymagają uwzględnienia tych praw oraz obowiązujących przepisów. Szczegóły: licencje i atrybucja.
Code: MIT. Training data is governed by source-specific terms. Use and distribution of the weights require consideration of those rights and applicable law. See the license notice and attribution.
- Downloads last month
- 241
Dataset used to train SlayerLab/pollock-2.0-polishdynaword-150m
Evaluation results
- Accuracy — original-code summed log probability (%) on MultiBLiMP-PLReproducible MultiBLiMP-PL evaluation96.580
- Accuracy — token-normalized diagnostic (%) on MultiBLiMP-PLReproducible MultiBLiMP-PL evaluation93.340
- Accuracy — byte-normalized diagnostic (%) on MultiBLiMP-PLReproducible MultiBLiMP-PL evaluation96.150
- Accuracy (0-shot, %) on PolEmo2.0-INtest set Prompted KLEJ adaptation — no fine-tuning41.270
- Macro-F1 (0-shot, %) on PolEmo2.0-INtest set Prompted KLEJ adaptation — no fine-tuning16.330
- Accuracy (4-shot, %) on PolEmo2.0-INtest set Prompted KLEJ adaptation — no fine-tuning27.420
- Macro-F1 (4-shot, %) on PolEmo2.0-INtest set Prompted KLEJ adaptation — no fine-tuning23.320
- Accuracy (0-shot, %) on PolEmo2.0-OUTtest set Prompted KLEJ adaptation — no fine-tuning35.430