@@ -14,6 +14,7 @@ UV := uv
1414RUFF := ruff
1515TYPECHECK := basedpyright
1616RUNS ?= 5
17+ INSTANCES ?= 1
1718
1819help : # # Show this help message
1920 @echo " $( BLUE) BalatroLLM Development Makefile$( RESET) "
@@ -76,15 +77,20 @@ clean: ## Clean build artifacts and caches
7677 @echo " $( GREEN) ✓ Cleanup completed$( RESET) "
7778
7879# Game targets
79- setup : # # Kill previous instances and start LiteLLM server + Balatro
80+ setup : # # Kill previous instances and start LiteLLM server + Balatro (INSTANCES=1)
8081 @echo " $( YELLOW) Stopping all previous instances...$( RESET) "
8182 @pkill -f litellm 2> /dev/null || true
8283 @./balatro.sh --kill 2> /dev/null || true
8384 @echo " $( YELLOW) Starting LiteLLM proxy server...$( RESET) "
8485 @litellm --config config/litellm.yaml &
8586 @sleep 3
86- @echo " $( YELLOW) Starting Balatro...$( RESET) "
87- @./balatro.sh
87+ @echo " $( YELLOW) Starting Balatro with $( INSTANCES) instance(s)...$( RESET) "
88+ @ports=" " ; \
89+ for i in $$ (seq 0 $$ (( $(INSTANCES) - 1 )) ); do \
90+ port=$$((12346 + i ) ); \
91+ ports=" $$ ports -p $$ port" ; \
92+ done ; \
93+ ./balatro.sh $$ ports
8894
8995teardown : # # Stop LiteLLM server and Balatro processes
9096 @echo " $( YELLOW) Stopping LiteLLM proxy server...$( RESET) "
@@ -93,18 +99,20 @@ teardown: ## Stop LiteLLM server and Balatro processes
9399 @./balatro.sh --kill 2> /dev/null || true
94100 @echo " $( GREEN) ✓ Services stopped$( RESET) "
95101
96- balatrobench : # # Run benchmark for all models and generate analysis (RUNS=5)
97- @echo " $( YELLOW) Starting benchmark runs for all models ($( RUNS) runs each)...$( RESET) "
98- @echo " $( YELLOW) Running openai/gpt-oss-120b...$( RESET) "
99- @balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model openai/gpt-oss-120b || true
100- @echo " $( YELLOW) Running openai/gpt-oss-20b...$( RESET) "
101- @balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model openai/gpt-oss-20b || true
102- @echo " $( YELLOW) Running qwen/qwen3-235b-a22b-thinking-2507...$( RESET) "
103- @balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model qwen/qwen3-235b-a22b-thinking-2507 || true
104- @echo " $( YELLOW) Running qwen/qwen3-235b-a22b-2507...$( RESET) "
105- @balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model qwen/qwen3-235b-a22b-2507 || true
106- @echo " $( YELLOW) Running google/gemini-2.5-flash...$( RESET) "
107- @balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model google/gemini-2.5-flash || true
108- @echo " $( YELLOW) Generating benchmark analysis...$( RESET) "
109- @balatrollm benchmark --runs-dir balatrobench/runs --output-dir balatrobench/benchmarks
110- @echo " $( GREEN) ✓ Benchmark completed$( RESET) "
102+ balatrobench : # # Run benchmark for all models and generate analysis (RUNS=5, INSTANCES=4)
103+ @$(eval BENCH_INSTANCES := $(if $(filter 1,$(INSTANCES ) ) ,4,$(INSTANCES ) ) )
104+ @echo " $( YELLOW) Starting benchmark runs for all models ($( RUNS) runs each with $( BENCH_INSTANCES) instances)...$( RESET) "
105+ @ports=" " ; \
106+ for i in $$ (seq 0 $$ (( $(BENCH_INSTANCES) - 1 )) ); do \
107+ port=$$((12346 + i ) ); \
108+ ports=" $$ ports -p $$ port" ; \
109+ done ; \
110+ echo " $( YELLOW) Running openai/gpt-oss-120b...$( RESET) " ; \
111+ balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model openai/gpt-oss-120b $$ ports || true ; \
112+ echo " $( YELLOW) Running openai/gpt-oss-20b...$( RESET) " ; \
113+ balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model openai/gpt-oss-20b $$ ports || true ; \
114+ echo " $( YELLOW) Running qwen/qwen3-235b-a22b-thinking-2507...$( RESET) " ; \
115+ balatrollm --runs-dir ./balatrobench --runs $(RUNS ) --model qwen/qwen3-235b-a22b-thinking-2507 $$ ports || true ; \
116+ echo " $( YELLOW) Generating benchmark analysis...$( RESET) " ; \
117+ balatrollm benchmark --runs-dir balatrobench/runs --output-dir balatrobench/benchmarks; \
118+ echo " $( GREEN) ✓ Benchmark completed$( RESET) "
0 commit comments