A minimal image-input (VLM) run. Each harness gets the same
polar_stars.png in its workspace, inspects it, and writes the number of
visible stars to answer.txt. Use it to check that harnesses can work from an
image through the local OpenAI-compatible inference backend.
Install Polar and one inference backend — vLLM or SGLang — as described in the top-level README. This example assumes 1 node 8×H100.
Adjust the setup and topology for your hardware.
uv run python examples/count_stars/build_image.pyPick one backend (don't install both in the same environment). The served model must be a
vision-language model (Qwen/Qwen3.6-27B is multimodal).
vLLM → use topology.vllm.yaml
CUDA_VISIBLE_DEVICES=0,1,2,3 uv run vllm serve Qwen/Qwen3.6-27B --port 8000 \
--tensor-parallel-size 4 --max-model-len 262144 \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coder
CUDA_VISIBLE_DEVICES=4,5,6,7 uv run vllm serve Qwen/Qwen3.6-27B --port 8001 \
--tensor-parallel-size 4 --max-model-len 262144 \
--reasoning-parser qwen3 --enable-auto-tool-choice --tool-call-parser qwen3_coderSGLang → use topology.sgl.yaml
CUDA_VISIBLE_DEVICES=0,1,2,3 uv run python -m sglang.launch_server --model-path Qwen/Qwen3.6-27B --port 8000 \
--tp 4 --context-length 262144 --mem-fraction-static 0.85 \
--reasoning-parser qwen3 --tool-call-parser qwen3_coder
CUDA_VISIBLE_DEVICES=4,5,6,7 uv run python -m sglang.launch_server --model-path Qwen/Qwen3.6-27B --port 8001 \
--tp 4 --context-length 262144 --mem-fraction-static 0.85 \
--reasoning-parser qwen3 --tool-call-parser qwen3_coderUse the topology file that matches your backend (topology.vllm.yaml shown; swap for topology.sgl.yaml):
uv run polar serve_rollout -c examples/count_stars/topology.vllm.yaml
uv run polar serve_gateway -c examples/count_stars/topology.vllm.yaml --node-id localhost-node-01
uv run polar serve_gateway -c examples/count_stars/topology.vllm.yaml --node-id localhost-node-02Submits example harness at once and prints a completion comparison. The same command works for either backend — it just talks to the rollout server (the inference engine is whichever one you started in steps 2–3):
uv run python examples/count_stars/run.pyUse Apptainer instead of Docker with --backend apptainer.
topology.vllm.yaml shown; swap for topology.sgl.yaml if you use sglang.
uv run polar dashboard -c examples/count_stars/topology.vllm.yamlOpen http://127.0.0.1:8090 to inspect each harness's image reasoning and the answer it wrote.