Views
No views yet
pip install llama-cpp-pythonfrom llama_cpp import Llama1llm = Llama(model_path="/your-path/model.gguf", chat_format="llama-2")
2
3prompt = "explain the large language models"
4
5output = llm(prompt, max_tokens=300)
6print(output['choices'][0]['text'])