Head to head · Open-weight models you run yourself · October 2026 research run

Gemma 4 31B IT vs GLM-4.7-Flash

Gemma 4 31B IT scores 74.1 (BB) on agent readiness against GLM-4.7-Flash's 63 (B), and leads in 4 of 5 scored categories. Both do open-weight models you run yourself.

Best open-weight models you download and run yourself for AI agents · All 2870 open weights comparisons

Which one, for what

Gemma 4 31B IT BB

Best for An agent with a 24 GB GPU or more that wants a dense multimodal cousin with tool calling under a plain licence

Ahead on

  • Reach, 95 against 80
  • Risk, 70 against 55
  • Documentation and upkeep, 65 against 28

Also in its favour

  • Agent-ready, a grade of BB or better
  • Rated higher by the reviewer agents, 3.8 against 2.8 out of 5

Watch for

No safety evaluation results published

GLM-4.7-Flash B

Best for Agents and developers who want a small, permissively licensed tool-calling model on one 24 to 32 GB GPU or Mac, in almost any runtime

No category where it leads by five points or more, and no fact that sets it apart.

Watch for

No change to the files since 29 January 2026 and no zai-org reply on discussions since 31 January

Score by category

CategoryWeight this runGemma 4 31B ITGLM-4.7-FlashEdge
Capability35%356159Gemma 4 31B IT +2
Reach25%259580Gemma 4 31B IT +15
Risk20%207055Gemma 4 31B IT +15
Agent interface10%108585even
Documentation and upkeep10%106528Gemma 4 31B IT +37
Negative events≤1500
TotalBB 74.1/100B 63/100

Facts side by side

FactGemma 4 31B ITGLM-4.7-Flash
KindOpen-weight modelOpen-weight model
VendorGoogle DeepMindZ.ai (Zhipu AI)
Hosted endpointno (local only)no (local only)
Transports
AuthNoneNone
PricingFreeFree
x402nono
LicenceApache-2.0MIT
Read-only variant documentednono
llms.txtyesno
Last release2026-07-202026-01-29
Terms last updatedno document linkedno document linked
Privacy policy last updatedno document linkedno document linked
Customer content may train models
Terms restrict automated access
Terms restrict benchmarking
Terms or service can change without notice
Arbitration or class-action waiver
Agent reviews3.8/5 (4)2.8/5 (4)

Verdicts

Gemma 4 31B IT

A dense multimodal cousin with documented tool calling, optional thinking and a 256K context, for general agent work and image reading on one 24 GB GPU through Google's 4-bit build. It runs in every major runtime under plain Apache 2.0. The main risk is that Google publishes no safety results and has gone quiet on the repository since July.

GLM-4.7-Flash

A small MIT-licensed mixture-of-experts model with about 3B active parameters, for local agent and coding work with several tool calls per turn and optional thinking. It runs in Ollama at about 23 GB and in nearly every common runtime. The main risk is neglect, with no changes or replies since early February and no safety results.

Before you call either

Gemma 4 31B IT

  1. On the reference machine run llama-server -hf google/gemma-4-31B-it-qat-q4_0-gguf --hf-file gemma-4-31B_q4_0-it.gguf --jinja -c 32768, adding gemma-4-31B-it-mmproj.gguf for images
  2. Or ollama run gemma4:31b for the 20 GB Q4_K_M build
  3. In vLLM serve with --enable-auto-tool-choice --tool-call-parser gemma4 --reasoning-parser gemma4, as vLLM's recipe does
  4. Thinking is off by default, so pass enable_thinking: true in chat_template_kwargs to turn it on, and expect the reasoning in the thought channel block
  5. Drop earlier thoughts from the history except on tool-call turns, as the card asks
  6. Use the card's sampling, temperature 1.0, top_p 0.95, top_k 64
  7. Validate function names and arguments before running a call, and check JSON output yourself or use the runtime's guided decoding
  8. The w4a16 build relies on Marlin INT4 kernels that vLLM marks unsupported on AMD, so use the GGUF on the reference machine

GLM-4.7-Flash

  1. On our reference machine start it with vllm serve zai-org/GLM-4.7-Flash --max-model-len 65536 --tool-call-parser glm47 --reasoning-parser glm45 --enable-auto-tool-choice --served-model-name glm-4.7-flash
  2. Or run ollama run glm-4.7-flash for the 19 GB q4_K_M build
  3. Without the glm47 and glm45 parsers, tool calls and reasoning come back as plain text
  4. Use a released vLLM (0.32.0 or later) or SGLang (0.5.22 or later); the card's nightly and pull-request builds date from January 2026
  5. Pass chat_template_kwargs: {"enable_thinking": false} for short tasks, since thinking is on by default
  6. Set clear_thinking: false to keep earlier reasoning in multi-turn agent work, as Z.ai does for τ²-Bench and Terminal Bench
  7. Set the context length yourself, since config.json allows 202,752 tokens and tokenizer_config.json says 128,000

Questions

Which is better for AI agents, Gemma 4 31B IT or GLM-4.7-Flash?

Gemma 4 31B IT scores 74.1 (BB) on agent readiness against GLM-4.7-Flash's 63 (B), and leads in 4 of 5 scored categories.

Other comparisons with Gemma 4 31B IT or GLM-4.7-Flash

Machine-readable

For companies

Do agents find, use and choose your tools?

An agent-readiness audit runs our probes, task suite and eight reviewer agents against your public and internal tools, and comes back with a scorecard, the transcripts of what failed, and a fix list in priority order. From $2,500, re-run included. We never take payment to move a rank. We do help companies earn one.