How kminh-wow/ondeviceai works
This repository is an experiment harness for comparing quantized Qwen3 models on multi-step tool-use tasks, with a separate BFCL multi-turn validation track. The main workflow generates gold tasks, runs an agent against a model server and deterministic mock world, then scores and analyzes trajectories; human audit supports score validation. BFCL runs the same broad evaluation pattern against its stateful virtual APIs. The graph follows documented capabilities and indexed or excerpted references; unsampled runtime details are not inferred.
Main entry points: bfcl_runner.py BFCL runner · run_experiment.py Experiment runner · tasks.py Task generation · evaluate.py Trajectory scoring
Components 18
Core experiment
- Task generation
tasks.py - Experiment runner
run_experiment.py - Tool-calling agent
agent.py
Mock task world
- Mock tool world
tools_env.py
Scoring and analysis
- Trajectory scoring
evaluate.py - Experiment analysis
analyze.py - Human score audit
audit.py
BFCL validation
- BFCL runner
bfcl_runner.py - BFCL analysis
bfcl_analyze.py - BFCL scenarios and tool docs
bfcl/data
Virtual APIs
- API scenario data
bfcl/func_source_code/long_context.py - File system API
bfcl/func_source_code/gorilla_file_system.py - Travel booking API
bfcl/func_source_code/travel_booking.py - Vehicle control API
bfcl/func_source_code/vehicle_control.py - Trading API
bfcl/func_source_code/trading_bot.py - Other virtual APIs
bfcl/func_source_code
Other components
- Experiment operator
- llama.cpp model server
Connections 29
- Experiment operator → Task generation: generates tasks
README.md - Experiment operator → Experiment runner: runs experiments
README.md - Experiment operator → Experiment analysis: analyzes results
README.md - Experiment operator → Human score audit: audits scores
README.md - Experiment operator → BFCL runner: runs validation
README.md - Task generation → Mock tool world: builds oracle
tasks.py - Experiment runner → Task generation: loads tasks
run_experiment.py - Experiment runner → Tool-calling agent: runs agent
run_experiment.py - Experiment runner → Trajectory scoring: scores runs
run_experiment.py - Experiment runner → llama.cpp model server: queries model
README.md - Tool-calling agent → llama.cpp model server: requests completions
agent.py - Tool-calling agent → Mock tool world: executes tools
agent.py - Trajectory scoring → Mock tool world: uses tool specs
evaluate.py - Experiment analysis → Trajectory scoring: rescores runs
analyze.py - Experiment analysis → Task generation: rebuilds task map
analyze.py - Human score audit → Trajectory scoring: checks scores
audit.py - Human score audit → Task generation: loads tasks
audit.py - BFCL runner → llama.cpp model server: queries model
bfcl_runner.py - BFCL runner → BFCL scenarios and tool docs: loads scenarios and docs
bfcl_runner.py - BFCL runner → File system API: instantiates API
README.md - BFCL runner → Travel booking API: instantiates API
README.md - BFCL runner → Vehicle control API: instantiates API
README.md - BFCL runner → Trading API: instantiates API
README.md - BFCL runner → Other virtual APIs: uses virtual APIs
README.md - File system API → API scenario data: imports scenario data
bfcl/func_source_code/gorilla_file_system.py - Travel booking API → API scenario data: imports scenario data
bfcl/func_source_code/travel_booking.py - Vehicle control API → API scenario data: imports scenario data
bfcl/func_source_code/vehicle_control.py - Trading API → API scenario data: imports scenario data
bfcl/func_source_code/trading_bot.py - BFCL runner → BFCL analysis: analyzes results