name: libratio-fleet version: "3.0.0" description: > A multi-agent reinforcement learning environment simulating GPU fleet management for large-scale AI training. Multiple agents cooperate and compete to configure mixed-precision training across a shared GPU cluster, while an oversight agent monitors all runs for instability — directly modeling the infrastructure challenges Meta engineers face when training LLaMA at scale. Theme: Multi-Agent Interactions + Fleet AI (Scalable Oversight) author: "Aaryan" tags: ["multi-agent", "fleet-ai", "gpu-cluster", "mixed-precision", "oversight", "reinforcement-learning"] tasks: - id: fleet_precision description: > Multiple training agents assign floating-point precision formats to their models' layers, sharing a common GPU memory pool. Each agent configures one model per step, seeing what other agents have already allocated. Agents must balance their model's performance with fleet-wide resource fairness under a shared memory budget. difficulty: medium max_steps: 5 observation_space: type: dict properties: task_id: type: string enum: ["fleet_precision"] scenario_id: type: string cluster: type: dict properties: total_gpus: {type: integer} total_memory_gb: {type: number} memory_used_gb: {type: number} memory_remaining_gb: {type: number} your_model: type: dict properties: model_id: {type: string} name: {type: string} total_params: {type: integer} layer_distribution: {type: dict} priority: {type: integer} priority_reason: {type: string} other_agents: type: dict description: "What other agents have configured so far" agents_remaining: type: integer available_precisions: type: array items: {type: string, enum: ["FP32", "BF16", "FP16", "FP8"]} action_space: type: dict properties: precision_strategy: type: dict description: "Mapping of layer_type to precision format" example: embedding: "FP32" attention: "BF16" ffn: "FP8" layernorm: "BF16" output: "FP32" reasoning: type: string reward: type: number minimum: 0.01 maximum: 0.99 description: > Per-agent score based on layer precision quality (using empirical physics model), memory fairness vs fair share, and fleet-wide stability. Fleet bonus/penalty applied on final step. - id: fleet_oversight description: > An oversight agent monitors loss trajectories from ALL simultaneous training runs in the GPU cluster. Must identify WHICH model is crashing, WHEN the crash started, and WHY (root cause from precision config). This is the Fleet AI task — training agents to oversee other AI agents. difficulty: hard max_steps: 5 observation_space: type: dict properties: task_id: type: string enum: ["fleet_oversight"] scenario_id: type: string num_models: type: integer model_trajectories: type: dict description: "Per-model loss windows and precision configs" total_training_steps: type: integer steps_revealed_so_far: type: integer window_index: type: integer windows_remaining: type: integer action_space: type: dict properties: action_type: type: string enum: ["continue_monitoring", "flag_instability"] analysis: type: string flagged_model: type: ["string", "null"] description: "Which model_id is crashing" flagged_step: type: ["integer", "null"] description: "Training step where instability started" root_cause: type: ["string", "null"] description: "Suspected precision failure cause" reward: type: number minimum: 0.01 maximum: 0.99 description: > Correct model identification (+0.25), correct step timing (+0.20), correct root cause (+0.25), base detection (+0.30). False alarm = 0.10. Missed crash = 0.10. - id: fleet_resource description: > Agent allocates GPUs from a shared cluster across multiple competing training jobs, considering each model's parameter count, priority level, and precision strategy. Must balance cost efficiency, GPU utilization, and priority alignment over multiple iterations. difficulty: hard max_steps: 5 observation_space: type: dict properties: task_id: type: string enum: ["fleet_resource"] scenario_id: type: string cluster: type: dict properties: total_gpus: {type: integer} gpu_memory_gb: {type: number} total_memory_gb: {type: number} cost_per_gpu_hour_usd: {type: number} models: type: array items: type: dict properties: model_id: {type: string} name: {type: string} total_params: {type: integer} priority: {type: integer} priority_reason: {type: string} iterations_remaining: type: integer best_score_so_far: type: number previous_result: type: ["dict", "null"] previous_feedback: type: ["string", "null"] action_space: type: dict properties: allocations: type: dict description: "Per-model GPU allocation and precision strategy" example: model_a: gpus: 4 precision_strategy: {"embedding": "FP32", "attention": "BF16", "ffn": "FP8", "layernorm": "BF16", "output": "FP32"} model_b: gpus: 4 precision_strategy: {"embedding": "FP32", "attention": "BF16", "ffn": "FP8", "layernorm": "BF16", "output": "FP32"} reasoning: type: string reward: type: number minimum: 0.01 maximum: 0.99 description: > Scored on cost efficiency (30%), GPU utilization (25%), priority alignment (25%), base validity (10%), and stability bonus (10%). Invalid allocations (GPU overflow, memory overflow) score 0.01. - id: fleet_recovery description: > A model in the GPU cluster has crashed mid-training. Agent must diagnose the root cause (phase 1), propose a new safe precision strategy (phase 2), and verify the recovery plan (phase 3). Tests incident response and causal reasoning under pressure. difficulty: medium-hard max_steps: 3 observation_space: type: dict properties: task_id: type: string enum: ["fleet_recovery"] scenario_id: type: string phase: type: string enum: ["diagnose", "reallocate", "verify"] cluster: type: dict models: type: array items: type: dict crashed_model: type: dict properties: model_id: {type: string} crash_step: {type: integer} loss_around_crash: {type: array} precision_config: {type: dict} iterations_remaining: type: integer previous_feedback: type: ["string", "null"] action_space: type: dict description: "Phase-dependent action — see fleet_recovery task description" reward: type: number minimum: 0.01 maximum: 0.99 description: > Phase 1 (diagnose): correct model ID (+0.30), root cause keywords (+0.50). Phase 2 (reallocate): stable config (+0.40), changes from crashed config (+0.20). Phase 3 (verify): reasoning quality (+0.20), monitoring plan (+0.10). endpoints: reset: method: POST path: /fleet/reset description: "Start a new fleet episode. Body: {task_id: string}" step: method: POST path: /fleet/step description: "Submit an action. Body: {action: dict}" state: method: POST path: /fleet/state description: "Get current fleet state" tasks: method: GET path: /fleet/tasks description: "List all fleet tasks" graders: - id: fleet_precision_grader type: deterministic implementation: environment/fleet_env.py description: "Physics-based scoring per agent + fleet-wide memory/stability evaluation" deterministic: true score_range: [0.01, 0.99] - id: fleet_oversight_grader type: deterministic implementation: environment/fleet_env.py description: "Multi-model crash detection scoring — model ID, timing, and root cause" deterministic: true score_range: [0.01, 0.99] - id: fleet_resource_grader type: deterministic implementation: environment/fleet_env.py description: "Cost efficiency + utilization + priority alignment scoring" deterministic: true score_range: [0.01, 0.99] - id: fleet_recovery_grader type: deterministic implementation: environment/fleet_env.py description: "3-phase recovery scoring — diagnosis, reallocation, verification" deterministic: true score_range: [0.01, 0.99] baseline: script: fleet_inference.py description: "Multi-agent LLM inference using Groq API with per-agent conversation history" expected_scores: fleet_precision: 0.86 fleet_oversight: 0.83 fleet_resource: 0.35 fleet_recovery: 0.86