Support DeepSeek V4 Pro execution

This commit is contained in:
Georg Bauer
2026-07-26 12:02:06 +02:00
parent 3c75b8f6c1
commit 1de954b579
4 changed files with 40 additions and 25 deletions

View File

@@ -225,7 +225,7 @@ impl Executor {
let mut indexer_rows = Vec::with_capacity(shape.layers as usize);
for layer in 0..shape.layers {
let rows = read_u32(file)?;
let ratio = compression_ratio(layer);
let ratio = compression_ratio(shape, layer);
if rows != token_count.checked_div(ratio).unwrap_or(0) {
return Err("KV checkpoint compressed row count is invalid".into());
}
@@ -233,7 +233,7 @@ impl Executor {
}
for layer in 0..shape.layers {
let rows = read_u32(file)?;
let expected = if compression_ratio(layer) == 4 {
let expected = if compression_ratio(shape, layer) == 4 {
token_count / 4
} else {
0