Skip to content

spec: add eagle3-v3 support for gpt-oss#25794

Open
ruixiang63 wants to merge 1 commit into
ggml-org:masterfrom
ruixiang63:eagle3.1
Open

spec: add eagle3-v3 support for gpt-oss#25794
ruixiang63 wants to merge 1 commit into
ggml-org:masterfrom
ruixiang63:eagle3.1

Conversation

@ruixiang63

@ruixiang63 ruixiang63 commented Jul 16, 2026

Copy link
Copy Markdown
Member

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] = inpL does not expose it, I reused MTP’s res->t_h_nextn = cur; and llama_set_embeddings_nextn to 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_ids parameter from the Eagle3 config. The existing hardcoded code remain as a fallback when eagle_aux_hidden_state_layer_ids is 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conversion model Model specific

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants