marinarosa commited on
Commit
c7d2fe9
·
1 Parent(s): a514c37

Raise Q&A max output tokens to 2048

Browse files

Raise the generation budget from 768 to 2048 tokens in both the
transformers and llama.cpp Q&A adapters. With thinking enabled the
reasoning trace consumes output budget before the answer starts, and a
768-token cap risks truncating the trace, which the strippers now
convert into an empty answer rather than leaked reasoning.

The 32k context window leaves ample room, and the 1B model on the
ZeroGPU a10g stays well inside the 90-second GPU task duration even at
the full budget.

src/vivamais/adapters/models/llama_cpp.py CHANGED
@@ -365,7 +365,7 @@ QA_VARIANT = ModelVariant(
365
 
366
 
367
  QA_TEMPERATURE = 0.2
368
- QA_MAX_TOKENS = 768
369
  QA_N_CTX_DEFAULT = 32768
370
 
371
 
 
365
 
366
 
367
  QA_TEMPERATURE = 0.2
368
+ QA_MAX_TOKENS = 2048
369
  QA_N_CTX_DEFAULT = 32768
370
 
371
 
src/vivamais/adapters/models/transformers_text.py CHANGED
@@ -36,7 +36,7 @@ def _zero_gpu_active() -> bool:
36
 
37
 
38
  DEFAULT_QA_MODEL = "marinarosa/MiniCPM5-1B-PTBR-v3"
39
- QA_MAX_NEW_TOKENS = 768
40
  QA_GPU_DURATION_SECONDS = 90
41
  STREAM_CHUNK_TIMEOUT_SECONDS = 60
42
  QA_TEMPERATURE = 0.2
 
36
 
37
 
38
  DEFAULT_QA_MODEL = "marinarosa/MiniCPM5-1B-PTBR-v3"
39
+ QA_MAX_NEW_TOKENS = 2048
40
  QA_GPU_DURATION_SECONDS = 90
41
  STREAM_CHUNK_TIMEOUT_SECONDS = 60
42
  QA_TEMPERATURE = 0.2
tests/unit/adapters/test_llama_cpp.py CHANGED
@@ -200,7 +200,7 @@ class TestMiniCPM5TextModel:
200
  model.generate([{"role": "user", "content": "q"}])
201
  _, kwargs = fake.create_chat_completion.call_args
202
  assert kwargs["temperature"] == 0.2
203
- assert kwargs["max_tokens"] == 768
204
 
205
  def test_default_context_window_is_32k(self) -> None:
206
  from vivamais.adapters.models.llama_cpp import MiniCPM5TextModel
 
200
  model.generate([{"role": "user", "content": "q"}])
201
  _, kwargs = fake.create_chat_completion.call_args
202
  assert kwargs["temperature"] == 0.2
203
+ assert kwargs["max_tokens"] == 2048
204
 
205
  def test_default_context_window_is_32k(self) -> None:
206
  from vivamais.adapters.models.llama_cpp import MiniCPM5TextModel