A tall outlined block on the left and a tinted zone holding a smaller purple-topped block on the right, suggesting two places to run the same model.

Two ways to run GLM in Europe

Where can I host GLM models in Europe? Teams ask this when a coding agent needs a strong open model and their customers want processing in Europe.

GLM is a family of models from Z.ai. GLM-5.2 is published under the MIT licence, so you may download its weights and run them yourself. The weights are the files that hold everything the model learned.

That gives you two routes. You run the weights on GPUs you rent or own. Or you send requests to a provider that already runs them. The sections below put numbers on both.

How GLM-5.1, GLM-5.2 and GLM-5.2 Instant differ

GLM-5.2 is a mixture-of-experts (MoE) model: each token runs through only part of the network. It has 744 billion parameters in total, and 40 billion of them work on each token.

Z.ai describes GLM-5.2 as a substantial leap over GLM-5.1 on long, multi-step tasks. It is the first release where Z.ai says that quality holds across a 1M-token context window. The context window is the amount of text the model can read in one request.

On SWE-bench Pro, a test of fixing real software issues, Z.ai reports 62.1 for GLM-5.2 and 58.4 for GLM-5.1. These are the vendor's own numbers.

GLM-5.2 Instant is GLM-5.2 without a reasoning phase, at the same price. With reasoning on, the model first writes out its working steps, called the reasoning trace, and then the answer. Some coding tools cannot pass request settings. For them, the Instant model ID turns reasoning off with no code change.

GLM-5.3 came out on 14 August 2026. Z.ai built it on the same base model as GLM-5.2: the same pretrained starting point, which Z.ai then trained further for GLM-5.3. Hugging Face lists it as the newer version of GLM-5.2. Its reasoning is on by default. If you switch it off, the working steps still appear, inside the answer text. Your code would then parse them as part of the answer. So leave reasoning on for GLM-5.3 and set max_tokens high enough for steps and answer.

In the table, time to first token is the wait before the first word of the answer arrives.

ModelModel IDReasoningPrice per 1M tokens: input / cached input / outputMedian time to first tokenOutput speed
GLM-5.2z-ai/glm-5.2On by default$1.50 / $0.38 / $4.50398 ms55 tokens/s
GLM-5.2 Instantz-ai/glm-5.2-instantOff$1.50 / $0.38 / $4.50409 ms53 tokens/s
GLM-5.3z-ai/glm-5.3On by default$1.40 / $0.26 / $4.40295 ms77 tokens/s

Prices come from our model pages, read on 23 October 2026. Speeds are 7-day medians of short requests in our own status checks, measured the same day. Our status page shows live availability.

Self-hosting GLM-5.2: how much GPU memory it needs

Only 40 billion parameters work on each token. The server still has to hold all 744 billion in GPU memory, because the model may route the next token to any part of it.

The weight files show the size. Z.ai publishes GLM-5.2 in BF16, which stores each number in 16 bits, and in FP8, which uses 8 bits. On Hugging Face, the BF16 files take 1,507 GB and the FP8 files 756 GB (read on 23 October 2026).

Calculated example, weights only:

FP8 weights of GLM-5.2:        756 GB
8 x H100 at 80 GB each:        640 GB   -> too small
8 x H200 at 141 GB each:     1,128 GB   -> fits, 372 GB left

An eight-GPU H100 server holds 640 GB, so the FP8 weights do not fit. The vLLM guide for this model family serves FP8 on eight H200 GPUs with 141 GB each. That server has 1,128 GB, and 372 GB stay free after the weights.

Bar chart in gigabytes: an eight-GPU H100 server holds 640 GB, less than the 756 GB of GLM-5.2's FP8 weight files. An eight-GPU H200 server holds 1,128 GB, which leaves 372 GB after the weights.
GLM-5.2's FP8 weight files need more memory than one eight-GPU H100 server has, while an eight-GPU H200 server holds them with 372 GB to spare (weights only, read 23 October 2026).

The free memory holds the KV cache (key-value cache), the record the model keeps of every token it has read. Every running request needs its own share, and a longer prompt needs a larger one. The 372 GB are the budget for all requests running at once.

vLLM is an open-source engine for serving models. Its guide gives the following command for GLM-5.1, the release before GLM-5.2. For GLM-5.2, the model card asks for vLLM 0.23.0 or later. The model card points to a separate GLM-5.2 recipe, so do not only swap the model name.

