hacnho/gguf-eos-token-id-eog-stop-poc overview
GGUF eos token id EOG Stop PoC This repository contains a benign security research proof of concept for a GGUF model file output manipulation issue in llama.cp…
Runs locally from ~589.1 MB disk (4 GB VRAM class GPUs with llama.cpp / guIDE).
Repository Files & Downloads
| File | Type | Quantization | Size | Link |
|---|---|---|---|---|
| gemma-4-1B-0.8B-tiny.Q2_K.eos-hello.gguf | GGUF | GGUF | 589.1 MB | Download |
Model Details
Model README
GGUF eos_token_id EOG Stop PoC
This repository contains a benign security research proof of concept for a GGUF model-file output-manipulation issue in llama.cpp.
The malicious artifact changes tokenizer.ggml.eos_token_id to token ID 9259, whose piece is Hello. llama.cpp treats the configured EOS token as an end-of-generation token, so deterministic generation stops when that normal text token is selected.
Files:
gemma-4-1B-0.8B-tiny.Q2_K.eos-hello.ggufreproduce.py
The control model is public here:
https://huggingface.co/mradermacher/gemma-4-1B-0.8B-tiny-GGUF/resolve/main/gemma-4-1B-0.8B-tiny.Q2_K.gguf
Reproduce:
curl -L -o control.gguf \
https://huggingface.co/mradermacher/gemma-4-1B-0.8B-tiny-GGUF/resolve/main/gemma-4-1B-0.8B-tiny.Q2_K.gguf
python reproduce.py control.gguf gemma-4-1B-0.8B-tiny.Q2_K.eos-hello.gguf
modelscan -p gemma-4-1B-0.8B-tiny.Q2_K.eos-hello.gguf
Expected result:
- control output line is
<bos>HelloHelloHelloHelloHelloHelloHello - malicious output line is
<bos>Hello modelscan==0.8.8reportsNo issues found
Run hacnho/gguf-eos-token-id-eog-stop-poc with guIDE
Download guIDE — the AI-native code editor with local LLM inference and 69 built-in tools.
Source: Hugging Face · Compare models