From e59453982df36146727b3f012c6bdb84cd3d1b07 Mon Sep 17 00:00:00 2001 From: Josh Yan Date: Tue, 9 Jul 2024 17:12:02 -0700 Subject: [PATCH] logs --- llm/llm.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/llm/llm.go b/llm/llm.go index 3e44a28b6..1008ee200 100644 --- a/llm/llm.go +++ b/llm/llm.go @@ -11,7 +11,7 @@ package llm // #include // #include "llama.h" // bool update_quantize_progress(float progress, void* data) { -// *((float*)data) = 5; +// *((float*)data) = progress; // return true; // } import "C" @@ -58,12 +58,11 @@ func Quantize(infile, outfile string, ftype fileType, fn func(resp api.ProgressR for { select { case <-ticker.C: - progress := *((*C.float)(store)) fn(api.ProgressResponse{ - Status: fmt.Sprintf("quantizing model %d%%", int(progress*100)), + Status: fmt.Sprintf("quantizing model %d%%", int(*((*C.float)(store))*100)), Quantize: "quant", }) - fmt.Println("Progress: ", progress) + fmt.Println("Progress: ", *((*C.float)(store))) case <-done: fn(api.ProgressResponse{ Status: "quantizing model",