From bf54c845e9ea63ec58762a991dcea78d2c934b47 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 30 May 2024 16:49:28 -0700 Subject: [PATCH] vocab only --- llm/llm.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/llm/llm.go b/llm/llm.go index 82a2d72d..ead691f0 100644 --- a/llm/llm.go +++ b/llm/llm.go @@ -47,11 +47,11 @@ func newLlamaModel(p string) *llamaModel { cs := C.CString(p) defer C.free(unsafe.Pointer(cs)) + params := C.llama_model_default_params() + params.vocab_only = true + return &llamaModel{ - C.llama_load_model_from_file( - cs, - C.llama_model_default_params(), - ), + C.llama_load_model_from_file(cs, params), } }