Maggio33 commited on
Commit
3ded1d9
·
verified ·
1 Parent(s): c646e07

card: pelna struktura (styl Pollock) + benchmarki 2x2 PL/EN (lm-eval 0.4.12, eval_pl_bench)

Browse files
Files changed (1) hide show
  1. README.md +119 -7
README.md CHANGED
@@ -2,19 +2,131 @@
2
  language:
3
  - pl
4
  license: cc-by-sa-4.0
 
 
5
  tags:
6
  - gpt2
7
  - gollem
8
  - polish
9
  - sft
10
- private: true
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
 
12
  # GoLLeM-110M-PL-SFT-merged
13
 
14
- SFT (instruction-tuned) wersja GoLLeM-110M-PL na zbiorze grounded-QA (26 194 par, 4 autorow, CC-BY-SA-inherit).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- - **Base:** GoLLeM-110M-PL (ckpt_00060733)
17
- - **Trening:** 3 epoki, lr 2e-5, wd 0.1, B16/accum4 (efektywny 64), ~3m40s na ROCm 7900 XTX
18
- - **Eval:** forma 15/15 (0 kontynuacji, 0 boilerplate), fakty = sufit 110M (przewidziane)
19
- - **Gate:** PII 0, regurgitacja 0 (sklada ze szablonow, nie recytuje)
20
- - **Wywolanie:** GPT2LMHeadModel, vocab 32000, n_positions 512, 12L/12H/768d
 
2
  language:
3
  - pl
4
  license: cc-by-sa-4.0
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
  tags:
8
  - gpt2
9
  - gollem
10
  - polish
11
  - sft
12
+ - from-scratch
13
+ - amd-rocm
14
+ base_model: SlayerLab/goLLeM-110M-PL
15
+ model-index:
16
+ - name: goLLeM-110M-PL-SFT-merged
17
+ results:
18
+ - task: {type: text-classification, name: Polish topic classification}
19
+ dataset: {type: sdadas/8tags, name: 8Tags, split: test}
20
+ metrics:
21
+ - {type: accuracy, value: 0.110247, name: Accuracy}
22
+ - {type: f1, value: 0.034779, name: Macro-F1}
23
+ - task: {type: text-classification, name: Polish sentiment (in-domain)}
24
+ dataset: {type: allegro/klej-polemo2-in, name: PolEmo2-IN, split: test}
25
+ metrics:
26
+ - {type: accuracy, value: 0.423823, name: Accuracy}
27
+ - {type: f1, value: 0.242625, name: Macro-F1}
28
+ - task: {type: text-classification, name: Polish sentiment (out-of-domain)}
29
+ dataset: {type: allegro/klej-polemo2-out, name: PolEmo2-OUT, split: test}
30
+ metrics:
31
+ - {type: accuracy, value: 0.356275, name: Accuracy}
32
+ - {type: f1, value: 0.169887, name: Macro-F1}
33
+ - task: {type: text-generation, name: Zero-shot evaluation}
34
+ dataset: {type: blimp, name: BLiMP, split: train}
35
+ metrics: [{type: acc, value: 0.5404}]
36
+ - task: {type: text-generation, name: Zero-shot evaluation}
37
+ dataset: {type: EleutherAI/lambada_openai, name: LAMBADA OpenAI, split: test}
38
+ metrics: [{type: acc, value: 0.0223}, {type: perplexity, value: 55056.11}]
39
+ - task: {type: text-generation, name: Zero-shot evaluation}
40
+ dataset: {type: hellaswag, name: HellaSwag, split: validation}
41
+ metrics: [{type: acc_norm, value: 0.2817}]
42
+ - task: {type: text-generation, name: Zero-shot evaluation}
43
+ dataset: {type: piqa, name: PIQA, split: validation}
44
+ metrics: [{type: acc_norm, value: 0.5065}]
45
+ - task: {type: text-generation, name: Zero-shot evaluation}
46
+ dataset: {type: sciq, name: SciQ, split: test}
47
+ metrics: [{type: acc_norm, value: 0.6000}]
48
+ - task: {type: text-generation, name: Zero-shot evaluation}
49
+ dataset: {type: allenai/ai2_arc, config: ARC-Easy, name: ARC-Easy, split: test}
50
+ metrics: [{type: acc_norm, value: 0.2597}]
51
+ - task: {type: text-generation, name: Zero-shot evaluation}
52
+ dataset: {type: allenai/ai2_arc, config: ARC-Challenge, name: ARC-Challenge, split: test}
53
+ metrics: [{type: acc_norm, value: 0.2270}]
54
  ---
55
+
56
  # GoLLeM-110M-PL-SFT-merged
57
 
