Text Generation
Transformers
Safetensors
Polish
gpt2
polish
base-model
from-scratch
amd-rocm
text-generation-inference
Instructions to use Maggio33/GoLLeM-110M-PL with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maggio33/GoLLeM-110M-PL with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Maggio33/GoLLeM-110M-PL")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Maggio33/GoLLeM-110M-PL") model = AutoModelForCausalLM.from_pretrained("Maggio33/GoLLeM-110M-PL", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Maggio33/GoLLeM-110M-PL with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Maggio33/GoLLeM-110M-PL" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Maggio33/GoLLeM-110M-PL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Maggio33/GoLLeM-110M-PL
- SGLang
How to use Maggio33/GoLLeM-110M-PL 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 "Maggio33/GoLLeM-110M-PL" \ --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": "Maggio33/GoLLeM-110M-PL", "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 "Maggio33/GoLLeM-110M-PL" \ --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": "Maggio33/GoLLeM-110M-PL", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Maggio33/GoLLeM-110M-PL with Docker Model Runner:
docker model run hf.co/Maggio33/GoLLeM-110M-PL
File size: 3,249 Bytes
7037807 8749fd4 7037807 8749fd4 7037807 c139564 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
license: apache-2.0
language:
- pl
library_name: transformers
pipeline_tag: text-generation
tags:
- gpt2
- polish
- base-model
- from-scratch
- amd-rocm
---
# GoLLeM-110M-PL (base)
Bazowy model językowy (**pretraining, model bazowy — NIE chatbot**) dla języka polskiego.
**110M** parametrów, architektura GPT-2, wytrenowany **od zera** na **konsumenckiej karcie AMD Radeon RX 7900 XTX** (ROCm/WSL2, Windows) — bez NVIDII, bez chmury.
> To model **completion**: dostaje początek tekstu i kontynuuje najbardziej prawdopodobny ciąg.
> **Nie odpowiada na pytania jak asystent** — do rozmowy/trzymania tematu wymaga osobnego fine-tuningu instrukcyjnego.
## Specyfikacja
| | |
|---|---|
| Parametry | 110,025,216 (110M), weight-tied embeddings |
| Architektura | GPT-2 (decoder-only): 12 warstw / 12 głów / d_model 768 |
| Kontekst | 512 tokenów |
| Tokenizer | polski BPE (dynaword-32k), słownik 32 000, `<|endoftext|>`=0 |
| Dane | polski korpus dynaword-expansion (HPLT v3.0 `pol_Latn`), ~1,35 mld tokenów, 1 epoka |
| Trening | od zera, bf16, AdamW, cosine LR + warmup, weight decay 0.1 |
| Sprzęt | 1× AMD Radeon RX 7900 XTX 24GB (RDNA3/gfx1100), ROCm/WSL2, Windows |
| Loss (końcowy) | ~3.53 (perplexity ~34) — średnia training-loss z ostatnich ~30 kroków (per-krok szum 3.3-3.8) |
## Użycie
```python
import torch
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
m = AutoModelForCausalLM.from_pretrained("Maggio33/GoLLeM-110M-PL").eval()
tok = PreTrainedTokenizerFast(tokenizer_file="tokenizer.json")
ids = tok("Polska to kraj położony w", return_tensors="pt").input_ids
ids = torch.cat([torch.tensor([[0]]), ids], 1) # BOS = <|endoftext|>=0
out = m.generate(ids, max_new_tokens=80, do_sample=True, temperature=0.8,
top_k=40, repetition_penalty=1.3, pad_token_id=0)
print(tok.decode(out[0].tolist()[1:], skip_special_tokens=True))
```
## Dane treningowe i licencja
- Korpus: **dynaword-expansion** oparty na **HPLT v3.0** (`pol_Latn`), zadeklarowany **CC0-1.0** (byte-verified per-shard), PII-scrubbed.
- **Uczciwy caveat:** HPLT to web-crawl — CC0 dotyczy pakowania/dedykacji maintainera + przeszedł web-review i mitygacje (length-cap usuwający książki, wykluczone domeny wiki/adult/boilerplate), ale **nie jest gwarantowanie "release-clean"** (tekst web może zawierać treści in-copyright). To standardowa podstawa dla modeli trenowanych na korpusach web.
- Licencja modelu: **Apache-2.0**.
## Ograniczenia
- Mały model bazowy (110M) — generuje **pewnie brzmiące nieprawdy** i potrafi dryfować z tematu. To cecha modelu bazowego tej skali, nie błąd.
- Brak fine-tuningu instrukcyjnego → nie jest chatbotem.
- Kontekst 512 tokenów. Brak filtrów bezpieczeństwa na wyjściu.
- **Dane osobowe / PII:** może generować prawdopodobnie brzmiące imiona/nazwiska/adresy = KONFABULACJE (nie dane konkretnych, identyfikowalnych osób). Kontaktowe PII (telefon/e-mail/PESEL) było scrubowane w korpusie -> model zwraca tagi [Telefon]/[PII] zamiast realnych danych (zweryfikowane empirycznie). Brak filtra output-safety — weryfikacja wyjścia po stronie użytkownika.
## Autor
Arkadiusz Słota
|