fix(mellea): increase num_predict 350→512 to avoid citations_dense truncation
Browse files- app/mellea_validator.py +5 -6
app/mellea_validator.py
CHANGED
|
@@ -357,15 +357,14 @@ def reconcile_strict_streaming(
|
|
| 357 |
{"role": "system", "content": system_prompt},
|
| 358 |
{"role": "user", "content": user_prompt},
|
| 359 |
]
|
| 360 |
-
# num_predict
|
| 361 |
-
#
|
| 362 |
-
#
|
| 363 |
-
#
|
| 364 |
-
# even on a dense prompt. Override with RIPRAP_MELLEA_NUM_PREDICT.
|
| 365 |
# num_ctx (Ollama only) is forwarded via extra_body; vLLM ignores it.
|
| 366 |
base_opts = {"temperature": 0,
|
| 367 |
"num_ctx": int(os.environ.get("RIPRAP_MELLEA_NUM_CTX", "4096")),
|
| 368 |
-
"num_predict": int(os.environ.get("RIPRAP_MELLEA_NUM_PREDICT", "
|
| 369 |
**(ollama_options or {})}
|
| 370 |
|
| 371 |
paragraph = ""
|
|
|
|
| 357 |
{"role": "system", "content": system_prompt},
|
| 358 |
{"role": "user", "content": user_prompt},
|
| 359 |
]
|
| 360 |
+
# num_predict 512 lets the 4-section briefing complete in one pass.
|
| 361 |
+
# Reconciler prompts run ~1200 tokens (after trim_docs_to_plan),
|
| 362 |
+
# so 1200+512=1712 comfortably under the vLLM max_model_len=2352.
|
| 363 |
+
# Override with RIPRAP_MELLEA_NUM_PREDICT if needed.
|
|
|
|
| 364 |
# num_ctx (Ollama only) is forwarded via extra_body; vLLM ignores it.
|
| 365 |
base_opts = {"temperature": 0,
|
| 366 |
"num_ctx": int(os.environ.get("RIPRAP_MELLEA_NUM_CTX", "4096")),
|
| 367 |
+
"num_predict": int(os.environ.get("RIPRAP_MELLEA_NUM_PREDICT", "512")),
|
| 368 |
**(ollama_options or {})}
|
| 369 |
|
| 370 |
paragraph = ""
|