Skip to content

fix(indexing): treat special tokens as text - #853

Open
Iams4kura wants to merge 1 commit into
Cinnamon:mainfrom
Iams4kura:bugfix/treat-special-tokens-as-text-20260813t000300z
Open

fix(indexing): treat special tokens as text#853
Iams4kura wants to merge 1 commit into
Cinnamon:mainfrom
Iams4kura:bugfix/treat-special-tokens-as-text-20260813t000300z

Conversation

@Iams4kura

Copy link
Copy Markdown

Description

Type of change

  • New features (non-breaking change).
  • Bug fix (non-breaking change).
  • Breaking change (fix or feature that would cause existing functionality not to work as expected).

Checklist

  • I have performed a self-review of my code.
  • I have added thorough tests if it is a core feature.
  • There is a reference to the original bug report and related work.
  • I have commented on my code, particularly in hard-to-understand areas. (The small tokenizer wrapper is self-explanatory; no additional comment is needed.)
  • The feature is well documented. (No user-facing documentation changes are needed for this bug fix.)

Regression evidence

  • Before the fix, the focused regression test raised ValueError for literal <|endoftext|> input.
  • After the fix, the same test passes and matches encoding.encode(text, disallowed_special=()).

Verification

  • pytest libs/ktem/ktem_tests/test_file_pipeline.py -q: 1 passed.
  • pytest libs/kotaemon/tests/: 116 passed, 20 skipped.
  • pre-commit run --all-files: all hooks passed.
  • git diff --check: passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment