GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Give the Kimi processor test's stand-in tokenizer convert_tokens_to_ids by danielhanchen · Pull Request #12206 · unslothai/unsloth

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Sep 28, 2026

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, rest) fails on current PRs (first on #12178) with:

FAILED tests/test_kimi_medias_processor_loader.py::test_patched_kimi_processor_takes_text_and_images - AttributeError: '_Tokenizer' object has no attribute 'convert_tokens_to_ids'

That job installs unsloth_zoo from git main. unslothai/unsloth-zoo#1442 (merged 08:37 UTC today) added the patched Kimi processor(text=..., images=...) call this test exercises; before it the test skipped. The patched call now also checks that truncation kept every <|media_pad|> placeholder, counting them through self.tokenizer.convert_tokens_to_ids(pad). Real tokenizers all have that method, so zoo is right; the test's stand-in _Tokenizer just did not implement it.

Change

_Tokenizer.convert_tokens_to_ids(token) returns len(token), which is what the stand-in's own encoding (each word becomes its length) gives the placeholder, so the placeholder count zoo reads matches what the stand-in produced.

Verification

unsloth_zoo before after
main (with #1442) 1 failed, 3 passed 4 passed
c37dcfb~1 (before #1442) 3 passed, 1 skipped 3 passed, 1 skipped

The stand-in id is checked, not just present: with zoo's placeholder id off by one, the test fails on truncation ... removed 2 of 2 <|media_pad|> image placeholders.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@danielhanchen
Give the Kimi processor test's stand-in tokenizer convert_tokens_to_ids
e648d7f
@danielhanchen

danielhanchen commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-28T14:14:21.184713Z e648d7f Manual request
🔒 Security Review ⚠️ Failed 2026-09-28T14:11:18.144125Z e648d7f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 28, 2026

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: e648d7fdf4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@danielhanchen
danielhanchen merged commit b67b334 into main Sep 28, 2026
1 of 15 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@danielhanchen
danielhanchen deleted the fix-kimi-tokenizer-stub branch September 28, 2026 14:35
shaojun pushed a commit to shaojun/unsloth that referenced this pull request Sep 29, 2026
@danielhanchen @shaojun
Give the Kimi processor test's stand-in tokenizer convert_tokens_to_i…
d3f51ef
…ds (unslothai#12206)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@danielhanchen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.