Skip to content

Eval bug: Gemma4 26B A4B repetition at high context #21799

Description

@aldehir

Name and Version

$ ./llama-server --version
ggml_cuda_init: found 1 CUDA devices (Total VRAM: 81079 MiB):
  Device 0: NVIDIA H100 80GB HBM3, compute capability 9.0, VMM: yes, VRAM: 81079 MiB
version: 8763 (ff5ef8278)
built with GNU 13.3.0 for Linux x86_64

$ nvidia-smi
Sun Apr 12 08:56:27 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 580.126.09             Driver Version: 580.126.09     CUDA Version: 13.0     |
+-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA H100 80GB HBM3          On  |   00000000:5D:00.0 Off |                  Off |
| N/A   29C    P0            117W /  700W |    1115MiB /  81559MiB |      0%      Default |
|                                         |                        |             Disabled |
+-----------------------------------------+------------------------+----------------------+

+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI              PID   Type   Process name                        GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A           51217      C   ./build/bin/llama-server               1106MiB |
+-----------------------------------------------------------------------------------------+

Operating systems

Linux

GGML backends

CUDA

Hardware

Device 0: NVIDIA H100 80GB HBM3, compute capability 9.0, VMM: yes, VRAM: 81079 MiB

Models

ggml-org/gemma-4-26B-A4B-it-GGUF:Q8_0
bartowski/google_gemma-4-26B-A4B-it-GGUF:Q4_K_M
bartowski/google_gemma-4-26B-A4B-it-GGUF:F16
unsloth/gemma-4-26B-A4B-it-GGUF:UD-Q4_K_M

Problem description & steps to reproduce

At high context, I noticed there is still a chance of repetition. Not sure if it's a model problem, but I was able to reproduce it with ggml-org's Q8_0, bartowski's Q4_K_M & F16, and Unsloth's UD-Q4_K_M.

I have seen this occur at high context with the recommended sampling params (top-k = 64, temp = 1.0, top-p = 0.95). Although usually it's a repetition of multiple lines. I caught this with top-k = 1, temp = 0.0 in case it's a useful data point for reproduction.

I could not reproduce this on Windows, only Linux.

Run server with:

./build/bin/llama-server -m /workspace/models/gemma-4-26B-A4B-it-Q8_0.gguf --chat-template-file models/templates/google-gemma-4-31B-it.jinja -c 256000 -np 1 --verbose --top-k 1 --temperature 0 -cram 0 -dio --no-cache-prompt

repro: https://github.com/aldehir/gemma4-26b-repros

Reproduce via /completions with the prompt already generated from the updated template by Google

$ OPENAI_BASE_URL=http://localhost:7000/v1 ./run-completions.py request-02-raw.json
<|channel>thought
Task 12 is complete.

**Task 13: Parser & Engine � `addcol`**

I've already implemented `addcol` in `parser.py` and `engine.py`.
Let's verify with a test.
I'll add a test to `test_engine.py`.

Wait, I already have `test_execute_addcol` in `test_engine.py`? No, I don't.
I'll add it.

Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_expr.py`? No, `test_engine.py` is better.

Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
...

Reproduce via /chat/completions, use models/templates/google-gemma-4-31B-it.jinja template

$ OPENAI_BASE_URL=http://localhost:7000/v1 ./run.py request-02.json
Task 12 is complete.

**Task 13: Parser & Engine � `addcol`**

I've already implemented `addcol` in `parser.py` and `engine.py`.
Let's verify with a test.
I'll add a test to `test_engine.py`.

Wait, I already have `test_execute_addcol` in `test_engine.py`? No, I don't.
I'll add it.

Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_expr.py`? No, `test_engine.py` is better.

Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Wait, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
Actually, I'll add it to `test_engine.py`.
...

First Bad Commit

No response

Relevant log output

Server log: https://github.com/aldehir/gemma4-26b-repros/blob/main/request-02-server.log

Prompt (generated from updated template): https://github.com/aldehir/gemma4-26b-repros/blob/main/request-02-prompt.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions