Skip to content

Support coCondenser token spans on Transformers 5 - #2

Merged
capemox merged 1 commit into
mainfrom
fix/cocondenser-token-id-spans
Aug 16, 2026
Merged

Support coCondenser token spans on Transformers 5#2
capemox merged 1 commit into
mainfrom
fix/cocondenser-token-id-spans

Conversation

@capemox

@capemox capemox commented Aug 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • remove use of prepare_for_model, which no longer exists in Transformers 5
  • decode token-ID spans and pass them through the supported tokenizer call path
  • cover explicit token-ID spans and long automatically chunked documents

Validation

  • reproduced both branches failing with AttributeError before the fix
  • uv run ruff check .
  • uv run mypy --python-version 3.10 src/pretense
  • uv run pytest -q (109 passed)

Short-document splitting is intentionally handled by a separate PR.

@capemox
capemox merged commit 1970686 into main Aug 16, 2026
4 checks passed
@capemox
capemox deleted the fix/cocondenser-token-id-spans branch August 16, 2026 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant