Spaces:
Running
Running
new model
Browse files
app.py
CHANGED
|
@@ -185,16 +185,18 @@ qa_prompt = ChatPromptTemplate.from_template(
|
|
| 185 |
# Requiere el secreto HUGGINGFACEHUB_API_TOKEN en el Space
|
| 186 |
llm = HuggingFaceEndpoint(
|
| 187 |
repo_id="mistralai/Mixtral-8x7B-v0.1",
|
| 188 |
-
task="text-generation",
|
| 189 |
-
model_kwargs
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN"),
|
| 197 |
-
timeout=120,
|
|
|
|
|
|
|
| 198 |
)
|
| 199 |
|
| 200 |
|
|
|
|
| 185 |
# Requiere el secreto HUGGINGFACEHUB_API_TOKEN en el Space
|
| 186 |
llm = HuggingFaceEndpoint(
|
| 187 |
repo_id="mistralai/Mixtral-8x7B-v0.1",
|
| 188 |
+
task="text-generation", # ok para Mixtral
|
| 189 |
+
# estos parámetros VAN afuera de model_kwargs:
|
| 190 |
+
max_new_tokens=2000,
|
| 191 |
+
temperature=0.1,
|
| 192 |
+
top_k=30,
|
| 193 |
+
repetition_penalty=1.03,
|
| 194 |
+
return_full_text=False,
|
| 195 |
+
# token del Space
|
| 196 |
huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN"),
|
| 197 |
+
timeout=120, # opcional
|
| 198 |
+
# deja model_kwargs vacío o úsalo solo para args que no tengan campo dedicado
|
| 199 |
+
model_kwargs={},
|
| 200 |
)
|
| 201 |
|
| 202 |
|