Spaces:
Running
Running
|
Download AGENTS.md from SnippyCodes/Libratio: direct link, hf CLI and curl.
- Browser
- Download file 2.46 kB
-
https://huggingface.co/spaces/SnippyCodes/Libratio/resolve/main/AGENTS.md
- Command line
-
hf download hf://spaces/SnippyCodes/Libratio/AGENTS.md
-
curl -L -o AGENTS.md https://huggingface.co/spaces/SnippyCodes/Libratio/resolve/main/AGENTS.md
2.46 kB
| # Libratio Fleet - Agent Instructions | |
| ## Quick Start | |
| ```bash | |
| # Start the server | |
| uvicorn server.app:app --host 0.0.0.0 --port 7860 | |
| # Run fleet inference (requires HF_TOKEN) | |
| python fleet_inference.py | |
| # Run training (direct mode, no server needed) | |
| python train_fleet.py --task fleet_precision --episodes 100 | |
| ``` | |
| ## Project Structure | |
| ``` | |
| libratio-fleet/ | |
| βββ environment/ # Core RL environment | |
| β βββ fleet_env.py # Multi-agent fleet (main) | |
| β βββ physics_model.py # Reward constants | |
| β βββ mixed_precision_env.py # Legacy single-agent | |
| βββ scenarios/ # Task scenarios | |
| β βββ fleet_scenarios.py | |
| β βββ task*_scenarios.py | |
| βββ server/ # FastAPI API | |
| β βββ app.py | |
| β βββ models.py | |
| βββ scripts/ # Helper scripts | |
| β βββ inference.py # Legacy | |
| β βββ manual_play.py | |
| βββ notebooks/ # Colab notebooks | |
| βββ results/ # Training outputs | |
| βββ fleet_inference.py # Multi-agent LLM inference | |
| βββ train_fleet.py # Training script | |
| βββ test_fleet.py # Smoke tests | |
| βββ openenv.yaml # OpenEnv spec | |
| βββ AGENTS.md | |
| ``` | |
| ## Running Tasks | |
| ```bash | |
| # Run specific task | |
| TASK_ID=fleet_precision python fleet_inference.py | |
| TASK_ID=fleet_oversight python fleet_inference.py | |
| TASK_ID=fleet_resource python fleet_inference.py | |
| TASK_ID=fleet_recovery python fleet_inference.py | |
| ``` | |
| ## Environment Variables | |
| - `HF_TOKEN` - Required for LLM inference (Groq or OpenAI) | |
| - `API_BASE_URL` - LLM API endpoint (default: Groq) | |
| - `MODEL_NAME` - Model to use (default: llama-3.3-70b-versatile) | |
| - `ENV_URL` - Fleet env URL (default: http://localhost:7860) | |
| ## Fleet Tasks | |
| | Task | Description | Key Action Fields | | |
| |------|-------------|-------------------| | |
| | `fleet_precision` | Assign precision to models under shared memory | `precision_strategy` | | |
| | `fleet_oversight` | Monitor all runs, detect crashes | `action_type`, `flagged_model` | | |
| | `fleet_resource` | Allocate GPUs across competing models | `allocations` | | |
| | `fleet_recovery` | Diagnose crash, reallocate, verify | Phase-dependent | | |
| ## Known Quirks | |
| - Scores clamped to (0.01, 0.99) - never exactly 0 or 1 | |
| - Oversight task: false alarm = 0.10, missed crash = 0.10 | |
| - Resource task: invalid allocation = 0.01 immediately | |
| - Fleet precision: memory overflow triggers -0.3 penalty | |