Repository navigation
Score unsloth eval datasets in the chat format the model was trained on - #19141
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74153728e5
ℹ️ 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".
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
…, lm-eval versions and backends Dataset tasks stop at the first newline, so a Qwen3-style template that opens a <think> block reduced every answer to "<think>" (Qwen3-0.6B: 0/16). Dataset-only runs now pass enable_thinking=False to lm-eval's HFLM / VLLM; built-in tasks keep lm-eval's default. Auto mode now also requires lm-eval 0.4.10+ (the first release with enable_thinking and the BOS-prefix check that stops a doubled <bos> on Gemma templates), and prints an upgrade note otherwise. On vLLM the template check probes the tokenizer lm-eval's vLLM wrapper loads, so Mistral repos that vLLM serves with its own tokenizer, which cannot re-encode rendered control tokens, stay off. An explicit --chat-template fails fast when that tokenizer cannot render one. The tokenizer probe passes trust_remote_code=False like HFLM, so it never waits on a hidden consent prompt. Mixed dataset and built-in runs print why the template stays off, and results.json records the effective apply_chat_template.
|
Pushed 93a7310 on top of this PR, plus a merge of latest
Checked locally on hf/MPS with lm-eval 0.4.13: Qwen2.5-0.5B-Instruct on a 16-question dataset scores 0.44 on main and 0.875 here. mmlu and gsm8k pass the same lm-eval arguments as main, apart from an explicit |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e62c00897a
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Review and CI wrap-up for head
|
Lyxot
left a comment
There was a problem hiding this comment.
LGTM. Dataset tasks now go through the chat template safely across thinking models, lm-eval versions and backends. Codex converged and CI is green apart from failures already on main.
## Problem `tests/studio/test_chat_preset_load_config.py::test_apply_skips_missing_load_config` fails on main in `Repo tests (CPU, studio)`. Open PRs inherit it, for example #19141, which only touches the CLI: ``` assert 'selectedGpuIds: store.selectedGpuIds' in '// SPDX-License-Identifier: ... ``` ## Cause #19154 (keep the custom chat template when applying a chat preset) is correct. `applyPresetLoadConfig` used to start from `DEFAULT_PER_MODEL_CONFIG` and list the store fields a preset keeps (`selectedGpuIds: store.selectedGpuIds`, the MLX and engram knobs). It now starts from `currentRuntimePerModelConfig()`, so a preset changes only its own fields. That config returns `selectedGpuIds: s.selectedGpuIds`, so the GPU selection is still kept. The test pinned the old spelling rather than the behavior. The frontend test #19154 added, `preset-keeps-chat-template.test.ts`, has a gap of its own. It checks that every non-preset field is unchanged, but it sets `selectedGpuIds: null`, which is the default. A preset that cleared the GPU selection still passed it. ## Fix - `test_apply_skips_missing_load_config` now checks the mechanism: - `applyPresetLoadConfig` spreads `currentRuntimePerModelConfig()`; - that config carries the store's `selectedGpuIds`; - the preset body never names `selectedGpuIds` itself. - `preset-keeps-chat-template.test.ts` sets a real selection (`[1, 0]`, physical indexes), so its unchanged-fields loop actually covers the GPU selection. ## Verification - `test_chat_preset_load_config.py`: fails on main, 16 passed here. - `preset-keeps-chat-template.test.ts`: 6 pass. - Sabotage, both tests fail in each case: - starting the preset from `DEFAULT_PER_MODEL_CONFIG` again; - adding `selectedGpuIds: null` to the preset. - With that second sabotage, the original frontend test still passes (6 pass, 0 fail). That shows the gap this closes.
Running
unsloth evalon a chat fine-tune with a .jsonl, .json or .csv dataset gave a score near 0, even when the model answered correctly in chat. The questions were sent as plain text without the chat template, so the model just ended its turn. Dataset tasks now use the model's chat template when it has one. Built-in benchmarks like mmlu and gsm8k keep their usual prompts, so their scores still match published numbers, and--no-chat-templateturns this off. A SmolLM2-135M chat fine-tune scored 0.00 on main and 0.25 with this change.