Josh Yan 9 months ago
parent
commit
d82d25d70c
2 changed files with 4 additions and 4 deletions
  1. 2 1
      llm/llm.go
  2. 2 3
      llm/patches/10-quantize-callback.diff

+ 2 - 1
llm/llm.go

@@ -28,7 +28,8 @@ func SystemInfo() string {
 	return C.GoString(C.llama_print_system_info())
 	return C.GoString(C.llama_print_system_info())
 }
 }
 
 
-func Quantize(infile, outfile string, ftype fileType, fn func(resp api.ProgressResponse), tensorCount int) error {	cinfile := C.CString(infile)
+func Quantize(infile, outfile string, ftype fileType, fn func(resp api.ProgressResponse), tensorCount int) error {	
+	cinfile := C.CString(infile)
 	defer C.free(unsafe.Pointer(cinfile))
 	defer C.free(unsafe.Pointer(cinfile))
 
 
 	coutfile := C.CString(outfile)
 	coutfile := C.CString(outfile)

+ 2 - 3
llm/patches/10-quantize-callback.diff

@@ -44,10 +44,9 @@ index 2b9ace28..ac640c02 100644
          /*.imatrix                     =*/ nullptr,
          /*.imatrix                     =*/ nullptr,
          /*.kv_overrides                =*/ nullptr,
          /*.kv_overrides                =*/ nullptr,
 +        /*.quantize_callback           =*/ nullptr,
 +        /*.quantize_callback           =*/ nullptr,
-++       /*.quantize_callback_data      =*/ nullptr,
++        /*.quantize_callback_data      =*/ nullptr,
      };
      };
  
  
      return result;
      return result;
 -- 
 -- 
-2.39.3 (Apple Git-146)
-
+2.39.3 (Apple Git-146)