FlowCompile

Configuration

FlowCompile uses two YAML inputs:

Create a Local Config

Start from the provided example:

cp configs/config.example.yaml configs/config.yaml

Use configs/config.yaml for your local environment-specific values and keep the example file as the shareable template.

Model and Endpoint Setup

The model config has a top-level models map. Each entry is keyed by the alias used in experiment configs and compiled runtime settings.

Hosted Azure-style entries use fields like:

models:
  gpt-5-mini:
    api_type: "azure"
    azure_endpoint: "https://YOUR_AZURE_ENDPOINT"
    azure_deployment: "gpt-5-mini-2024-07-18"
    api_key: "YOUR_AZURE_API_KEY"
    api_version: "2024-10-21"

Local or proxy-hosted models can be exposed through an OpenAI-compatible endpoint:

models:
  qwen3-4b:
    api_type: "openai"
    base_url: "http://127.0.0.1:4000"
    api_key: "YOUR_PROXY_KEY"
    hf_model_name: "Qwen/Qwen3-4B"
    enable_thinking_budget: true
    thinking_budget_reasoning_parser: "qwen3"

hf_model_name is important when FlowCompile derives search model aliases from the latency benchmark model list.

When reproducing the paper-style local setup, use a vLLM plus LiteLLM flow:

  1. Start worker vllm servers.
  2. Start judge vllm servers.
  3. Update scripts/setup_vllm/litellm_config_1worker1judge.yaml with the correct worker and judge hosts.
  4. Start the LiteLLM proxy.
  5. Point entries in configs/config.yaml at the proxy endpoint and key.

Flat Experiment Config

The unified CLI takes an experiment config through --config. The current schema is flowcompile.flat.v1; nested legacy sections such as compile, runtime, models, defaults, and shared are rejected by the CLI.

Required flat keys:

The paper benchmark configs live under configs/examples/:

Optional flat keys control command defaults. Common examples include:

Runtime routing preferences are intentionally not read from YAML. Pass them on the runtime infer command line with --strategy, --budget, --min-accuracy, or --max-latency.

Search Space

The paper searches three axes:

By default, search models are derived from latency_models by matching each Hugging Face model name to exactly one hf_model_name entry in the model config. You can narrow the search at prediction time with CLI flags:

flowcompile --config "$CONFIG" predict \
  --search-axes model budget structure \
  --search-models qwen3-4b qwen3-8b \
  --search-budgets 200 1000 4000 \
  --search-agent-models sc_ensemble=qwen3-8b,qwen3-14b

Practical Notes