Avoid hard failure for gpt-oss GGUF architecture by falling back to g…#43757
Open
TheSanjBot wants to merge 4 commits intohuggingface:mainfrom
Open
Avoid hard failure for gpt-oss GGUF architecture by falling back to g…#43757TheSanjBot wants to merge 4 commits intohuggingface:mainfrom
TheSanjBot wants to merge 4 commits intohuggingface:mainfrom
Conversation
Author
|
CI failure seems unrelated to this PR. The failing test ( Could you please rerun CI? |
Contributor
|
[For maintainers] Suggested jobs to run (before merge) run-slow: grounding_dino |
This was referenced Mar 30, 2026
This was referenced Apr 18, 2026
pull Bot
pushed a commit
to itsbrex/transformers
that referenced
this pull request
Apr 22, 2026
…upersedes huggingface#43757) latest (huggingface#45506) * Add GPT-OSS GGUF support with YaRN rope scaling reconstruction * Add GGUF loading test suite for GPT‑OSS * docs: add GGUF loading section to gpt_oss.md * fix: correct import of GptOssTensorProcessor in test; remove from model __all__ * Finalize GPT‑OSS GGUF support: move test, adjust config reconstruction * fixed docs not closing example bracket * Fix lint: remove trailing whitespace * Fix tensor construction consistency * reverting to original docs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does this PR do?
This PR avoids a hard failure when loading GGUF models that declare the
gpt-ossarchitecture.Currently, such models raise a
ValueErrorduring GGUF config loading.This change maps
gpt-ossto the closest supported architecture(
gpt-neox) and emits a clear warning to communicate current limitations.The goal is to allow GGUF checkpoints using
gpt-ossto be loaded withoutcrashing, enabling downstream tools (e.g. vLLM) to proceed.
Notes / Limitations
Fixes #43366
Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
No tests were added as GGUF integration tests require large binary artifacts
and this change only affects architecture handling and error prevention.
Who can review?
cc @SunMarc @Rocketknight1