SParsh003 commited on
Commit
3002480
·
verified ·
1 Parent(s): 560b129

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +101 -6
README.md CHANGED
@@ -6,17 +6,112 @@ tags:
6
  - unsloth
7
  - mistral
8
  - trl
 
 
 
 
9
  license: apache-2.0
10
  language:
11
  - en
 
12
  ---
13
 
14
- # Uploaded model
15
 
16
- - **Developed by:** SParsh003
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/mistral-7b-instruct-v0.3-bnb-4bit
19
 
20
- This mistral model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth)
21
 
22
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
  - unsloth
7
  - mistral
8
  - trl
9
+ - openenv
10
+ - reinforcement-learning
11
+ - grpo
12
+ - agents
13
  license: apache-2.0
14
  language:
15
  - en
16
+ thumbnail: https://huggingface.co/spaces/SParsh003/LifeOS-Personal-Chaos-Agen/resolve/main/docs/reward_curves.png
17
  ---
18
 
19
+ # 🧬 LifeOS Trained Agent (Mistral-7B-Instruct-v0.3)
20
 
21
+ ![LifeOS Agent Banner](https://huggingface.co/spaces/SParsh003/LifeOS-Personal-Chaos-Agen/resolve/main/docs/Starting.png)
 
 
22
 
23
+ This model was trained to survive the chaos of an unpredictable, stressful student week using **GRPO (Group Relative Policy Optimization)** within the [LifeOS OpenEnv](https://github.com/itzzSPcoder/LifeOS) simulation.
24
 
25
+ It is a fine-tuned version of `mistralai/Mistral-7B-Instruct-v0.3` that has learned to balance multiple competing constraints—energy, stress, deadlines, social obligations, and budget—under conditions of high uncertainty (35% probability of random chaos events per step).
26
+
27
+ ### 🏆 Meta OpenEnv Hackathon 2026 Submission
28
+
29
+ - **Live Demo (Interactive Space):** [SParsh003/LifeOS-Personal-Chaos-Agen](https://huggingface.co/spaces/SParsh003/LifeOS-Personal-Chaos-Agen)
30
+ - **Deep Dive Blog Post:** [Read the journey & methodology](https://huggingface.co/spaces/SParsh003/LifeOS-Personal-Chaos-Agen/blob/main/docs/hf_blog.md)
31
+ - **GitHub Repository:** [itzzSPcoder/LifeOS](https://github.com/itzzSPcoder/LifeOS)
32
+ - **Developed by:** Sparsh Bansal, Ayushika Verma, Aishani Mittal
33
+ - **License:** Apache 2.0
34
+
35
+ ---
36
+
37
+ ## 🚀 Model Capabilities: Triage over Grinding
38
+
39
+ Most agents fail at long-horizon personal planning because they treat scheduling as a static puzzle. This agent was trained in a dynamic environment where pushing too hard leads to burnout (-1.5 penalty) and ignoring friends leads to social debt (-0.8 penalty).
40
+
41
+ **Key Behaviors Learned via RL:**
42
+ 1. **Proactive Recovery:** It learns to call the `rest` action *before* its energy drops to critical levels, avoiding burnout cascades.
43
+ 2. **Social Debt Management:** It prioritizes the `reply_message` action to maintain relationships, clearing unread messages before they heavily penalize the social coherence score.
44
+ 3. **Strategic Delegation:** It learns to use budget (₹) via `delegate_task` to offload low-priority work when energy is low and deadlines are looming.
45
+ 4. **Resilience to Chaos:** When a random chaos event (e.g., "Deadline moved up by 2 days") fires, it can pause, recover, and pivot its focus without collapsing.
46
+
47
+ ---
48
+
49
+ ## 📊 Training Methodology
50
+
51
+ The model was trained entirely using Reinforcement Learning (GRPO) from the `trl` library, without human-labeled preference data. We designed a multi-objective reward function to prevent reward hacking:
52
+
53
+ 1. **Task Completion:** +1.0 for finishing, -1.0 for missing deadlines.
54
+ 2. **Social Coherence:** Penalty for leaving messages unread.
55
+ 3. **Energy Sustainability:** +0.4 for proactive rest, -1.5 (Game Over) for burnout.
56
+ 4. **Format Compliance:** Strict adherence to valid JSON actions.
57
+
58
+ **Training Stack:**
59
+ - **Frameworks:** `unsloth` (for 2x faster, memory-efficient 4-bit LoRA training), `trl` (GRPO Trainer).
60
+ - **Compute:** Single Google Colab T4 GPU (free tier).
61
+ - **Episodes:** 30 training episodes, 30 steps each.
62
+
63
+ ![Reward Curves](https://huggingface.co/spaces/SParsh003/LifeOS-Personal-Chaos-Agen/resolve/main/docs/reward_curves.png)
64
+
65
+ ---
66
+
67
+ ## 💻 How to Use
68
+
69
+ This model is intended to be used as a policy agent within the **LifeOS OpenEnv framework**. It expects a highly structured observation prompt and is trained to output a specific JSON action schema preceded by an inner monologue block.
70
+
71
+ ### Example Input (Observation):
72
+ ```text
73
+ === Step 14 / 30 ===
74
+ Vitals: Energy=35, Stress=72
75
+ Resources: Budget=₹1800, Relationships=0.60
76
+ Chaos Event: Assignment deadline moved up by 2 days!
77
+ Pending Tasks: 3
78
+ Unread Messages: 1
79
+ ```
80
+
81
+ ### Example Output (Agent Action):
82
+ ```text
83
+ <thought>
84
+ Energy is at 35, which is dangerous territory. If I push to work on the urgent assignment now, I will hit 0 energy and burn out. I have enough budget to offload the minor task, but first I must rest to recover my vitals before tackling the big deadline.
85
+ </thought>
86
+ {
87
+ "action_type": "rest",
88
+ "reasoning": "Need to recover energy before prioritizing the urgent assignment."
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ## ⚙️ Loading the Model
95
+
96
+ You can load this model directly using Hugging Face `transformers` or `unsloth` for faster inference.
97
+
98
+ ```python
99
+ from unsloth import FastLanguageModel
100
+
101
+ model, tokenizer = FastLanguageModel.from_pretrained(
102
+ model_name = "SParsh003/LifeOS-Trained-Agent",
103
+ max_seq_length = 2048,
104
+ dtype = None,
105
+ load_in_4bit = True,
106
+ )
107
+
108
+ FastLanguageModel.for_inference(model)
109
+
110
+ prompt = """... (insert LifeOS observation here) ..."""
111
+ inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
112
+
113
+ outputs = model.generate(**inputs, max_new_tokens=256)
114
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
115
+ ```
116
+
117
+ This model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) 🦥.