Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions tools/server/server-context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,10 @@ struct server_context_impl {
params_dft.cache_type_k = params_spec.cache_type_k;
params_dft.cache_type_v = params_spec.cache_type_v;
params_dft.tensor_buft_overrides = params_spec.tensor_buft_overrides;
// the K-cache mean-center bias is calibrated for the target model
// (per-head/channel K layout); the draft model has a different K
// geometry, so it must not inherit the bias
params_dft.kv_mean_center_path.clear();
} else {
// MTP draft context lives on the target model, only context+compute are new
measure_model_bytes = false;
Expand Down Expand Up @@ -991,6 +995,10 @@ struct server_context_impl {
params_dft.n_gpu_layers = params_spec.n_gpu_layers;
params_dft.cache_type_k = params_spec.cache_type_k;
params_dft.cache_type_v = params_spec.cache_type_v;
// the K-cache mean-center bias is calibrated for the target model
// (per-head/channel K layout); the draft model has a different K
// geometry, so it must not inherit the bias
params_dft.kv_mean_center_path.clear();

if (params_spec.cpuparams.n_threads > 0) {
params_dft.cpuparams.n_threads = params_spec.cpuparams.n_threads;
Expand Down
Loading