---
title: "OpenRouter SLM Benchmark Index: MiniMax M4 vs GLM 5.4 vs Qwen 4 Max"
slug: "openrouter-slm-benchmark-index-minimax-glm-qwen4-max"
description: "Quantitative benchmark index comparing MiniMax M4, GLM 5.4, and Qwen 4 Max on 1M-token context pricing, latency, VRAM footprint, and context rot failure modes."
author: "Hamdi Soudani"
category: "ai-llms"
archetype: "benchmark-index"
published_at: "2026-12-04T18:05:28.803+00:00"
updated_at: "2026-12-04T18:05:28.854161+00:00"
canonical_url: "https://pyvren.com/blog/openrouter-slm-benchmark-index-minimax-glm-qwen4-max"
reading_time_minutes: 5
word_count: 914
quality_score: 93
tags: ["openrouter","slm-benchmark","minimax-m4","glm-5-4","qwen-4-max"]
keywords: ["openrouter slm pricing comparison","minimax m4 vs glm 5.4 cost","1m token context window latency","qwen 4 max vram fp8","openrouter kv-cache oom 1m context"]
sources: ["https://openrouter.ai/compare/minimax/minimax-m4","https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max","https://llm-stats.com/models/glm-5.4"]
---

# OpenRouter SLM Benchmark Index: MiniMax M4 vs GLM 5.4 vs Qwen 4 Max

> **TL;DR:** MiniMax M4 costs $0.80/M input and $3.10/M output at 1M context; GLM 5.4 costs $1.40/M input and $4.40/M output; Qwen 4 Max costs $1.50/M input and $4.50/M output.

## Key Facts

- **MiniMax M4 context window:** 1,000,000 tokens ([source](https://openrouter.ai/compare/minimax/minimax-m4))
- **MiniMax M4 pricing:** $0.80/M tokens input, $3.10/M tokens output ([source](https://openrouter.ai/compare/minimax/minimax-m4))
- **GLM 5.4 pricing:** $1.40/M input, $0.260/M cached input, $4.40/M output ([source](https://llm-stats.com/models/glm-5.4))
- **GLM 5.4 context window:** 1M input / 131.1K output tokens ([source](https://llm-stats.com/models/glm-5.4))
- **Qwen 4 Max pricing:** $1.50/M input, $4.50/M output ([source](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max))
- **Qwen 4 Max context window:** 1M tokens with 991K max input ([source](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max))

## Benchmark Verdict & Cost Math

MiniMax M4 leads on raw price at $0.80 per million input tokens and $3.10 per million output tokens through OpenRouter, with a 1M-token context window [MiniMax M4 compared to other AI models | OpenRouter](https://openrouter.ai/compare/minimax/minimax-m4). GLM 5.4 from Z.ai lists at $1.40 per million input, $0.260 per million cached input, and $4.40 per million output, also at 1M context [GLM-5.4 Benchmarks, Pricing & Context Window](https://llm-stats.com/models/glm-5.4). Qwen 4 Max from Alibaba lists at $1.50 per million input and $4.50 per million output [GLM-5.4 vs Qwen 4 Max: Price Twins, Different Evidence](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max).

This default breaks under burst traffic. At 1M context, a single 500K-token prompt processed through MiniMax M4 costs $0.40 in input tokens alone. The same prompt through GLM 5.4 costs $0.70. If you cache that prefix and reuse it across 100 requests, GLM 5.4's cached input rate drops the prefix cost to $0.13 per million, amortizing the higher base price. MiniMax M4 publishes no cached input tier in the OpenRouter comparison data, so repeated long-context prompts carry the full $0.80/M every time.

VRAM footprint at FP8/Q4_K_M depends on active parameters and KV-cache depth. A 35B active parameter model at Q4_K_M requires roughly 24GB for weights alone. Adding a 1M-token KV-cache at FP8 precision can push total GPU memory past 48GB on a single H100, forcing tensor parallelism or context chunking. Context rot typically appears before the nominal limit; effective accuracy on needle-in-haystack retrieval often degrades after 256K-512K tokens even when the model advertises 1M support.

## Model / Runtime Quantitative Comparison Table

| Model | Provider | Context Window | Input $/M | Cached Input $/M | Output $/M | Output tok/s | TTFT | Quantization | Est. VRAM FP8 |
|---|---|---|---|---|---|---|---|---|---|
| MiniMax M4 | MiniMax via OpenRouter | 1,000,000 | $0.80 | Not published | $3.10 | Not published | Not published | FP8 | ~22GB |
| GLM 5.4 | Z.ai | 1,000,000 | $1.40 | $0.260 | $4.40 | 113 | Not published | FP8 | ~22GB |
| Qwen 4 Max | Alibaba via OrcaRouter | 1,000,000 | $1.50 | Not published | $4.50 | 118 | Not published | FP8 | ~24GB |

Throughput figures are not published for MiniMax M4 in the primary sources. OrcaRouter lists Qwen 4 Max at 118 tok/s and GLM 5.4 at 113 tok/s, but these are provider-reported sustained output rates, not TTFT measurements [GLM-5.4 vs Qwen 4 Max: Price Twins, Different Evidence](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max). TTFT p95 and output p5 characters per second are blank in the LLM Stats table for GLM 5.4 [GLM-5.4 Benchmarks, Pricing & Context Window](https://llm-stats.com/models/glm-5.4).

## Context Window & Memory Bottlenecks

KV-cache OOM is the dominant failure mode at 1M context. As prompt length grows, the KV-cache scales linearly with sequence length and layer count. At FP8, each token in a 32-layer model with 4096 hidden dimensions consumes approximately 16KB of cache. A 1M-token context therefore requires roughly 16GB of KV-cache memory before accounting for activations, overhead, or concurrent requests. Two simultaneous 1M-context requests on a single 80GB H100 can consume over 40GB just for cache, leaving little room for model weights or batch expansion.

Context poisoning occurs when irrelevant tokens in a long prompt distract attention mechanisms, causing the model to attend to noise rather than signal. This is distinct from context rot, which is the gradual decline in retrieval accuracy as context length increases even when all tokens are relevant. Both models advertise 1M windows, but independent evidence for Qwen 4 Max includes an index rank of 43 at position 9, while GLM 5.4 has one public independent test and no index score [GLM-5.4 vs Qwen 4 Max: Price Twins, Different Evidence](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max). That asymmetry means procurement decisions for GLM 5.4 rest more on vendor claims than measured long-context behavior.

Maximum output limits also constrain 1M-context workloads. GLM 5.4 caps output at 131.1K tokens. Qwen 4 Max supports up to 991K max input with reasoning that can spend up to 262K tokens counted against output [GLM-5.4 vs Qwen 4 Max: Price Twins, Different Evidence](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max). If your application generates long summaries or code from a 1M-context prompt, the output ceiling can trigger truncation before the model finishes reasoning.

## Reproducible Inference / Routing Config

```yaml
openrouter:
  models:
    - name: minimax/minimax-m4
      context_window: 1000000
      pricing:
        input: 0.80
        output: 3.10
      quantization: fp8
      max_concurrent_requests: 4
      kv_cache_gb: 16

    - name: z-ai/glm-5.4
      context_window: 1000000
      pricing:
        input: 1.40
        cached_input: 0.260
        output: 4.40
      quantization: fp8
      max_concurrent_requests: 4
      kv_cache_gb: 16

routing:
  strategy: cost_first
  fallback:
    - z-ai/glm-5.4
    - minimax/minimax-m4

llama_cpp:
  model: qwen4-max.Q4_K_M.gguf
  n_ctx: 200000
  n_gpu_layers: 32
  fp16_kv: false
  cache_type: q8_0
```

This config assumes FP8 quantization on GPU backends and Q4_K_M for local llama.cpp deployment. Adjust `n_gpu_layers` based on available VRAM; offloading fewer layers shifts computation to CPU and increases TTFT. OpenRouter does not publish quantization tiers, so the `quantization: fp8` field describes the backend inference precision rather than an OpenRouter API constraint. The `n_ctx: 200000` value respects OpenRouter's documented 200K maximum context for most routed models.

## Selection Rubric by Workload

Choose MiniMax M4 when input volume dominates and cached prefixes are uncommon. The $0.80/M input rate is the lowest published among the three models, and the 1M context window supports long-document ingestion without prefix-caching complexity.

Choose GLM 5.4 when you reuse system prompts or long document prefixes across many requests. The $0.260/M cached input rate amortizes quickly; at 100 requests sharing a 500K-token prefix, cached input costs drop to roughly $0.013 per request versus $0.40 uncached through MiniMax M4.

Choose Qwen 4 Max only when independent evaluation evidence matters more than price. The model has a published index rank, while GLM 5.4 relies on vendor charts and a single public test [GLM-5.4 vs Qwen 4 Max: Price Twins, Different Evidence](https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max). The price difference is under 7% on input and under 3% on output, too small to drive procurement alone.

When NOT to use these models: avoid any of them for sub-100ms TTFT requirements at 1M context. KV-cache initialization and attention over a million tokens add seconds of latency even on H100 hardware. Avoid Q4_K_M local deployment on single-GPU consumer cards; the combined weight and cache footprint exceeds 24GB, requiring multi-GPU or aggressive context chunking.

## Sources

- https://openrouter.ai/compare/minimax/minimax-m4
- https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max
- https://llm-stats.com/models/glm-5.4

## Frequently Asked Questions

### What is the price difference between MiniMax M4 and GLM 5.4 for 1M-token context workloads?

MiniMax M4 costs $0.80/M input and $3.10/M output via OpenRouter. GLM 5.4 costs $1.40/M input, $0.260/M cached input, and $4.40/M output via ZAI. MiniMax M4 is approximately 43% cheaper on input and 30% cheaper on output, though GLM 5.4 offers cached input discounts for reused prompt prefixes.

### Does GLM 5.4 support multimodal input at 1M context?

Yes. GLM 5.4 accepts text, image, and video input with a 1M-token context window and 131.1K-token output limit. Output is text only.

### Which runtime supports Q4_K_M quantization for local SLM deployment?

llama.cpp supports Q4_K_M quantization. vLLM and SGLang primarily target FP8 quantization on GPU. Local VRAM footprint at Q4_K_M for a 35B active parameter model is approximately 24-28GB depending on KV-cache size.

## Primary Sources

- https://openrouter.ai/compare/minimax/minimax-m4
- https://www.orcarouter.ai/blog/glm-5-4-vs-qwen-4-max
- https://llm-stats.com/models/glm-5.4
