What you need before you start
To run apertus locally you need three things: the weights, a runtime that can load them, and enough memory to hold the model plus its working cache. The first two are free. The third is what decides whether the project takes ten minutes or a weekend.
The quick rule for memory: parameter count times bytes per weight. Apertus comes in a smaller and a larger size, roughly 8 billion and 70 billion parameters, so the arithmetic below applies to both.
| Size | 16-bit | 8-bit | 4-bit |
|---|---|---|---|
| 8B | about 16 GB | about 8 GB | about 4 to 5 GB |
| 70B | about 140 GB | about 70 GB | about 35 to 40 GB |
Add a few more gigabytes for the context cache, and more again for long prompts. The 8B model in 4-bit fits on a gaming GPU or an Apple Silicon laptop with 16 GB of unified memory. The 70B model needs a workstation with large VRAM, several GPUs, or a Mac with a lot of unified memory, and it will still be slow.
Option 1: Ollama or llama.cpp
The easiest local route is a runtime that handles quantized files for you. Ollama wraps llama.cpp and gives you a one-line install and a local server. Check the Ollama model library for an Apertus entry; if there is none, you can import a GGUF file yourself with a short Modelfile.
# install Ollama from ollama.com, then:
ollama pull <apertus-tag-from-the-library>
ollama run <apertus-tag-from-the-library>
# if you downloaded a GGUF file instead:
cat > Modelfile <<'EOT'
FROM ./apertus-8b-instruct-Q4_K_M.gguf
EOT
ollama create apertus-local -f Modelfile
ollama run apertus-localThe tag and the file name above are placeholders. Take the real names from the model page you download from, and pick an instruct or chat variant, not a base model, if you want a model that follows chat instructions.
llama.cpp is the alternative if you want more control. Its llama-server binary loads a GGUF file and exposes an OpenAI-style endpoint on a local port, with flags for GPU layers, context size and threads.
Option 2: Hugging Face Transformers
If you work in Python and want the original weights, load them with the Transformers library. This is the most flexible path and the least efficient for serving more than one user at a time.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
name = "<apertus-instruct-repo-id>" # copy it from the model page
tok = AutoTokenizer.from_pretrained(name)
model = AutoModelForCausalLM.from_pretrained(
name, torch_dtype=torch.bfloat16, device_map="auto"
)
msgs = [{"role": "user", "content": "Explain KV cache in two sentences."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=200)
print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))For several users at once, put the weights behind a serving engine such as vLLM instead. It batches requests and also exposes an OpenAI-compatible server, at the cost of needing a proper GPU and more setup.
Picking a quantization and a context size
Quantization trades a little quality for a lot of memory. A 4-bit file such as Q4_K_M is the usual starting point: it cuts memory to about a quarter of 16-bit and, for chat, the loss is often hard to notice. If you have spare memory, try 8-bit and compare the answers on a few prompts of your own. Going below 4-bit saves more space but quality starts to slip, especially in languages other than English, which is a real concern for a multilingual model.
Context size is the second dial. Every extra token you allow needs cache memory, so setting a 32,000 token window on a small GPU can fail even when the weights fit. Start with 4,096 or 8,192, confirm that it runs, then raise it in steps. In Ollama you can set num_ctx in the Modelfile; in llama.cpp it is the -c flag.
Speed depends on where the layers live. Every layer that spills over to system RAM slows generation, so if the output crawls, lower the context or pick a smaller file before you buy hardware.
Common problems and how to fix them
- Out of memory on load. Pick a smaller quantization or the smaller model, or lower the context size. The cache grows with every token you allow.
- Very slow output. The model is probably running on the CPU. Check that your runtime sees the GPU and that enough layers are offloaded.
- Garbled or repetitive answers. Use the chat template that matches the model, and an instruct variant. A wrong template is the most common cause.
- Answers cut off. Raise the output limit in your runtime. Local defaults are often small.
- Refusals you did not expect. The model keeps whatever safety behaviour its makers trained in. Local does not mean unfiltered.
That last point matters if your project is fiction, roleplay or a companion app for adults. A local copy of a safety-tuned model still declines some requests, and you would need a different model to change that.
What local really costs
Local feels free until you count the pieces. Hardware is the obvious one. Power and time are the hidden ones: someone has to update the runtime, re-download weights when a better checkpoint appears and debug driver problems. A machine that runs 24 hours a day also idles most of the time for a hobby project.
A hosted API turns that into a per-token price. Here, input costs $0.15 and output costs $0.50 per 1M tokens. A chat turn with 2,000 input tokens and 500 output tokens costs 2,000 x $0.15 / 1M = $0.0003 for input plus 500 x $0.50 / 1M = $0.00025 for output, so $0.00055 in total. That is about $0.55 per 1,000 turns. At that rate the minimum $20 top-up covers over 36,000 such turns.
Local wins when you have idle hardware you already own, strict offline needs, or constant heavy traffic. The API wins when your usage is small, bursty or you do not want to maintain anything.
Using a hosted endpoint instead
This site offers a hosted, OpenAI-compatible chat API. It does not serve the Apertus weights: it runs one open-weight model from an independent provider, tuned to answer without content refusals for lawful adult use, and it is not the official API of any model maker. Sexual content involving minors is never permitted. Read the Apertus model page if you want to know how it relates to Apertus.
If your goal is "a chat model I can call from my app", you can skip the hardware step entirely. Any OpenAI SDK works once you change the base URL:
curl https://api.apertus.cc/v1/chat/completions \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "uncensored", "messages": [{"role": "user", "content": "Hello"}]}'The context window is 100,000 tokens, streaming and tool calling work, and failed or refused requests are not charged. Payment is in crypto (USDT on TRC20 or USDC on Base), from $20 to $500. New users can claim $0.50 of trial credit with one click on the API key page. See the docs for the full request reference and the pricing page for bonuses on larger top-ups.
Which route should you pick
Run Apertus locally if you want to study the model, work offline, or keep every byte on your own machine. Start with the 8B model in 4-bit, test quality on your own prompts, and only then think about hardware for the larger one.
Call a hosted endpoint if you are building an app and want a predictable bill with no machines to look after. Many developers do both: a small local model for experiments, and an API for anything users touch. For a broader view of the hosted side, see the Apertus LLM API page.

