Support DeepSeek V4 Flash 0731

This commit is contained in:
Georg Bauer
2026-08-29 20:28:50 +02:00
parent ad855b321e
commit f1c177b754
23 changed files with 10510 additions and 2324 deletions

View File

@@ -337,7 +337,7 @@ mod tests {
assert_eq!(ModelChoice::Glm52.main_artifact().size, 211_075_856_448);
assert_eq!(
ModelChoice::DeepSeekV4Flash0731.main_artifact().size,
86_720_111_520
86_720_111_488
);
assert_eq!(
ModelChoice::DeepSeekV4Flash.artifacts(true, true).count(),
@@ -348,7 +348,7 @@ mod tests {
ModelChoice::DeepSeekV4Flash0731
.artifacts(true, true)
.count(),
1
2
);
let id = SystemTime::now()
@@ -365,8 +365,14 @@ mod tests {
engine.mtp.as_deref().and_then(Path::file_name),
Some(std::ffi::OsStr::new(FLASH_DSPARK.file_name))
);
let flash_0731 =
engine_artifacts(ModelChoice::DeepSeekV4Flash0731, false, true, &models_path);
assert_eq!(
flash_0731.mtp.as_deref().and_then(Path::file_name),
Some(std::ffi::OsStr::new(FLASH_0731_DSPARK.file_name))
);
assert!(
engine_artifacts(ModelChoice::DeepSeekV4Flash0731, true, true, &models_path)
engine_artifacts(ModelChoice::DeepSeekV4Flash0731, true, false, &models_path)
.mtp
.is_none()
);
@@ -389,6 +395,36 @@ mod tests {
.unwrap(),
empty.sha256
);
let installed = empty.path(ModelChoice::DeepSeekV4Flash, &models_path);
assert!(empty.validate_installed_path(&installed).is_ok());
let wrong_name = installed.with_file_name("wrong-checkpoint.gguf");
fs::write(&wrong_name, []).unwrap();
fs::write(wrong_name.with_extension("gguf.sha256"), empty.sha256).unwrap();
assert!(empty.validate_installed_path(&wrong_name).is_err());
assert!(
validate_engine_artifacts(
ModelChoice::DeepSeekV4Flash0731,
true,
false,
&EngineArtifacts {
model: installed.clone(),
mtp: None,
},
)
.is_err()
);
assert!(
validate_engine_artifacts(
ModelChoice::DeepSeekV4Pro,
false,
true,
&EngineArtifacts {
model: installed,
mtp: None,
},
)
.is_err()
);
fs::remove_dir_all(models_path).unwrap();
}