diff --git a/llm/falcon.go b/llm/falcon.go index 5713b218..d45eb9ef 100644 --- a/llm/falcon.go +++ b/llm/falcon.go @@ -1,7 +1,5 @@ package llm -const ModelFamilyFalcon = "falcon" - const ( falconModelType7B = 32 falconModelType40B = 60 @@ -17,6 +15,6 @@ func falconModelType(numLayer uint32) string { case 80: return "180B" default: - return "Unknown" + return "unknown" } } diff --git a/llm/ggml.go b/llm/ggml.go index 929a7af6..dc0d2cd3 100644 --- a/llm/ggml.go +++ b/llm/ggml.go @@ -69,7 +69,7 @@ func fileType(fileType uint32) string { case fileTypeQ6_K: return "Q6_K" default: - return "Unknown" + return "unknown" } } diff --git a/llm/gguf.go b/llm/gguf.go index 11cad083..1c5e73b3 100644 --- a/llm/gguf.go +++ b/llm/gguf.go @@ -109,9 +109,13 @@ func (llm *ggufModel) ModelType() string { if blocks, ok := llm.kv["falcon.block_count"].(uint32); ok { return falconModelType(blocks) } + case "starcoder": + if blocks, ok := llm.kv["starcoder.block_count"].(uint32); ok { + return starCoderModelType(blocks) + } } - return "Unknown" + return "unknown" } func (llm *ggufModel) FileType() string { @@ -120,7 +124,7 @@ func (llm *ggufModel) FileType() string { return fileType(t) } - return "Unknown" + return "unknown" } func (llm *ggufModel) Decode(r io.Reader) error { diff --git a/llm/llama.go b/llm/llama.go index f23d5d85..f9bb451d 100644 --- a/llm/llama.go +++ b/llm/llama.go @@ -143,7 +143,7 @@ func llamaModelType(numLayer uint32) string { case 80: return "65B" default: - return "Unknown" + return "unknown" } } diff --git a/llm/starcoder.go b/llm/starcoder.go new file mode 100644 index 00000000..00fc51bc --- /dev/null +++ b/llm/starcoder.go @@ -0,0 +1,23 @@ +package llm + +const ( + starCoderModelType1B = 24 + starCoderModelType3B = 36 + starCoderModelType7B = 42 + starCoderModelType15B = 40 +) + +func starCoderModelType(numLayer uint32) string { + switch numLayer { + case 24: + return "1B" + case 36: + return "3B" + case 42: + return "7B" + case 40: + return "15B" + default: + return "unknown" + } +}