58
+ > **Wydanie eksperymentalne / Experimental release.** Model nie jest przeznaczony do zastosowań produkcyjnych ani wysokiego ryzyka.
59
+
60
+ Instruction-tuned (SFT) wersja **GoLLeM-110M-PL** — małego, polskojęzycznego modelu bazowego typu decoder-only, wytrenowanego **od zera** na konsumenckiej karcie **AMD Radeon RX 7900 XTX** (ROCm/WSL2, Windows), bez NVIDII i bez chmury. Implementacja GPT-2 (nanoGPT-style) + własny polski tokenizer BPE. Wersja `merged` = wagi SFT scalone do formatu `GPT2LMHeadModel` (ładowalne standardowym `transformers`).
61
+
62
+ ## Architektura i tokenizer
63
+
64
+ | Właściwość | Wartość |
65
+ |---|---:|
66
+ | Typ | GPT-2-style decoder-only Transformer |
67
+ | Warstwy / głowy / d_model | 12 / 12 / 768 |
68
+ | Maksymalny kontekst | 512 tokenów |
69
+ | Słownik | 32 000 (polski byte-level BPE, dynaword-32k) |
70
+ | Parametry | ~110M (weight-tied embeddings) |
71
+ | Token specjalny | `<|endoftext|>` = 0 |
72
+ | Format | `GPT2LMHeadModel`, safetensors |
73
+
74
+ ## Baza, dane i trening
75
+
76
+ - **Model bazowy:** [SlayerLab/goLLeM-110M-PL](https://huggingface.co/SlayerLab/goLLeM-110M-PL) (ckpt_00060733), pretrenowany od zera na korpusie **dynaword-expansion** (HPLT v3.0 `pol_Latn`, ~1,35 mld tokenów, 1 epoka), PII-scrubbed.
77
+ - **SFT:** grounded-QA, **26 194 par** (4 autorów, CC-BY-SA-inherit); 3 epoki, lr 2e-5, weight decay 0.1, batch 16 × accum 4 (efektywny 64), ~3 min 40 s na RX 7900 XTX (ROCm).
78
+ - **Gate treningowy:** PII 0, regurgitacja 0 (model składa ze wzorców, nie recytuje danych); forma odpowiedzi 15/15 (0 kontynuacji, 0 boilerplate).
79
+
80
+ ## Ewaluacja
81
+
82
+ Zero-shot, pełne splity. **Bateria EN:** `lm-evaluation-harness` 0.4.12 (te same taski i wersja co karta [Pollock](https://huggingface.co/SlayerLab/pollock-mini-lm-125m)). **Bateria PL:** port protokołu dmpod (`eval_pl_bench`, mean-loglikelihood-per-token, length-normalized, accuracy + macro-F1). Pomiar: SlayerLab (Latarnik/Hart), 2026-08-27, RX 7900 XTX.
83
+
84
+ **Bateria PL** (random: 8Tags .125, PolEmo2 .25):
85
+
86
+ | Benchmark | Accuracy | Macro-F1 | Próbki |
87
+ |---|---:|---:|---:|
88
+ | 8Tags | 0.1102 | 0.0348 | 4 372 |
89
+ | PolEmo2-IN | 0.4238 | 0.2426 | 722 |
90
+ | PolEmo2-OUT | 0.3563 | 0.1699 | 494 |
91
+
92
+ **Bateria EN** (random: BLiMP/PIQA .5, reszta ~.25):
93
+
94
+ | Benchmark | Metryka | Wynik |
95
+ |---|---|---:|
96
+ | BLiMP | acc | 0.5404 |
97
+ | LAMBADA OpenAI | acc | 0.0223 (ppl 55056) |
98
+ | HellaSwag | acc_norm | 0.2817 |
99
+ | PIQA | acc_norm | 0.5065 |
100
+ | SciQ | acc_norm | 0.6000 |
101
+ | ARC-Easy | acc_norm | 0.2597 |
102
+ | ARC-Challenge | acc_norm | 0.2270 |
103
+
104
+ **Interpretacja (uczciwie):** to model **polski**. Na baterii EN wypada ~losowo (LAMBADA ppl 55056 = nie przewiduje angielskiego następnego słowa) — angielskie benchmarki mierzą tu transfer międzyjęzykowy, nie kompetencję. Sygnał jest tam, gdzie powinien: PolEmo2-IN 0.424 (nad losowym 0.25). Uwaga porównawcza: względem bazy GoLLeM-110M-PL SFT nie podniósł zdolności zero-shot klasyfikacji (8Tags pozostaje ~losowo; wzrost accuracy PolEmo2 idzie w parze ze spadkiem macro-F1 = przesunięcie ku klasie większościowej). Model najlepiej traktować jako **completion/instruction-following bazowej skali**, nie jako klasyfikator. Confound porównań z modelami innej klasy: różny słownik i długość kontekstu.
105
+
106
+ ## Użycie
107
+
108
+ ```python
109
+ import torch
110
+ from transformers import AutoModelForCausalLM, AutoTokenizer
111
+
112
+ model_id = "SlayerLab/goLLeM-110M-PL-SFT-merged"
113
+ tok = AutoTokenizer.from_pretrained(model_id)
114
+ model = AutoModelForCausalLM.from_pretrained(model_id).eval()
115
+
116
+ ids = tok("Polska to kraj położony w", return_tensors="pt").input_ids
117
+ out = model.generate(ids, max_new_tokens=80, do_sample=True, temperature=0.8,
118
+ top_k=40, repetition_penalty=1.3, pad_token_id=0)
119
+ print(tok.decode(out[0], skip_special_tokens=True))
120
+ ```
121
+
122
+ ## Ograniczenia i odpowiedzialne użycie
123
+
124
+ - Mały model (110M) — generuje **pewnie brzmiące nieprawdy** i potrafi dryfować z tematu; wiedza faktograficzna jest ograniczona skalą.
125
+ - Trenowany i oceniany głównie po polsku; po angielsku ~losowo.
126
+ - Kontekst 512 tokenów, brak filtrów bezpieczeństwa na wyjściu.
127
+ - **PII:** może generować prawdopodobnie brzmiące imiona/adresy = **konfabulacje**, nie dane realnych osób; kontaktowe PII (telefon/e-mail/PESEL) było scrubowane w korpusie (model zwraca tagi `[Telefon]`/`[PII]`). Weryfikacja wyjścia po stronie użytkownika.
128
+
129
+ ## Licencja i pochodzenie
130
 
131
+ - Licencja: **CC-BY-SA-4.0** (dziedziczona po danych SFT grounded-QA, CC-BY-SA-inherit).
132
+ - Model i trening: **Arkadiusz Słota / SlayerLab**. Architektura oparta na GPT-2 / nanoGPT.