Spaces:
Build error
Build error
clementsan commited on
Commit ·
88fa380
1
Parent(s): 1e93bea
Add Mixtral-8x7B-Instruct-v0.1 model
Browse files19 unmodified lines202122232425261 unmodified line282930303132333428 unmodified lines636465656667686926 unmodified lines969798991001011021039810410510610719 unmodified lines
# default_persist_directory = './chroma_HF/'
llm_name0 = "mistralai/Mixtral-8x7B-Instruct-v0.1"llm_name1 = "mistralai/Mistral-7B-Instruct-v0.2"llm_name2 = "mistralai/Mistral-7B-Instruct-v0.1"llm_name3 = "meta-llama/Llama-2-7b-chat-hf"1 unmodified linellm_name5 = "mosaicml/mpt-7b-instruct"llm_name6 = "tiiuae/falcon-7b-instruct"llm_name7 = "google/flan-t5-xxl"list_llm = [llm_name1, llm_name2, llm_name3, llm_name4, llm_name5, llm_name6, llm_name7]list_llm = [llm_name0, llm_name1, llm_name2, llm_name3, llm_name4, llm_name5, llm_name6, llm_name7]list_llm_simple = [os.path.basename(llm) for llm in list_llm]
# Load PDF document and create doc splits28 unmodified linesdef load_db(): embedding = HuggingFaceEmbeddings() vectordb = Chroma( persist_directory=default_persist_directory, # persist_directory=default_persist_directory, embedding_function=embedding) return vectordb
26 unmodified lines # Use of trust_remote_code as model_kwargs # Warning: langchain issue # URL: https://github.com/langchain-ai/langchain/issues/6080 if llm_model == "mistralai/Mixtral-8x7B-Instruct-v0.1": llm = HuggingFaceHub( repo_id=llm_model, model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True} ) if llm_model == "microsoft/phi-2": elif llm_model == "microsoft/phi-2": llm = HuggingFaceHub( repo_id=llm_model, model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "trust_remote_code": True, "torch_dtype": "auto"}app.py+9-3