浏览代码

Merge pull request #4624 from ollama/mxyng/fix-5

fix q5_0, q5_1
Michael Yang 11 月之前
父节点
当前提交
9a3c8003c8
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      llm/ggml.go

+ 2 - 2
llm/ggml.go

@@ -125,9 +125,9 @@ type Tensor struct {
 
 
 func (t Tensor) blockSize() uint64 {
 func (t Tensor) blockSize() uint64 {
 	switch t.Kind {
 	switch t.Kind {
-	case 0, 1, 24, 25, 26, 27, 28, 31: // F32, F16, I8, I16, I32, I64, F64, BF16
+	case 0, 1, 24, 25, 26, 27, 28, 30: // F32, F16, I8, I16, I32, I64, F64, BF16
 		return 1
 		return 1
-	case 2, 3, 8, 9, 20: // Q4_0, Q4_1, Q8_0, Q8_1, IQ4_NL
+	case 2, 3, 4, 5, 6, 7, 8, 9, 20: // Q4_0, Q4_1, Q5_0, Q5_1, Q8_0, Q8_1, IQ4_NL
 		return 32
 		return 32
 	default: // All others
 	default: // All others
 		return 256
 		return 256