spec: add eagle3-v3 support for gpt-oss#25794
Open
ruixiang63 wants to merge 1 commit into
Open
Conversation
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.
Overview
Following comment #25733 (comment) to add eagle3-v3 support for https://huggingface.co/nvidia/gpt-oss-120b-Eagle3-v3.
Because the extracted layers specified in the configuration include the final layer’s output, while the current extraction interface
res->t_layer_inp[il] = inpLdoes not expose it, I reused MTP’sres->t_h_nextn = cur;andllama_set_embeddings_nextnto retrieve the final-layer hidden states from the target model.This logic mirrors the implementation used in qwen35moe: https://github.com/ggml-org/llama.cpp/blob/master/src/models/qwen35moe.cpp
This PR also replaces the previously hardcoded Eagle3 target layer ids with the more flexible
eagle_aux_hidden_state_layer_idsparameter from the Eagle3 config. The existing hardcoded code remain as a fallback wheneagle_aux_hidden_state_layer_idsis not present.In addition, because we now reuse MTP’s method to retrieve the target model’s final hidden states, there are no longer any restrictions on which target layer id can be extracted.
Additional information
Requirements