vllm serve zai-org/GLM-5.1-FP8 \
     --tensor-parallel-size 8 \
     --speculative-config.method mtp \
     --speculative-config.num_speculative_tokens 3 \
     --tool-call-parser glm47 \
     --reasoning-parser glm45 \
     --enable-auto-tool-choice \
     --chat-template-content-format=string \
     --served-model-name glm-5.1-fp8

The flag --tensor-parallel-size 8 splits each layer of the model across the eight GPUs. The two speculative flags turn on speculative decoding: the model guesses the next three tokens, then checks all three in one step. Every accepted guess saves a separate step, so output comes faster. The two parser flags read GLM's tool calls and reasoning out of the generated text. The chat-template flag sets how message content is passed to the model.

This example counts weights only. It does not price the server, and it does not show how many users one server can serve.

Calling GLM on our serverless API

Lyceum is a sovereign European AI inference provider for open-source models: the company and its GPUs are in Europe. Our serverless models run in Paris and Finland. We don't keep your prompts or outputs, and we never use them for training.

Serverless means we run the GPUs and you pay for tokens. Our serverless inference is billed per token, with no base fee. You call GLM with the OpenAI SDK. Change the base URL and the model ID, and keep the rest of your code.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["LYCEUM_API_KEY"],
    base_url="https://api.lyceum.technology/openai/v1",
)

response = client.chat.completions.create(
    model="z-ai/glm-5.2",
    messages=[{"role": "user", "content": "Summarise this diff in two lines."}],
    reasoning_effort="none",
)
print(response.choices[0].message.content)

The line reasoning_effort="none" switches reasoning off for one request. Calling z-ai/glm-5.2-instant does the same for every request. When reasoning is on, the trace is billed as output tokens. Set max_tokens high enough for the trace and the answer.

What a coding-agent session costs per token

Prompt caching means that repeated text is billed at a lower price. When a request starts with exactly the same text as a recent one, we bill that part at the cached input price. A cache hit is best effort: it needs the repeated text to still be in GPU memory.

Take a hypothetical coding agent. Each turn sends 50,000 input tokens. Of these, 45,000 repeat from the turn before and 5,000 are new. Each answer has 1,500 tokens, reasoning trace included. A session has 40 turns.

cost per turn = new input x input price + repeated input x cached price + output x output price
(prices are per 1M tokens)

GLM-5.2, cache hit:   5,000 x $1.50 + 45,000 x $0.38 + 1,500 x $4.50 = $0.0314
GLM-5.2, cache miss: 50,000 x $1.50 +              0 + 1,500 x $4.50 = $0.0818
GLM-5.3, cache hit:   5,000 x $1.40 + 45,000 x $0.26 + 1,500 x $4.40 = $0.0253

repeated part of a GLM-5.2 hit: 45,000 x $0.38 / 1,000,000 = $0.0171
Calculated example, list prices of 23 October 2026Per turn40-turn session
GLM-5.2, cache hit$0.0314$1.25
GLM-5.2, cache miss$0.0818$3.27
GLM-5.3, cache hit$0.0253$1.01

A missed cache costs 2.6 times as much per turn. With a hit, the 45,000 repeated tokens are still the largest cost: $0.0171 of the $0.0314, as the last line of the code block shows. So keep the start of each prompt stable. Put the system prompt and tool definitions first, and add new turns at the end.

Calculated example, stacked bars of one coding-agent turn by token type: GLM-5.2 costs $0.031 with a cache hit and $0.082 with a miss, GLM-5.3 costs $0.025 with a hit. The cached-input parts are highlighted.
In our calculated example, one GLM-5.2 agent turn costs $0.031 when its repeated tokens hit the cache and $0.082 when they miss, at list prices of 23 October 2026.

The token counts are invented for the example. It does not show speed under load, or how often your own prompts find the cache.

When to self-host and when to call the API

Self-hosting fits when you can keep an eight-GPU server busy all day. It also fits when you must control the serving engine yourself. To decide, compare what the server costs you per month with your monthly API bill at the same traffic.

Per-token billing fits traffic that comes and goes. The bill follows your traffic, so quiet hours cost nothing. Between the two sit dedicated endpoints: GPUs we reserve for you alone and run for you. You pay for the reserved capacity, not per token, and you manage no servers. Our own rule is to pay per token while traffic varies, then reserve GPUs once it steadies.

For a new coding agent, we would start on GLM-5.3. It is newer, cheaper per token and faster in our checks.

To try GLM-5.2, open its model page, copy the first request and run it with your API key.

Sources

  1. huggingface.co
  2. huggingface.co
  3. images.nvidia.com
  4. docs.vllm.ai
  5. recipes.vllm.ai