Spaces:
Runtime error
Runtime error
Update app.py
Browse files123445767892 unmodified lines1213141617151617181943 unmodified lines6364656766676869import gradio as grimport copyimport timeimport ctypes # to run on C api directlyimport llama_cppfrom llama_cpp import Llamafrom huggingface_hub import hf_hub_download # load from huggingfacesfrom huggingface_hub import hf_hub_download
llm = Llama(2 unmodified lines filename="llama-2-7b-chat.ggmlv3.q5_0.bin", ), n_ctx=2048, n_gpu_layers=500,) # download model from hf/ n_ctx=2048 for high ccontext length n_gpu_layers=500, # change n_gpu_layers if you have more or less VRAM )
history = []
43 unmodified linesdemo = gr.ChatInterface( generate_text, title="llama-cpp-python on GPU", description="Running LLM with https://github.com/abetlen/llama-cpp-python. btw the text streaming thing was the hardest thing to impliment", description="Running LLM with https://github.com/abetlen/llama-cpp-python", examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"], cache_examples=True, retry_btn=None,app.py+4-5