Spaces:
Build error
Build error
clementsan commited on
Commit ·
fa4eb33
1
Parent(s): 1ef8d7c
Raise errors for phi-2 and llama-2 models
Browse files108 unmodified lines1091101111121131141153 unmodified lines119120121122123124125126127128129130108 unmodified lines model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k, "load_in_8bit": True} ) elif llm_model == "microsoft/phi-2": raise gr.Error("phi-2 model requires 'trust_remote_code=True', currently not supported by langchain HuggingFaceHub...") 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"}3 unmodified lines repo_id=llm_model, model_kwargs={"temperature": temperature, "max_new_tokens": 250, "top_k": top_k} ) elif llm_model == "meta-llama/Llama-2-7b-chat-hf": raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...") llm = HuggingFaceHub( repo_id=llm_model, model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k} ) else: llm = HuggingFaceHub( repo_id=llm_model, app.py+7