fix model type for 70b

This commit is contained in:
Michael Yang
2023-09-12 10:52:57 -07:00
parent 7dee25a07f
commit 0c5a454361
2 changed files with 15 additions and 3 deletions

View File

@@ -99,6 +99,12 @@ func (llm *ggufModel) ModelType() string {
switch llm.ModelFamily() {
case "llama":
if blocks, ok := llm.kv["llama.block_count"].(uint32); ok {
heads, headsOK := llm.kv["llama.head_count"].(uint32)
headKVs, headsKVsOK := llm.kv["llama.head_count_kv"].(uint32)
if headsOK && headsKVsOK && heads/headKVs == 8 {
return "70B"
}
return llamaModelType(blocks)
}
case "falcon":