model : inkling2_loop share the loop slots after the scale pass (#32704)

The loop slots copied the physical layers at the end of load_arch_tensors,
before the generic pass attaches the optional .scale tensors, so the later
passes through the core ran NVFP4 experts without their per-expert scales.
Add an optional post_arch_tensors hook that runs after the scale pass and
share the slots there.
This commit is contained in:
Daniel Han authored and GitHub committed 2026-11-21 12:10:38 +01:00
1 parent 838d942438
commit 690b87d881
4 files changed
+7

No files matched your search

+2
View File
@@ -60,7 +60,9 @@ void llama_model_inkling2_loop::load_arch_tensors(llama_model_loader & ml) {
l.ctrl_forget[c] = create_tensor(tn(forget[c], "weight", il), {rank, n_embd}, 0);
}
}
}
void llama_model_inkling2_loop::post_arch_tensors(llama_model_loader &) {
// share the physical weights, each cache slot keeps its own KV and conv state
for (int il = n_phys; il < (int) hparams.n_layer(); ++il) {
layers[il] = layers[layer_phys(il)];