Skip to content

gguf-py : TemplateProcessing has final word on add_special_token - #29417

Merged
CISC merged 2 commits into
masterfrom
cisc/specialvocab-add-special-token-override
Sep 25, 2026
Merged

CISC merged 2 commits into
masterfrom
cisc/specialvocab-add-special-token-override

Conversation

@CISC

@CISC CISC commented Sep 25, 2026

Copy link
Copy Markdown
Member

Overview

TemplateProcessing must overrule potentially erroneous tokenizer_config.json.

Additional information

This affected f.ex. nvidia/NVIDIA-Nemotron-Nano-9B-v2 for which an override was added, this is no longer necessary and has been removed as it conflicts with newer models.

Requirements

@CISC
CISC requested a review from danbev September 25, 2026 08:40
@CISC
CISC merged commit d81aef1 into master Sep 25, 2026
6 checks passed
@CISC
CISC deleted the cisc/specialvocab-add-special-token-override branch September 25, 2026 09:55
feal87 added a commit to feal87/myllama.cpp that referenced this pull request Sep 25, 2026
Merge upstream commits:
  - llama: add llama_prec_policy + model-driven W4A4 path (ggml-org#24364)
  - llama: fix tensor split for fused qkv with uneven K/V head sizes (ggml-org#29294)
  - metal: split fa kernels into per-dtype libraries (ggml-org#29329)
  - metal: FWHT kernels for block widths above 512 (ggml-org#29095)
  - CUDA: fuse RMS_NORM + SCALE into one kernel (ggml-org#29393)
  - common: extract shared unicode path/string helpers (ggml-org#29415)
  - common,rpc: simplify fs_create_directory_with_parents() (ggml-org#29432)
  - rpc: include nb in the get_alloc_size cache key (ggml-org#29283)
  - [SYCL] support sparse FA (ggml-org#28796)
  - musa: fix PH1 operator failures and build issues (ggml-org#29193)
  - HIP: bump HIP_VERSION required for fp8 (ggml-org#29231)
  - opencl: add q5_k bin kernel (ggml-org#29401)
  - hexagon: add q5_k quant type support (ggml-org#29123)
  - hexagon: use DMA for contiguous dim1 CONCAT (ggml-org#29404)
  - mtmd: fix mel preprocessor in LFM2 audio (ggml-org#29403)
  - vulkan: fix legacy GLSLC without cooperativeMatrix (ggml-org#29409)
  - gguf-py: ByteLevel processing defaults bos/eos to False (ggml-org#29422)
  - gguf-py: TemplateProcessing has final word on add_special_token (ggml-org#29417)

Assisted-by: Pi
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 7, 2026
…l-org#29417)

* templateprocessing must win over tokenizer config

* remove obsolete override

(cherry picked from commit d81aef1)
Nathanw1014 added a commit to Nathanw1014/llama.cpp that referenced this pull request Oct 25, 2026
LFM2 (and EXL3 containers of it) converted with this fork had no
tokenizer.ggml.add_bos_token / add_eos_token, so llama added a BOS per
chunk: LFM2.5-8B-A1B EXL3 2.10bpw scored PPL 46.5 instead of 35.9.
A ByteLevel post-processor adds no special tokens; a later
TemplateProcessing or tokenizer_config add_*_token still overrides it.

Port of ggml-org ggml-org#29422 (b248f4a, Sigbjørn Skjæret). The fork keeps
its tokenizer_config precedence (ggml-org#29417 is not taken), so only the
post-processor hunks apply.

Assisted-by: Claude Opus 5.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants