models: enable deepseek2 (deepseek v3.1 w/ MLA) on the new engine (#13151)

This commit is contained in:
Patrick Devine
2025-11-18 22:03:50 -08:00
committed by GitHub
parent 53985b3c4d
commit 604e43b28d
2 changed files with 6 additions and 0 deletions

View File

@@ -250,6 +250,7 @@ func (kv KV) OllamaEngineRequired() bool {
"qwen3", "qwen3moe",
"qwen3vl", "qwen3vlmoe",
"deepseekocr",
"deepseek2",
}, kv.Architecture())
}

View File

@@ -236,6 +236,11 @@ type Model struct {
}
func New(c fs.Config) (model.Model, error) {
if c.Uint("attention.key_length_mla") == 0 {
// non-MLA models aren't yet supported
return nil, model.ErrUnsupportedModel
}
layers := make([]Layer, c.Uint("block_count"))
firstDenseLayerIndex := int(c.Uint("leading_dense_block_count"))