Update examples

This commit is contained in:
Andrei Betlen
2023-03-23 23:12:42 -04:00
parent 2c25257c62
commit 8680332203
2 changed files with 26 additions and 4 deletions

View File

@@ -0,0 +1,14 @@
import json
import argparse
from llama_cpp import Llama
parser = argparse.ArgumentParser()
parser.add_argument("-m", "--model", type=str, default=".//models/...")
args = parser.parse_args()
llm = Llama(model_path=args.model)
output = llm("Question: What are the names of the planets in the solar system? Answer: ", max_tokens=48, stop=["Q:", "\n"], echo=True)
print(json.dumps(output, indent=2))