Skip to content

fix: eos token ids for Qwen3.8/Kimi-Linear + auto trust_remote_code - #2265

Open
adamteale wants to merge 1 commit into
exo-explore:mainfrom
adamteale:fix/eos-token-ids
Open

fix: eos token ids for Qwen3.8/Kimi-Linear + auto trust_remote_code#2265
adamteale wants to merge 1 commit into
exo-explore:mainfrom
adamteale:fix/eos-token-ids

Conversation

@adamteale

Copy link
Copy Markdown

Three model-loading fixes in utils_mlx.py:

  1. Add Qwen3.8 to the eos token branch ([248046, 248044]) — without this, <|im_end|> leaked into generated content on all Qwen3.8 quants.

  2. Add kimi-linear to the kimi-k2 eos branch ([163586]) — the auto-resolved eos (163585) was off-by-one, causing stop-token failures.

  3. Auto-enable trust_remote_code when a model directory ships modeling_*.py custom code (e.g. kimi_linear). Without this, such models fail to load with "custom code which must be executed" errors.

Motivation

Changes

Why It Works

Test Plan

Manual Testing

Automated Testing

Three model-loading fixes in utils_mlx.py:

1. Add Qwen3.8 to the eos token branch ([248046, 248044]) — without this,
   <|im_end|> leaked into generated content on all Qwen3.8 quants.

2. Add kimi-linear to the kimi-k2 eos branch ([163586]) — the auto-resolved
   eos (163585) was off-by-one, causing stop-token failures.

3. Auto-enable trust_remote_code when a model directory ships modeling_*.py
   custom code (e.g. kimi_linear). Without this, such models fail to load
   with "custom code which must be executed" errors.
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