kshitijk commited on
Commit
fa23bcc
1 Parent(s): 5e6e43b

Reduce model size

Browse files
Files changed (1) hide show
  1. app.py +5 -8
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(persist_dir=f"./storage/book_data")
42
- cur_index = load_index_from_storage(
43
- storage_context,embed_model = getEmbedModel()
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
- # model_path = "meta-llama/Llama-2-13b-chat-hf"
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,