Views
No views yet
| Component | Detail |
|---|---|
| Text backbone | GLM-5.2 (744B total / A40B active, MoE + MLA + DSA sparse attention) — frozen |
| Vision tower | MoonViT-3d from Kimi-K2.6, 27 layers, 1152-dim — frozen |
| Projector | PatchMerger MLP (pre_norm → linear_1 → GELU → linear_2), 1152→4608→6144 — trained |
| Text weights | NVFP4, from nvidia/GLM-5.2-NVFP4 |
| Size | ~466 GB |
| Hardware | 8×B200, or 4×B200 at 256k context — Blackwell only |
| Image tokens | up to 4096 per image (16384 MoonViT patches, 2×2 merge) |
| Max context | 1048576 (1M tokens) |
Glm5vForConditionalGeneration is not yet an
upstream architecture. It ships inside this repo, so there is nothing else to clone:1uvx --from huggingface-hub hf download baseten/GLM-5.2-Vision-NVFP4 \
2 --include 'plugins/*' --local-dir ./glm5v
3uv pip install ./glm5v/plugins1export SGLANG_EXTERNAL_MODEL_PACKAGE=sglang_glm5v
2export SGLANG_EXTERNAL_MM_PROCESSOR_PACKAGE=sglang_glm5v
3export SGLANG_EXTERNAL_MM_MODEL_ARCH=Glm5vForConditionalGeneration
4python -m sglang_glm5v.patch1python -m sglang.launch_server \
2 --model-path baseten/GLM-5.2-Vision-NVFP4 --trust-remote-code \
3 --tp-size 8 \
4 --quantization modelopt_fp4 \
5 --disable-shared-experts-fusion --disable-flashinfer-autotune \
6 --attention-backend dsa --mm-attention-backend sdpa \
7 --kv-cache-dtype fp8_e4m3 --page-size 64 \
8 --mem-fraction-static 0.85 \
9 --context-length 1048576 \
10 --reasoning-parser glm45 --tool-call-parser glm47 \
11 --served-model-name glm-5.2-vision \
12 --port 30000--tp-size 4, a higher memory fraction, and a smaller context:1python -m sglang.launch_server \
2 --model-path baseten/GLM-5.2-Vision-NVFP4 --trust-remote-code \
3 --tp-size 4 \
4 --quantization modelopt_fp4 \
5 --disable-shared-experts-fusion --disable-flashinfer-autotune \
6 --attention-backend dsa --mm-attention-backend sdpa \
7 --kv-cache-dtype fp8_e4m3 --page-size 64 \
8 --mem-fraction-static 0.90 \
9 --context-length 262144 \
10 --reasoning-parser glm45 --tool-call-parser glm47 \
11 --served-model-name glm-5.2-vision \
12 --port 30000image_url:1from openai import OpenAI
2
3client = OpenAI(base_url="http://localhost:30000/v1", api_key="none")
4r = client.chat.completions.create(
5 model="glm-5.2-vision",
6 messages=[{"role": "user", "content": [
7 {"type": "image_url", "image_url": {"url": "https://ultralytics.com/images/bus.jpg"}},
8 {"type": "text", "text": "Describe this image in detail."},
9 ]}],
10 temperature=1.0, top_p=0.95, max_tokens=512,
11)
12print(r.choices[0].message.content)--reasoning-parser glm45, the chain of thought arrives in
message.reasoning_content and the answer in message.content.uv and create a Baseten API key.1export BASETEN_API_KEY="your-baseten-api-key"
2uvx truss login --api-key "$BASETEN_API_KEY" --remote baseten --non-interactive
3
4uvx --from huggingface-hub hf download baseten/GLM-5.2-Vision-NVFP4 \
5 --include 'truss/*' --local-dir ./glm5v
6cd glm5v/truss
7
8# Recommended starting point: 4×B200 and 256k context.
9uvx truss push --remote baseten --config config_nvfp4_4gpu.yaml --wait --output json
10
11# Or use 8×B200 for the full 1M-token context.
12# uvx truss push --remote baseten --config config_nvfp4.yaml --wait --output jsonmodel_id, model_version_id, predict_url, and logs_url. It does not
promote the deployment to production.PREDICT_URL to the returned predict_url, then query the model:1export PREDICT_URL="https://model-...api.baseten.co/deployment/.../predict"
2
3curl -fsS "$PREDICT_URL" \
4 -H "Authorization: Api-Key $BASETEN_API_KEY" \
5 -H "Content-Type: application/json" \
6 -d '{
7 "model": "glm-5.2-vision",
8 "messages": [{
9 "role": "user",
10 "content": [
11 {"type": "image_url", "image_url": {"url": "https://ultralytics.com/images/bus.jpg"}},
12 {"type": "text", "text": "Describe this image in detail."}
13 ]
14 }],
15 "max_tokens": 512,
16 "temperature": 1.0,
17 "top_p": 0.95
18 }'