md-vasim commited on
Commit
a5c729e
1 Parent(s): d1caba8

model changed to gguf

Browse files
app/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (159 Bytes). View file
 
app/__pycache__/views.cpython-310.pyc ADDED
Binary file (1.36 kB). View file
 
app/views.py CHANGED
@@ -39,4 +39,4 @@ with gr.Blocks(
39
 
40
 
41
  # mounting at the path
42
- app = gr.mount_gradio_app(app, llama2bot.queue(concurrency_count=20), path="/llama2")
 
39
 
40
 
41
  # mounting at the path
42
+ app = gr.mount_gradio_app(app, llama2bot, path="/llama2")
src/__pycache__/__init__.cpython-310.pyc ADDED
Binary file (159 Bytes). View file
 
src/__pycache__/chains.cpython-310.pyc ADDED
Binary file (978 Bytes). View file
 
src/__pycache__/grutils.cpython-310.pyc ADDED
Binary file (790 Bytes). View file
 
src/chains.py CHANGED
@@ -1,9 +1,14 @@
1
  from langchain.llms import CTransformers
2
- from langchain import PromptTemplate, LLMChain
 
 
3
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
4
 
 
 
5
 
6
- llm = CTransformers(model="TheBloke/Llama-2-7B-Chat-GGML", model_file = 'llama-2-7b-chat.ggmlv3.q2_K.bin', callbacks=[StreamingStdOutCallbackHandler()])
 
7
 
8
 
9
  template = """
 
1
  from langchain.llms import CTransformers
2
+ # from langchain import PromptTemplate, LLMChain
3
+ from langchain.chains import LLMChain
4
+ from langchain.prompts import PromptTemplate
5
  from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler
6
 
7
+ ggufmodel = f"TheBloke/Llama-2-7B-Chat-GGUF"
8
+ ggufmodelfile = f"llama-2-7b-chat.Q5_K_M.gguf"
9
 
10
+ # llm = CTransformers(model="TheBloke/Llama-2-7B-Chat-GGML", model_file = 'llama-2-7b-chat.ggmlv3.q2_K.bin', callbacks=[StreamingStdOutCallbackHandler()])
11
+ llm = CTransformers(model=ggufmodel, model_file = ggufmodelfile, callbacks=[StreamingStdOutCallbackHandler()])
12
 
13
 
14
  template = """