Model reference · open weights

glm-edge

Available as managed deployment Licence fee LLMs zai-org Text gen 1 variants 6k dl/mo

glm-edge is an open-weight language model from zai-org. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Makerzai-org
TypeLanguage models
TaskText gen
Parameters (lead)4.3B
Context8k tokens
Released2024-11-20
Popularity6k downloads / month
LicenceCommercial licence needed

About

What glm-edge is

中文阅读, 点击这里

Inference with Transformers

Installation

Install the transformers library from the source code:

pip install git+https://github.com/huggingface/transformers.git

Inference

from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL_PATH = "THUDM/glm-edge-4b-chat"

tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
model = AutoModelForCausalLM.from_pretrained(MODEL_PATH, device_map="auto")

message = [{"role": "user", "content": "hello!"}]

inputs = tokenizer.apply_chat_template(
    message,
    return_tensors="pt",
    add_generation_prompt=True,
    return_dict=True,
).to(model.device)

generate_kwargs = {
    "input_ids": inputs["input_ids"],
    "attention_mask": inputs["attention_mask"],
    "max_new_tokens": 128,
    "do_sample": False,
}
out = model.generate(**generate_kwargs)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

License

The usage of this model’s weights is subject to the terms outlined in the LICENSE.

From the published model card. Full card on the HuggingFace links in the sidebar.

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys glm-edge for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (glm-edge below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/chat/completions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-edge","messages":[{"role":"user","content":"Hello"}]}'

Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms