kshitijk
commited on
Commit
•
fa23bcc
1
Parent(s):
5e6e43b
Reduce model size
Browse files
app.py
CHANGED
@@ -38,19 +38,16 @@ def getVectorIndex(docs):
|
|
38 |
Settings.chunk_size = 512
|
39 |
index_set = {}
|
40 |
|
41 |
-
storage_context = StorageContext.from_defaults(
|
42 |
-
cur_index =
|
43 |
-
|
44 |
-
)
|
45 |
-
#cur_index = VectorStoreIndex.from_documents(docs, embed_model = getEmbedModel(), storage_context=storage_context)
|
46 |
-
#storage_context.persist(persist_dir=f"./storage/book_data")
|
47 |
return cur_index
|
48 |
|
49 |
|
50 |
def getLLM():
|
51 |
|
52 |
-
model_path = "NousResearch/Llama-2-13b-chat-hf"
|
53 |
-
|
54 |
|
55 |
llm = HuggingFaceLLM(
|
56 |
context_window=3900,
|
|
|
38 |
Settings.chunk_size = 512
|
39 |
index_set = {}
|
40 |
|
41 |
+
storage_context = StorageContext.from_defaults()
|
42 |
+
cur_index = VectorStoreIndex.from_documents(docs, embed_model = getEmbedModel(), storage_context=storage_context)
|
43 |
+
storage_context.persist(persist_dir=f"./storage/book_data")
|
|
|
|
|
|
|
44 |
return cur_index
|
45 |
|
46 |
|
47 |
def getLLM():
|
48 |
|
49 |
+
# model_path = "NousResearch/Llama-2-13b-chat-hf"
|
50 |
+
model_path = "NousResearch/Llama-2-7b-chat-hf"
|
51 |
|
52 |
llm = HuggingFaceLLM(
|
53 |
context_window=3900,
|