Views
No views yet
Qwen2.5-1.5B-Instruct trained with GRPO (Group Relative Policy Optimization) on the Coalition Market multi-agent negotiation environment. Agents learn to trade resources, form coalitions, and complete construction goals through emergent cooperation.| Metric | Random Baseline | After GRPO | Improvement |
|---|---|---|---|
| Mean episode reward | 9.12 | 14.20 | +5.08 (+55%) |
| Training steps | — | 600 | — |
| Training loss | — | -0.0007 | — |

| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-1.5B-Instruct |
| Method | GRPO (TRL v0.24.0) |
| LoRA rank | 16 |
| LoRA alpha | 16 |
| Target modules | q/k/v/o/gate/up/down proj |
| Quantization | 4-bit (Unsloth) |
| Batch size | 4 (effective 8 with grad accum) |
| Learning rate | 5e-5 (cosine) |
| Num generations | 4 per prompt |
| Max prompt length | 320 tokens |
| Max completion length | 48 tokens |
| Training hardware | Kaggle T4 GPU |
| Training time | ~50 minutes |
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 "Santhosh-14146/coalition-market-qwen2.5-grpo",
5 load_in_4bit=True,
6)
7FastLanguageModel.for_inference(model)1import torch
2
3SYSTEM_PROMPT = """You are an agent in a multi-agent resource market.
4Complete your construction goal by trading goods with other agents.
5
6ACTIONS — respond with EXACTLY ONE:
7 propose_trade(TO, {GOOD: QTY}, {GOOD: QTY})
8 accept_trade(TRADE_ID)
9 reject_trade(TRADE_ID)
10 form_coalition([AGENTS], DESCRIPTION)
11 build_project()
12 pass()
13
14Output ONLY the action string. No explanation."""
15
16user_prompt = """Round 3/10 | Agent A
17Goal: Steel Mill | Requires: Iron:3, Coal:2, Stone:1
18Inventory: Iron:3, Coal:2
19Missing: Stone:1
20Others:
21 B: Stone:3, Wood:2
22Pending trades for you:
23 #abc123: B offers Stone:1 for Iron:1
24Action:"""
25
26messages = [
27 {"role": "system", "content": SYSTEM_PROMPT},
28 {"role": "user", "content": user_prompt},
29]
30
31input_ids = tokenizer.apply_chat_template(
32 messages, tokenize=True, add_generation_prompt=True, return_tensors="pt"
33).to(model.device)
34
35with torch.no_grad():
36 out = model.generate(input_ids, max_new_tokens=48, temperature=0.4,
37 do_sample=True, pad_token_id=tokenizer.eos_token_id)
38
39action = tokenizer.decode(out[0, input_ids.shape[-1]:], skip_special_tokens=True)
40print(action.strip().split("\n")[0])
41# Expected: accept_trade(abc123)1@misc{coalition-market-grpo-2026,
2 author = {Santhosh-14146},
3 title = {Coalition Market: Multi-Agent Negotiation with GRPO},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/Santhosh-14146/coalition-market-qwen2.5-grpo}
7}1@article{shao2024deepseekmath,
2 title = {DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models},
3 author = {Zhihong Shao et al.},
4 year = 2024,
5 eprint = {arXiv:2402.03300}
6}