add eagle3 support for Qwen3 series models

This commit is contained in:
ruixiangw
2026-01-08 23:49:06 +00:00
parent 5a79c1900f
commit c0d99e65d2
2 changed files with 16 additions and 4 deletions
+11
View File
@@ -21,6 +21,17 @@ llm_build_qwen3::llm_build_qwen3(const llama_model & model, const llm_graph_para
for (int il = 0; il < n_layer; ++il) {
ggml_tensor * inpSA = inpL;
// EAGLE3: Extract intermediate layer features from target model at layer INPUT
if (eagle3 && cparams.eagle3_extract_enabled && !eagle3->extract_layer_indices.empty()) {
static const char * eagle3_extract_names[] = {"eagle3_extract_0", "eagle3_extract_1", "eagle3_extract_2"};
for (size_t i = 0; i < eagle3->extract_layer_indices.size() && i < 3; ++i) {
if (eagle3->extract_layer_indices[i] == il) {
cb(inpL, eagle3_extract_names[i], il);
break;
}
}
}
// norm
cur = build_norm(inpL,
model.layers[il].attn_norm, NULL,