mirror of
https://github.com/abetlen/llama-cpp-python.git
synced 2023-09-07 17:34:22 +03:00
Initial commit
This commit is contained in:
8
examples/basic.py
Normal file
8
examples/basic.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import json
|
||||
from llama_cpp import Llama
|
||||
|
||||
llm = Llama(model_path="models/...")
|
||||
|
||||
output = llm("Q: Name the planets in the solar system? A: ", max_tokens=32, stop=["Q:", "\n"], echo=True)
|
||||
|
||||
print(json.dumps(output, indent=2))
|
||||
Reference in New Issue
Block a user