File size: 324 Bytes
0ede608
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# !pip install llama-cpp-python
import gradio as gr
from huggingface_hub import InferenceClient
from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="gultar/OpenHermes-Llama-3b-GGUF",
	filename="openhermes-llama-3b-q5_0.gguf",
)

output = llm(
	"Once upon a time,",
	max_tokens=512,
	echo=True
)

print(output)