feat: DeepSeek V4 Flash 0731 added
This commit is contained in:
@@ -223,10 +223,11 @@ pub(super) fn validate_main(model: &Gguf, expected: ModelChoice) -> Result<Shape
|
||||
};
|
||||
let shape = match family {
|
||||
ModelFamily::Glm => GLM,
|
||||
ModelFamily::DeepSeek => match model.u32("deepseek4.block_count")? {
|
||||
43 => FLASH,
|
||||
61 => PRO,
|
||||
layers => return Err(format!("unsupported DeepSeek layer count: {layers}")),
|
||||
ModelFamily::DeepSeek => match (model.u32("deepseek4.block_count")?, expected) {
|
||||
(43, ModelChoice::DeepSeekV4Flash0731) => FLASH_0731,
|
||||
(43, _) => FLASH,
|
||||
(61, _) => PRO,
|
||||
(layers, _) => return Err(format!("unsupported DeepSeek layer count: {layers}")),
|
||||
},
|
||||
};
|
||||
if shape.model != expected {
|
||||
@@ -993,10 +994,18 @@ fn float_eq(actual: f32, expected: f32) -> bool {
|
||||
|
||||
fn compression_ratio(shape: &Shape, layer: u32) -> u32 {
|
||||
match shape.model {
|
||||
ModelChoice::DeepSeekV4Flash if layer < 2 => 0,
|
||||
ModelChoice::DeepSeekV4Flash | ModelChoice::DeepSeekV4Flash0731 if layer < 2 => 0,
|
||||
ModelChoice::DeepSeekV4Pro if layer < 2 => 128,
|
||||
ModelChoice::DeepSeekV4Flash | ModelChoice::DeepSeekV4Pro if layer.is_multiple_of(2) => 4,
|
||||
ModelChoice::DeepSeekV4Flash | ModelChoice::DeepSeekV4Pro => 128,
|
||||
ModelChoice::DeepSeekV4Flash
|
||||
| ModelChoice::DeepSeekV4Flash0731
|
||||
| ModelChoice::DeepSeekV4Pro
|
||||
if layer.is_multiple_of(2) =>
|
||||
{
|
||||
4
|
||||
}
|
||||
ModelChoice::DeepSeekV4Flash
|
||||
| ModelChoice::DeepSeekV4Flash0731
|
||||
| ModelChoice::DeepSeekV4Pro => 128,
|
||||
ModelChoice::Glm52 => 0,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user