clementsan
commited on
Commit
•
4ce7fc5
1
Parent(s):
ecf1633
Add error for zephyr-7b-gemma-v0.1 on free endpoint
Browse files
app.py
CHANGED
@@ -109,6 +109,14 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
|
|
109 |
top_k = top_k,
|
110 |
load_in_8bit = True,
|
111 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
elif llm_model == "microsoft/phi-2":
|
113 |
raise gr.Error("phi-2 model requires 'trust_remote_code=True', currently not supported by langchain HuggingFaceHub...")
|
114 |
llm = HuggingFaceEndpoint(
|
|
|
109 |
top_k = top_k,
|
110 |
load_in_8bit = True,
|
111 |
)
|
112 |
+
elif llm_model == "HuggingFaceH4/zephyr-7b-gemma-v0.1":
|
113 |
+
raise gr.Error("zephyr-7b-gemma-v0.1 is too large to be loaded automatically on free inference endpoint")
|
114 |
+
llm = HuggingFaceEndpoint(
|
115 |
+
repo_id=llm_model,
|
116 |
+
temperature = temperature,
|
117 |
+
max_new_tokens = max_tokens,
|
118 |
+
top_k = top_k,
|
119 |
+
)
|
120 |
elif llm_model == "microsoft/phi-2":
|
121 |
raise gr.Error("phi-2 model requires 'trust_remote_code=True', currently not supported by langchain HuggingFaceHub...")
|
122 |
llm = HuggingFaceEndpoint(
|