File size: 2,170 Bytes
c6bbb61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
---
license: apache-2.0
base model: mistralai/Mistral-7B-Instruct-v0.3
tags:
  - mistral
  - lora
  - behavioral-ai
  - posthog
  - hackathon
  - mistral-worldwide-2026
library name: peft
---

# Agentic World — Behavioral Digital Twin LoRA Adapters

Fine-tuned LoRA adapters for Mistral 7B Instruct v0.3, trained on real user behavior 
from PostHog session recordings. Each adapter represents a distinct behavioral demographic 
(e.g., Frustrated Clicker, Cautious Explorer, Engaged User, Speedster).

## How it works

1. Real user sessions recorded via PostHog (clicks, scrolls, inputs, navigation)
2. Sessions parsed, described via Mistral, embedded, and clustered via K-Means
3. Per-cluster training data generated as (page state → next action) pairs
4. LoRA fine-tuned on A100 80GB with bf16, Flash Attention 2, packing

## Training Details

- **Base model:** mistralai/Mistral-7B-Instruct-v0.3
- **Method:** LoRA (rank=32, alpha=64, all projection layers)
- **Framework:** HuggingFace TRL SFTTrainer + PEFT
- **Hardware:** NVIDIA A100 80GB on Brev
- **Epochs:** 5
- **Tracked in:** [W&B Project](https://wandb.ai/amaan784-columbia-university/agentic-world)

## Clusters

Each subdirectory contains a LoRA adapter for one demographic:

| Cluster | Label | Description |
|---------|-------|-------------|
| 0 | Speedster | Fast, decisive navigation with minimal hesitation |
| 1 | Scanner | Quick browsing, skimming content |
| 2 | Erratic Clicker | Unpredictable click patterns |
| 3 | Cautious Explorer | Slow, careful reading and interaction |
| 4 | Frustrated Clicker | Repeated clicks, signs of confusion |

## Usage
```python
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer

base = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
model = PeftModel.from_pretrained(base, "amaan784/agentic-world-behavioral", subfolder="cluster_0_lora")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
```

## Links

- [GitHub: PosthogAgent](https://github.com/exploring-curiosity/PosthogAgent)
- [W&B Training Runs](https://wandb.ai/amaan784-columbia-university/agentic-world)