Skip to content

Commit

Permalink
Some minor adjustments.
Browse files Browse the repository at this point in the history
  • Loading branch information
souradipp76 committed Apr 29, 2024
1 parent 3da584c commit 5bf7023
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion doc_generator/autodoc/docs/data/docstore.json

Large diffs are not rendered by default.

Binary file modified doc_generator/autodoc/docs/data/hnswlib.index
Binary file not shown.
4 changes: 2 additions & 2 deletions doc_generator/query/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def query(repo_config: AutodocRepoConfig, user_confg: AutodocUserConfig):
print('Thinking...')
try:
response = chain.invoke({'question': question, 'chat_history': chat_history})
chat_history.append((question, response['text']))
chat_history.append((question, response['answer']))
print('\n\nMarkdown:\n')
print(markdown(response['text']))
print(markdown(response['answer']))
except Exception as error:
print(f"Something went wrong: {error}")
traceback.print_exc()
6 changes: 3 additions & 3 deletions doc_generator/utils/LLMUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

def get_chat_model(model_name: str, model_kwargs):
config = AutoConfig.from_pretrained(model_name)
config.quantization_config["disable_exllama"] = True
config.quantization_config["exllama_config"] = {"version":2}
# config.quantization_config["disable_exllama"] = True
# config.quantization_config["exllama_config"] = {"version":2}
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
model_name,
Expand Down Expand Up @@ -117,7 +117,7 @@ def total_index_cost_estimate(model):
def get_embeddings(model:str):
if model == LLMModels.LLAMA2_7B_CHAT_GPTQ.value:
return HuggingFaceEmbeddings(model_name="sentence-transformers/all-mpnet-base-v2",
# model_kwargs={"device": "cuda"},
model_kwargs={"device": "cuda"},
encode_kwargs={"normalize_embeddings": True},
)
else:
Expand Down

0 comments on commit 5bf7023

Please sign in to comment.