Views
No views yet
| Objective | Target | Agent |
|---|---|---|
| Latency | < 150ms | ResourceAgent |
| Cost | < $400/hr | CostAgent |
| Carbon | < 220 units | SustainabilityAgent |
reward = Σ (gap_closure × weight) + worst_metric_bonus| Action | Reward (crisis state) | Model Learns |
|---|---|---|
optimize_energy | +7.5 | "Best action — addresses cost + carbon simultaneously" |
scale_down | +5.75 | "Good — reduces cost effectively" |
migrate_region | +3.75 | "Moderate — helps carbon but hurts cost" |
scale_up | +1.5 | "Worst — increases cost and carbon" |
optimize_energy as the dominant policy when all metrics are above target — which is the mathematically optimal action given the shaped reward function.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("kartikraut09/ecocloud-grpo-qwen")
4tokenizer = AutoTokenizer.from_pretrained("kartikraut09/ecocloud-grpo-qwen")
5
6prompt = """<|im_start|>system
7You are the CloudEdge controller managing a cloud platform in crisis.
8Pick the BEST single action for the current state. Respond with ONLY the action name.
9
10Actions:
11 scale_up → latency -40, cost +30, carbon +20
12 scale_down → latency +25, cost -35, carbon -15
13 optimize_energy → latency +10, cost -20, carbon -40
14 migrate_region → latency +15, cost +10, carbon -50
15
16Targets: latency<150ms, cost<$400, carbon<220<|im_end|>
17<|im_start|>user
18Cloud state: latency=280ms, cost=$620/hr, carbon=380, load=critical. Best action?<|im_end|>
19<|im_start|>assistant
20"""
21
22inputs = tokenizer(prompt, return_tensors="pt")
23outputs = model.generate(**inputs, max_new_tokens=16, temperature=0.1)
24print(tokenizer.decode(outputs[0], skip_special_tokens=True))
25# Output: optimize_energy1@misc{cloudedge2026,
2 title={CloudEdge: Multi-Agent LLM Simulator for Sustainable Cloud Crisis Management},
3 author={Kartik Raut},
4 year={2026},
5 url={https://github.com/KartikRaut09/ecocloud-war-room}
6}