gpuos

Small & fast · Free plan

Run GLM-4 9B on your own GPU

GLM-4 9B, a compact MIT-licensed chat model with a long context window and solid multilingual skills, comfortable on 8 GB of VRAM.

With gpuos, GLM-4 9B runs on Ollama at Q4_K_M on your machine and is served as glm-4-9b through one OpenAI-compatible endpoint, with API keys, quotas and usage metering.

Parameters
9B dense
Quantization
Q4_K_M
VRAM (4–8K ctx)
≈ 6.5 GB
Context window
128K tokens
License
MIT
Engine
Ollama
Ollama tag
glm4:9b
API
/v1/chat/completions

What GLM-4 9B is good at

Which GPUs can run GLM-4 9B?

Catalog estimate at Q4_K_M, not a measured benchmark. Chat estimates assume a short context; embedding memory depends on input and batch size. More in how much VRAM an LLM needs.

Check this estimate against your GPU with the VRAM calculator

Call GLM-4 9B with the OpenAI SDK

Same SDKs, same request format. Only the base URL, the key and the model name change. Setup for LangChain, Continue, Open WebUI and more is in integrations.

Python
from openai import OpenAI

client = OpenAI(base_url="https://gpuos.si/v1", api_key="gpuos_key_…")
stream = client.chat.completions.create(
    model="glm-4-9b",
    messages=[{"role": "user", "content": "Summarize our refund policy."}],
    stream=True,
)
for chunk in stream:
    print(chunk.choices[0].delta.content or "", end="")
Node.js
import OpenAI from "openai"

const client = new OpenAI({ baseURL: "https://gpuos.si/v1", apiKey: process.env.GPUOS_API_KEY })
const reply = await client.chat.completions.create({
  model: "glm-4-9b",
  messages: [{ role: "user", content: "Summarize our refund policy." }],
})
console.log(reply.choices[0].message.content)
curl
curl https://gpuos.si/v1/chat/completions \
  -H "Authorization: Bearer $GPUOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "glm-4-9b", "messages": [{"role": "user", "content": "Hello"}]}'

Questions

How much VRAM does GLM-4 9B need?
About 6.5 GB at Q4_K_M with a short context (4–8K tokens). The smallest common GPU that fits it is the RTX 4060 Ti 8 GB. Longer contexts and more concurrent requests need extra headroom for the KV cache.
Can I use GLM-4 9B commercially?
Yes. GLM-4 9B is released under the MIT license, which allows commercial use.
Is GLM-4 9B compatible with the OpenAI API?
Yes. Through gpuos, GLM-4 9B is served at /v1/chat/completions with the model id "glm-4-9b", so the official OpenAI SDKs, LangChain and LlamaIndex work by changing the base URL and the API key.
Which gpuos plan includes GLM-4 9B?
GLM-4 9B is in the base catalog, available on the free Community plan (1 node, 1 GPU).

Related models

Plan your GLM-4 9B deployment with gpuOS

Join early access for onboarding, or read the quickstart to evaluate the Community workflow on your own GPU.