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
rename -> GoLLeM-110M-PL
Browse files
README.md
CHANGED
|
@@ -12,7 +12,7 @@ tags:
|
|
| 12 |
- amd-rocm
|
| 13 |
---
|
| 14 |
|
| 15 |
-
#
|
| 16 |
|
| 17 |
Bazowy model językowy (**pretraining, model bazowy — NIE chatbot**) dla języka polskiego.
|
| 18 |
**110M** parametrów, architektura GPT-2, wytrenowany **od zera** na **konsumenckiej karcie AMD Radeon RX 7900 XTX** (ROCm/WSL2, Windows) — bez NVIDII, bez chmury.
|
|
@@ -36,7 +36,7 @@ Bazowy model językowy (**pretraining, model bazowy — NIE chatbot**) dla języ
|
|
| 36 |
```python
|
| 37 |
import torch
|
| 38 |
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
|
| 39 |
-
m = AutoModelForCausalLM.from_pretrained("Maggio33/
|
| 40 |
tok = PreTrainedTokenizerFast(tokenizer_file="tokenizer.json")
|
| 41 |
ids = tok("Polska to kraj położony w", return_tensors="pt").input_ids
|
| 42 |
ids = torch.cat([torch.tensor([[0]]), ids], 1) # BOS = <|endoftext|>=0
|
|
|
|
| 12 |
- amd-rocm
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# GoLLeM-110M-PL (base)
|
| 16 |
|
| 17 |
Bazowy model językowy (**pretraining, model bazowy — NIE chatbot**) dla języka polskiego.
|
| 18 |
**110M** parametrów, architektura GPT-2, wytrenowany **od zera** na **konsumenckiej karcie AMD Radeon RX 7900 XTX** (ROCm/WSL2, Windows) — bez NVIDII, bez chmury.
|
|
|
|
| 36 |
```python
|
| 37 |
import torch
|
| 38 |
from transformers import AutoModelForCausalLM, PreTrainedTokenizerFast
|
| 39 |
+
m = AutoModelForCausalLM.from_pretrained("Maggio33/GoLLeM-110M-PL").eval()
|
| 40 |
tok = PreTrainedTokenizerFast(tokenizer_file="tokenizer.json")
|
| 41 |
ids = tok("Polska to kraj położony w", return_tensors="pt").input_ids
|
| 42 |
ids = torch.cat([torch.tensor([[0]]), ids], 1) # BOS = <|endoftext|>=0
|