feat: configure 32k context for protocol generation
This commit is contained in:
@@ -30,6 +30,7 @@ from src.meeting_lab.models.meeting_context import (
|
||||
from src.meeting_lab.progress import ProgressEvent, ProgressSink, ProgressStatus
|
||||
from src.meeting_lab.protocol.generate_direct_protocol import (
|
||||
DEFAULT_MODEL,
|
||||
DEFAULT_NUM_CTX,
|
||||
DEFAULT_SAFE_INPUT_TOKEN_BUDGET,
|
||||
DirectProtocolResult,
|
||||
generate_direct_protocol,
|
||||
@@ -55,6 +56,7 @@ class MvpMeetingConfig:
|
||||
threads: str | int = "auto"
|
||||
model: str = DEFAULT_MODEL
|
||||
ollama_endpoint: str = DEFAULT_ENDPOINT
|
||||
protocol_num_ctx: int = DEFAULT_NUM_CTX
|
||||
protocol_safe_input_token_budget: int = DEFAULT_SAFE_INPUT_TOKEN_BUDGET
|
||||
diarization: str = "off"
|
||||
diarization_runtime: str = "native"
|
||||
@@ -131,6 +133,8 @@ def _validate_inputs(
|
||||
raise ValueError("A diarization container image is required.")
|
||||
if config.protocol_safe_input_token_budget <= 0:
|
||||
raise ValueError("Protocol safe input token budget must be positive.")
|
||||
if config.protocol_num_ctx <= 0:
|
||||
raise ValueError("Protocol Ollama context size must be positive.")
|
||||
|
||||
|
||||
def _emit(
|
||||
@@ -363,6 +367,7 @@ def run_mvp_meeting(
|
||||
preserved_context,
|
||||
model=config.model,
|
||||
endpoint=config.ollama_endpoint,
|
||||
num_ctx=config.protocol_num_ctx,
|
||||
safe_input_token_budget=config.protocol_safe_input_token_budget,
|
||||
)
|
||||
stage_runtimes["protocol"] = round(time.perf_counter() - stage_started, 3)
|
||||
|
||||
@@ -33,7 +33,7 @@ DEFAULT_MODEL = "qwen3.6:35B-A3B"
|
||||
DEFAULT_NUM_CTX = 32768
|
||||
DEFAULT_NUM_PREDICT = 8192
|
||||
DEFAULT_TIMEOUT = 1800
|
||||
DEFAULT_SAFE_INPUT_TOKEN_BUDGET = 16_200
|
||||
DEFAULT_SAFE_INPUT_TOKEN_BUDGET = 29_000
|
||||
ESTIMATED_UTF8_BYTES_PER_TOKEN = 4.4
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user