Files
llama.cpp/tests/fusion
Aman GuptaandDaniel Han 74bca39500 model: DSV4.1 flash (#31086)
* model : add DeepSeek-V4.1-Flash (deepseek41)

* deepseek41 : remove MXFP8, convert the Engram table to BF16

* deepseek41 : compute the compressed-KV read layers once in the cache

* deepseek41 : use get_cells() for the shared-history check, drop llama_kv_cache::seq_pos_tok_le

* deepseek41 : gather the Engram rows in-graph like qwen4exp, drop the host gather

* deepseek41 : keep the Engram hash constants in hparams.ple_*, one module per Engram layer

* deepseek41 : drop the LLAMA_DSV41_KV_MIRROR toggle

* deepseek41 : keep il last in build_hc_mixes

* deepseek41 : sort the top-k rows before the sparse gather

* tests : add deepseek41 to the Metal fusion baseline

---------

Co-authored-by: Daniel Han <danielhanchen@gmail.com>
2026-10-25 09:43:51 +08:00
..
2026-10-25 09:43:51 +08:00

Fusion baselines

Per-device baselines for test-fusion, one CSV per backend (e.g. MTL.csv). Rows are arch,moe,mode,label,count. Regenerate a CSV whenever fusion patterns change.

Update a baseline

cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_METAL=ON   # enable the target backend
cmake --build build --config Release --target test-llama-archs --target test-fusion -j

rm -rf build-ci-models && mkdir -p build-ci-models
./build/bin/test-llama-archs -o build-ci-models

./build/bin/test-fusion --models build-ci-models --device MTL0 --record MTL.csv

Validate

./build/bin/test-fusion --models build-ci-models --device MTL0 --check MTL.csv

Non-zero exit means a row differs from the baseline. Use --model FILE to run a single architecture. --check also reports baseline rows that the run no longer produces, so a fusion that stops matching fails the run instead of silently dropping out of the CSV.