@Logan M Idk why, but I'm getting this error when trying to use llama-cpp. I've provided the path to the ggml bin file, and yet getting this. Am I missing something? I'm on M1, MacOS.
---> 15 llm = LlamaCPP(
16 # You can pass in the URL to a GGML model to download it automatically
17
18 model_path='./llama-2-13b-chat.ggmlv3.q4_0.bin',
19 temperature=1,
20 max_new_tokens=4096,
21 # llama2 has a context window of 4096 tokens, but we set it lower to allow for some wiggle room
22 context_window=3900,
23 # kwargs to pass to __call__()
24 generate_kwargs={},
25 # kwargs to pass to __init__()
26 # set to at least 1 to use GPU
27 model_kwargs={"n_gpu_layers": 1},
28 # transform inputs into Llama2 format
29 messages_to_prompt=messages_to_prompt,
30 completion_to_prompt=completion_to_prompt,
31 verbose=True,
32 )
...
97 raise ValueError(
98 "Provided model path does not exist. "
99 "Please check the path or provide a model_url to download."
100 )
101 else:
--> 102 self._model = Llama(model_path=model_path, **model_kwargs)
103 else:
104 cache_dir = get_cache_dir()
320 with suppress_stdout_stderr():
321 self.model =
...
llama_cpp.llama_load_model_from_file(
322 self.model_path.encode("utf-8"), self.params
323 )
--> 324 assert self.model is not None
326 if verbose:
327 self.ctx = llama_cpp.llama_new_context_with_model(self.model, self.params)
AssertionError: