daniel8919 commited on
Commit
c56e50d
Β·
verified Β·
1 Parent(s): ece9a21

Initial README with project documentation

Browse files
Files changed (1) hide show
  1. README.md +72 -6
README.md CHANGED
@@ -1,12 +1,78 @@
1
  ---
2
- title: Limbic Reasoning Agent
3
- emoji: πŸ“‰
4
- colorFrom: indigo
5
- colorTo: pink
6
  sdk: gradio
7
- sdk_version: 6.13.0
8
  app_file: app.py
9
  pinned: false
 
 
 
 
 
 
 
 
 
10
  ---
11
 
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: "🧠 Limbic-Modulated Reasoning Agent"
3
+ emoji: 🧠
4
+ colorFrom: purple
5
+ colorTo: blue
6
  sdk: gradio
7
+ sdk_version: "5.33.0"
8
  app_file: app.py
9
  pinned: false
10
+ license: mit
11
+ short_description: "LLM with real-time neuro-behavioral state modulation"
12
+ tags:
13
+ - psychology
14
+ - neuroscience
15
+ - reasoning
16
+ - limbic-system
17
+ - emotion
18
+ - agents
19
  ---
20
 
21
+ # 🧠 Limbic-Modulated Reasoning Agent
22
+
23
+ An LLM whose **reasoning behavior adapts in real-time** based on a simulated neuro-behavioral state engine.
24
+
25
+ ## How It Works
26
+
27
+ ```
28
+ User Message β†’ Limbic Engine β†’ Modulate LLM Parameters β†’ Generate Response
29
+ β”‚ β”‚
30
+ β”œβ”€ Arousal/Valence β”œβ”€ Temperature (fear↓ seeking↑)
31
+ β”œβ”€ 4 Affective β”œβ”€ Top-p (fear=tight, seek=wide)
32
+ β”‚ Engines β”œβ”€ Behavioral Directive
33
+ β”œβ”€ Hormones β”œβ”€ Active Instincts
34
+ └─ Psychological └─ Self-Debug Protocol
35
+ Lattice
36
+ ```
37
+
38
+ ### Core Formulas (from [LIMBIC-system-PACKGE](https://github.com/Xover-Official/LIMBIC-system-PACKGE))
39
+
40
+ | Formula | Source | Effect |
41
+ |---------|--------|--------|
42
+ | `temp = 1.0 - fearΓ—0.9 + seekingΓ—2.0` | `amygdala.py` | Fear β†’ deterministic, Seeking β†’ creative |
43
+ | `hormone[t+1] = h[t] + (baseline - h[t]) Γ— 0.05` | `endocrine.py` | Hormones decay toward homeostasis |
44
+ | `fear_mod = 1.0 + cortisol - oxytocinΓ—0.5` | `fear.py` | Cortisol amplifies fear, oxytocin dampens |
45
+ | `shadow += 0.1 Γ— suppressed_count` | `lattice.py` | Suppressed drives build up, may "outburst" |
46
+
47
+ ### Agentic Patterns (from [everything-claude-code](https://github.com/affaan-m/everything-claude-code))
48
+
49
+ - **4-Tier Memory**: Session β†’ Observations β†’ Instincts β†’ State Store
50
+ - **Learned Instincts**: Behavioral patterns activated by limbic state
51
+ - **4-Phase Self-Debug**: Capture β†’ Diagnose β†’ Fix β†’ Report
52
+
53
+ ## Architecture
54
+
55
+ | Module | Lines | Purpose |
56
+ |--------|-------|---------|
57
+ | `limbic_engine.py` | 480 | Full limbic state machine with 14 formulas |
58
+ | `memory.py` | 332 | 4-tier memory + instincts + self-debugger |
59
+ | `training_plan.py` | 468 | GRPO training recipe + dataset generation |
60
+ | `app.py` | 436 | ZeroGPU Gradio interface |
61
+
62
+ ## Try It
63
+
64
+ Type messages with different emotional tones and watch the Limbic Dashboard react:
65
+
66
+ - 😰 **Fear**: "I'm terrified of losing my job" β†’ Low temperature, structured response
67
+ - πŸ” **Seeking**: "Tell me something fascinating about the brain" β†’ High temperature, creative response
68
+ - πŸ’™ **Care**: "How can I help my friend with depression?" β†’ Empathetic, supportive response
69
+ - 😒 **Panic**: "My best friend is moving away forever" β†’ Warm, validating response
70
+
71
+ ## Training Plan
72
+
73
+ 3-stage pipeline to fine-tune a base model:
74
+ 1. **SFT Warm-Up**: 5K synthetic conversations (limbic state β†’ response style)
75
+ 2. **GRPO Loop Learning**: 2K psychology prompts Γ— 4 reward functions
76
+ 3. **Active Learning**: Uncertain predictions β†’ human labels β†’ retrain
77
+
78
+ See `training_plan.py` for the complete recipe and runnable script.