Bielik on Ollama is the fastest way to run Poland's open-source language model on your own laptop or server — without sending data to the cloud. This step-by-step guide covers installing Ollama, choosing a Bielik version and quantization, setting the context window, calling the API (native and OpenAI-compatible), building a custom Modelfile with a system prompt, and the security basics. Commands follow the Ollama documentation and SpeakLeash model cards, and we tested the key ones locally.
TL;DR
- Install on Linux:
curl -fsSL https://ollama.com/install.sh | sh; on macOS and Windows use the installer from ollama.com. - Run:
ollama run SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M(6.7 GB file, up to 32K context). - Smaller hardware:
SpeakLeash/bielik-4.5b-v3.0-instruct:Q8_0(5.1 GB) orSpeakLeash/bielik-1.5b-v3.0-instruct:Q8_0(1.7 GB). - Ollama uses a 4096-token context by default — set
num_ctxfor longer documents. - The API listens on
127.0.0.1:11434with no authentication — never expose it without a reverse proxy.
What is Bielik and which versions are on Ollama?
Bielik is a family of open language models optimized for Polish, developed by the SpeakLeash foundation (Spichlerz) together with ACK Cyfronet AGH. The models are released under Apache 2.0 (with terms of use described in the model card) on Hugging Face, and ready-to-run GGUF builds are published in the official SpeakLeash profile in the Ollama library. Version 3.0 of the 11B model is multilingual (32 European languages) while still optimized for Polish.
| Ollama model | Variants (tags) | File size | When to choose it |
|---|---|---|---|
SpeakLeash/bielik-11b-v3.0-instruct | Q4_K_M, Q5_K_M, Q6_K, Q8_0, bf16 | 6.7 GB (Q4_K_M), 7.9 GB (Q5_K_M) | Default choice: best Polish quality, up to 32K context, tool calling |
SpeakLeash/bielik-minitron-7B-v3.0-instruct | several quantizations | smaller than 11B | Quality/resources trade-off, tool calling |
SpeakLeash/bielik-4.5b-v3.0-instruct | Q8_0, FP16 | 5.1 GB (Q8_0) | Laptops and servers without a large GPU |
SpeakLeash/bielik-1.5b-v3.0-instruct | Q8_0, FP16 | 1.7 GB (Q8_0) | Tests, simple classification, edge devices |
SpeakLeash/bielik-11b-v2.3-instruct | Q4_K_M, Q5_K_M, Q6_K, Q8_0 | 6.7 GB (Q4_K_M) | When an existing pipeline is built on v2.3 and you want to compare |
Quantization shrinks the model at the cost of some quality. The authors describe Q8_0 as “almost indistinguishable from float16” but slow and resource-hungry; Q4_K_M and Q5_K_M are the usual compromise for a single GPU. They also warn that quantized models may give weaker answers and hallucinate — test on your own data.
Step 1: Install Ollama
On Linux (including headless servers):
curl -fsSL https://ollama.com/install.sh | sh
ollama --version
On macOS and Windows, download the installer from ollama.com/download. After installation the Ollama server runs in the background on http://localhost:11434. To upgrade on Linux, re-run the same script.
Step 2: Pull and run Bielik
# download the model (once)
ollama pull SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M
# chat in the terminal
ollama run SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M
In interactive mode you can change parameters without creating a new model, e.g. /set parameter num_ctx 8192 or /set parameter temperature 0.1. Exit with /bye. Useful commands:
ollama list # downloaded models
ollama ps # loaded models, memory, CPU/GPU split, context
ollama stop SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M # free memory
ollama rm SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M # delete from disk
The PROCESSOR column in ollama ps shows where the model runs: 100% GPU means full acceleration, while e.g. 30%/70% CPU/GPU means the model did not fit in VRAM and some layers run on the CPU. That is what our test of Bielik 1.5B Q8_0 on a laptop with a 2 GB GPU looked like: with an 8192 context the model took 2.1 GB and ran in mixed mode.
Step 3: Set the context window and parameters
According to the Ollama documentation the default context is 4096 tokens. If you paste a long contract, a CV or several documents for RAG, anything beyond the limit is truncated and the model “forgets” the beginning. Three ways to change it:
- server-wide:
OLLAMA_CONTEXT_LENGTH=8192 ollama serve(for the systemd service usesystemctl edit ollama.service), - per session:
/set parameter num_ctx 8192, - per API request:
"options": {"num_ctx": 8192}.
A longer context needs more memory (KV cache). Bielik 11B v3.0 supports up to 32K tokens, but on a small GPU start with 8K. For factual tasks (data extraction, classification, answering from a document) keep the temperature low — the SpeakLeash Modelfiles default to temperature 0.1.
Step 4: Call Bielik from the API
Native Ollama API
curl http://localhost:11434/api/chat -d '{
"model": "SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M",
"messages": [
{"role": "system", "content": "Answer in Polish, concisely."},
{"role": "user", "content": "Wyjaśnij w dwóch zdaniach, czym jest RODO."}
],
"stream": false,
"options": {"num_ctx": 8192, "temperature": 0.1}
}'
Python (ollama library)
pip install ollama
from ollama import chat
response = chat(
model="SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M",
messages=[{"role": "user", "content": "Summarize this paragraph in 3 bullet points: ..."}],
options={"num_ctx": 8192, "temperature": 0.1},
)
print(response.message.content)
OpenAI-compatible API
Ollama exposes /v1/chat/completions, /v1/embeddings and /v1/models, so existing OpenAI SDK code only needs a local base URL. The SDK requires an API key, but Ollama ignores it:
from openai import OpenAI
client = OpenAI(base_url="http://localhost:11434/v1/", api_key="ollama")
resp = client.chat.completions.create(
model="SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M",
messages=[{"role": "user", "content": "List 3 risks of deploying an LLM in a bank."}],
temperature=0.1,
)
print(resp.choices[0].message.content)
The OpenAI-compatible API cannot set the context size per request. If you need it, build your own model variant with num_ctx in a Modelfile (step 5) and call it by name.
Step 5: A custom Modelfile — system prompt and fixed parameters
A Modelfile lets you bake a system prompt and parameters into a model for a specific use case, such as an IT helpdesk assistant or an invoice data extractor:
# file: Modelfile
FROM SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M
PARAMETER num_ctx 8192
PARAMETER temperature 0.1
SYSTEM """Jesteś asystentem działu IT. Odpowiadasz po polsku, krótko i rzeczowo.
Jeśli nie znasz odpowiedzi, mówisz o tym wprost."""
ollama create bielik-it -f Modelfile
ollama show bielik-it --parameters
ollama run bielik-it
The chat template (ChatML with <|im_start|> and <|im_end|> tokens) and stop tokens are inherited from the base model — you do not need to rewrite them. We checked: ollama show for a variant built on Bielik lists the inherited stop tokens plus the new num_ctx and temperature.
Step 6 (optional): Bielik straight from Hugging Face
Ollama can pull a GGUF file directly from Hugging Face — handy when you want a specific quantization from the SpeakLeash repository:
ollama run hf.co/speakleash/Bielik-11B-v3.0-Instruct-GGUF:Q4_K_M
In an air-gapped network, download the .gguf file beforehand and import it with a Modelfile starting with FROM ./Bielik-11B-v3.0-Instruct.Q4_K_M.gguf. SpeakLeash publishes the full TEMPLATE and parameters for such an import in the GGUF model card — copy it from there rather than writing your own.
Step 7: Security and GDPR
- Your data stays with you. With local models Ollama does not send prompts or responses to ollama.com. You can disable cloud features with
OLLAMA_NO_CLOUD=1or in~/.ollama/server.json. - No authentication on the API. By default the server listens on
127.0.0.1only. SettingOLLAMA_HOST=0.0.0.0:11434exposes it to everyone on the network — do this only behind a reverse proxy (e.g. Nginx with authentication) or inside a VPN. - A local model is not full compliance. You still need a legal basis for processing, logging, access control and retention. We cover AI and GDPR in HR processes in AI in recruitment and GDPR.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| Very slow responses | Model does not fit in VRAM (ollama ps shows CPU/GPU) | Lower quantization (Q4_K_M), smaller model (4.5B) or shorter num_ctx |
| Model “loses” the start of a document | Default 4096-token context | Increase num_ctx or OLLAMA_CONTEXT_LENGTH |
| First request takes long | Model loading into memory | Preload it: ollama run <model> ""; control residency with keep_alive / OLLAMA_KEEP_ALIVE |
| HTTP 503 with many users | Request queue full | OLLAMA_NUM_PARALLEL, OLLAMA_MAX_QUEUE; for dozens of concurrent users consider vLLM |
| Odd, made-up answers from a small model | 1.5B has limited knowledge | Use 11B for production; keep the small model for simple classification |
From laptop to production
Ollama is great on a workstation, for prototypes and for small teams. When Bielik has to serve dozens of concurrent requests, connect to a vector database (RAG) and run under monitoring, teams usually move to an inference server such as vLLM. We compare inference engines and hardware requirements in Local LLMs on-premise: Bielik, Llama, DeepSeek, and practical use of Bielik in HR in Bielik AI in developer recruitment.
FAQ
Which command runs Bielik on Ollama?
ollama run SpeakLeash/bielik-11b-v3.0-instruct:Q4_K_M. On first run Ollama downloads the model (about 6.7 GB).
How much memory does Bielik 11B need on Ollama?
The Q4_K_M file is 6.7 GB, plus memory for the context. To run the whole model on a GPU you will in practice need a card with at least 8 GB of VRAM (more for long contexts). Without a GPU it runs on CPU and RAM, but much more slowly.
Is Bielik on Ollama free for commercial use?
The models are released under Apache 2.0 with additional terms of use described in the model card. Read the current terms on the model page before deploying in a company.
Can I use Bielik with code written for OpenAI?
Yes. Set base_url="http://localhost:11434/v1/" and any API key. Set the context size in a Modelfile.
Need someone to deploy Bielik for you?
A prototype on Ollama takes an evening. A production deployment — with RAG, GPU monitoring, access control and GDPR compliance — needs LLM and MLOps engineers. Browse available specialists or tell us which role you are looking for.
See available specialists Looking for a specific specialist?