Skip to content

Use the canonical id for the tiny GPTNeoX sequence classification model - #7185

Open
albertvillanova wants to merge 1 commit into
mainfrom
fix-tiny-gpt-neox-id-casing
Open

Use the canonical id for the tiny GPTNeoX sequence classification model#7185
albertvillanova wants to merge 1 commit into
mainfrom
fix-tiny-gpt-neox-id-casing

Conversation

@albertvillanova

@albertvillanova albertvillanova commented Sep 11, 2026

Copy link
Copy Markdown
Member

tests/test_chat_template_utils.py refers to the tiny model as trl-internal-testing/tiny-GptNeoXForSequenceClassification, but the repository is trl-internal-testing/tiny-GPTNeoXForSequenceClassification. The Hub resolves the misspelt id with a 307 redirect, so the tests pass either way and nothing has ever failed because of it.

Why it matters

apply_model_revisions in tests/conftest.py injects the revision only on an exact match:

if pretrained_model_name_or_path in MODEL_REVISIONS:

So a MODEL_REVISIONS entry written with the canonical id would not match these three call sites. The tests would quietly load the default branch instead of refs/pr/N, pass, and report a tiny model PR as tested when it was not. One of the three call sites loads the model as well as the tokenizer, so this covers config and weights, not just the chat template.

Nothing is affected retroactively: MODEL_REVISIONS has never carried an entry for this model, and the Hub repo has no PRs.

Found while checking which tiny models the revision override can actually reach.

Changes

  • Spell the model id as tiny-GPTNeoXForSequenceClassification at its three occurrences

It also matches the line directly above it in the tool-calling list, which already uses tiny-GPTNeoXForCausalLM.


Note

Low Risk
Test-only string fixes with no runtime or production code changes.

Overview
Updates three references in tests/test_chat_template_utils.py from trl-internal-testing/tiny-GptNeoXForSequenceClassification to the canonical Hub id tiny-GPTNeoXForSequenceClassification (tokenizer/model load in test_clone_with_sequence_classification_model, plus the gptneox-seq param in the tool-calling negative test).

Tests still pass today because the Hub redirects the old spelling; the fix matters so apply_model_revisions’ exact MODEL_REVISIONS lookup would apply refs/pr/N to these call sites instead of silently loading the default branch.

Reviewed by Cursor Bugbot for commit f5d3b46. Bugbot is set up for automated code reviews on this repo. Configure here.

`tests/test_chat_template_utils.py` spelled the model
`trl-internal-testing/tiny-GptNeoXForSequenceClassification`, while the
repository is `trl-internal-testing/tiny-GPTNeoXForSequenceClassification`.
The Hub resolves the first with a redirect, so the tests pass either way.

`apply_model_revisions` in `tests/conftest.py` looks the model id up by exact
string, so a `MODEL_REVISIONS` entry written with the canonical id would not
have matched these three call sites: the tests would have loaded the default
branch and passed, reporting a tiny model PR as tested when it was not.
@bot-ci-comment

Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

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