Views
No views yet

1
2# pip install pip install llama-cpp-python
3
4from llama_cpp import Llama
5
6# Load the model (update the path to where your .gguf file is)
7llm = Llama(model_path="path/to/the/file/NeoMini_3B.gguf")
8
9# Create chat completion
10response = llm.create_chat_completion(
11 messages=[{"role": "user", "content": "Create a Haiku about AI"}]
12)
13
14# Print the generated text
15print(response.choices[0].message["content"])
16
17