# Ternary Bonsai 2 9B vs GLM 5.4

Source: https://openrouter.ai/compare/prism-ml/ternary-bonsai-2-9b/z-ai/glm-5.4

## Overview

| Attribute | Ternary Bonsai 2 9B | GLM 5.4 |
| --- | --- | --- |
| Author | PrismML | Z.ai |
| Reasoning | Yes | Yes |
| Input modalities | Text, Image | Text, Image, Video |
| Output modalities | Text | Text |
| Input price | $0.08/M tokens | $0.40/M tokens |
| Output price | $0.13/M tokens | $2.464/M tokens |
| Context window | 262,144 tokens | 1,048,576 tokens |
| Latency (p50) | 0.42 s | 1.09 s |
| Throughput (p50) | 60.0 tok/s | 113.0 tok/s |

## Ternary Bonsai 2 9B or GLM 5.4: which should you choose?

### Choose Ternary Bonsai 2 9B for:

- a quicker first token (0.42 s vs 1.09 s)
- lower token prices

### Choose GLM 5.4 for:

- a longer context window (1,048,576 vs 262,144 tokens)
- faster output (113.0 vs 60.0 tok/s)

## Model pages

- [Ternary Bonsai 2 9B](https://openrouter.ai/prism-ml/ternary-bonsai-2-9b) ([llms.txt](https://openrouter.ai/prism-ml/ternary-bonsai-2-9b/llms.txt))
- [GLM 5.4](https://openrouter.ai/z-ai/glm-5.4) ([llms.txt](https://openrouter.ai/z-ai/glm-5.4/llms.txt))
