Spaces:
Paused
Paused
Commit
·
a97f4db
1
Parent(s):
0e49422
google/gemma-7b-it
Browse files- __pycache__/model.cpython-310.pyc +0 -0
- app.py +1 -1
- model.py +10 -3
- requirements.txt +3 -2
__pycache__/model.cpython-310.pyc
CHANGED
Binary files a/__pycache__/model.cpython-310.pyc and b/__pycache__/model.cpython-310.pyc differ
|
|
app.py
CHANGED
@@ -8,7 +8,7 @@ import streamlit as st
|
|
8 |
|
9 |
|
10 |
if "model" not in st.session_state:
|
11 |
-
st.session_state["model"] = "
|
12 |
|
13 |
# Initialize chat history
|
14 |
if "messages" not in st.session_state:
|
|
|
8 |
|
9 |
|
10 |
if "model" not in st.session_state:
|
11 |
+
st.session_state["model"] = "google/gemma-7b-it"
|
12 |
|
13 |
# Initialize chat history
|
14 |
if "messages" not in st.session_state:
|
model.py
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
-
from ctransformers import AutoModelForCausalLM
|
2 |
-
model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-OpenOrca-GGUF", model_file="mistral-7b-openorca.Q2_K.gguf", model_type="mistral")
|
3 |
|
4 |
-
#model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-Instruct-v0.2-GGUF")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#from ctransformers import AutoModelForCausalLM
|
2 |
+
#model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-OpenOrca-GGUF", model_file="mistral-7b-openorca.Q2_K.gguf", model_type="mistral")
|
3 |
|
4 |
+
#model = AutoModelForCausalLM.from_pretrained("TheBloke/Mistral-7B-Instruct-v0.2-GGUF")
|
5 |
+
|
6 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
7 |
+
|
8 |
+
#quantization_config = BitsAndBytesConfig(load_in_4bit=True)
|
9 |
+
|
10 |
+
tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b-it")
|
11 |
+
model = AutoModelForCausalLM.from_pretrained("google/gemma-7b-it")
|
requirements.txt
CHANGED
@@ -2,5 +2,6 @@ streamlit==1.31.1
|
|
2 |
pymupdf==1.23.18
|
3 |
chromadb==0.4.22
|
4 |
langchain==0.1.3
|
5 |
-
|
6 |
-
|
|
|
|
2 |
pymupdf==1.23.18
|
3 |
chromadb==0.4.22
|
4 |
langchain==0.1.3
|
5 |
+
transformers==4.38.2
|
6 |
+
accelerate==0.27.2
|
7 |
+
#ctransformers
|