INNER CODE UNIT · Python

_frontend_only

invergent-ai/surogate · surogate/serve/tools/reference/qwen3_5/cli.py:252

def _frontend_only(
    parser: argparse.ArgumentParser,
    args: argparse.Namespace,
) -> None:
    """Cheap decode-disabled path for inputs that cannot contain media."""

    load_started = time.perf_counter()
    with ArtifactBinding.open(args.weights) as binding:
        frontend = Frontend(binding)
        load_seconds = time.perf_counter() - load_started
        preprocess_started = time.perf_counter()
        try:
            prompt = _load_prompt(frontend, args)
        except (OSError, RuntimeError, ValueError) as exc:
            parser.error(str(exc))
        preprocess_seconds = time.perf_counter() - preprocess_started
        _print_result(
            prompt=prompt,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…