FRIDAY is a revolutionary AI assistant with a dynamic neural network that learns and grows continuously. Inspired by TRM (Tiny Recursive Model), FRIDAY combines recursive reasoning with transparent, editable neurons.
- Recursive Reasoning - Thinks multiple times, improving answers iteratively
- Hierarchical Processing - Abstract (z_H) + Detail (z_L) neurons
- Adaptive Halting - Knows when answer is good enough
- 7M parameters equivalent - But dynamic and growing!
- Not statically trained - Add neurons anytime, no retraining needed
- Transparent - Every neuron has visible content and meaning
- Editable - Add, remove, or modify knowledge easily
- Grows continuously - Learns from every interaction
- Autonomous TRM Learning - Learns independently using TRM logic
- Self-Evaluation - Rates its own responses (0-5.0)
- Adaptive Learning - Learns more from good responses
- Teacher Learning - Can learn from other AI models (Ollama, etc.)
- Hebbian Learning - Strengthens connections between co-activated neurons
- Meta-Learning - Learns how to learn, optimizes strategies
- Real-time 3D viewer - See neurons and synapses in action
- Activation visualization - Watch neurons light up during queries
- Interactive - Explore the neural network
# Clone repository
git clone https://github.com/yourusername/F.R.I.D.A.Y.git
cd F.R.I.D.A.Y
# Install dependencies
pip install -r requirements.txt
# Initialize database
python scripts/init_brain.py# Test TRM architecture
python scripts/test_trm_architecture.py# Start FRIDAY server
python friday.pyOpen http://localhost:5000 to see the 3D neural network!
F.R.I.D.A.Y/
βββ friday.py # Main entry point
βββ requirements.txt # Dependencies
β
βββ src/ # Core system
β βββ brain.py # Neural database
β βββ query_engine.py # Query processing
β βββ trm_brain.py # TRM architecture
β βββ autonomous_trm_learner.py # Autonomous learning with TRM
β βββ text_generator.py # Response generation
β βββ response_evaluator.py # Self-evaluation
β βββ hebbian_learning.py # Hebbian learning
β βββ model_teacher.py # Learn from other models
β βββ server.py # Web server
β
βββ scripts/ # Utility scripts
β βββ init_brain.py # Initialize database
β βββ download_lmsys_dataset.py # Download LMSYS dataset
β βββ train_with_lmsys_dataset.py # Train with LMSYS
β βββ assimilate_knowledge.py # Learn from models
β βββ learn_from_teacher.py # Teacher learning
β βββ autonomous_trm_training.py # Autonomous TRM learning
β βββ demo_autonomous_learning.py # Quick demo
β βββ test_trm_architecture.py # Test TRM
β βββ test_self_learning.py # Test self-learning
β βββ README.md # Scripts documentation
β
βββ static/ # Web interface
β βββ viewer.html # 3D viewer
β
βββ data/ # Data storage
β βββ friday.db # Neural database
β
βββ docs/ # Documentation
β βββ TRM_ANALYSIS.md # TRM architecture analysis
β βββ FRIDAY_TRM_HYBRID.md # Hybrid architecture
β βββ GENERATION_SYSTEM.md # Text generation
β βββ SELF_LEARNING_ARCHITECTURE.md
β βββ LEARNING_FROM_MODELS.md
β βββ README.md # Docs index
β
βββ model/ # AI models
βββ TinyRecursiveModels/ # TRM reference
FRIDAY lernt selbststΓ€ndig mit TRM-Logik zur richtigen KI zu werden:
# FRIDAY testet sich selbst
result = trm_processor.process(question, question_type)
score = result['score']
# Autonomous learning decision
if score < 3.5:
# Schlecht β Lernen!
# 1. Analysiere Fehler
failure = analyze_failure(question, result)
# 2. Hole Wissen vom Teacher
teacher_answer = teacher.query_model(question)
# 3. Extrahiere Reasoning
reasoning = extract_reasoning(question, teacher_answer)
# 4. Erstelle Neuronen
neurons = create_learning_neurons(answer, reasoning)
# 5. Verbinde mit Wissen
connect_to_existing(neurons, question)
elif score >= 4.5:
# Exzellent β Gemeistert!
record_mastery(question, result)
# Meta-Learning: Lerne aus Mustern
if improvement_stalled:
optimize_parameters_from_patterns()Kernprinzipien:
- β TRM Recursive Reasoning - Denkt mehrfach nach
- β Self-Evaluation - Bewertet sich selbst
- β Autonomous Learning - Lernt automatisch bei Fehlern
- β Pattern Recognition - Erkennt erfolgreiche Muster
- β Meta-Learning - Lernt wie man lernt
# FRIDAY thinks recursively (like TRM)
for h_cycle in range(3): # High-level cycles
for l_cycle in range(4): # Low-level cycles
z_L = update_details(z_L, z_H + input)
z_H = update_abstract(z_H, z_L)
response = generate(z_H, z_L)
score = self_evaluate(response)
if score >= 4.5: # Good enough!
break# TRM: Static weights
weights = torch.Tensor([...]) # Fixed, needs retraining
# FRIDAY: Dynamic neurons
neuron = brain.create_neuron(
content="Python is a programming language",
tags=['Programming', 'Python']
)
# No retraining needed!# FRIDAY evaluates its own responses
evaluation = evaluator.evaluate_response(response, query)
# Score: 4.2/5.0
# Learns adaptively
if score >= 4.0:
learning_strength = 1.5 # Strong learning
elif score < 2.0:
learning_strength = 0.5 # Weak learningfrom src.brain import Brain
from src.query_engine import QueryEngine
from src.hebbian_learning import HebbianLearner
brain = Brain("data/friday.db")
hebbian = HebbianLearner(brain)
query_engine = QueryEngine(brain, hebbian)
result = query_engine.query("Was ist Python?")
print(result['response'])
# Output: "Python ist ein System, das programming, syntax verwendet."
print(f"Score: {result['evaluation']['total_score']}/5.0")
# Output: Score: 4.8/5.0# Install Ollama first: https://ollama.ai
ollama pull qwen2.5:3b
# Train FRIDAY
python scripts/learn_from_teacher.py# Add a new neuron
neuron_id = brain.create_neuron(
neuron_type='hidden',
x=0.0, y=0.0, z=0.0,
content="Machine Learning is a subset of AI",
semantic_tags=['AI', 'Machine Learning', 'Concept']
)
# FRIDAY now knows this!python scripts/test_trm_architecture.pyOutput:
π§ TRM-Style Processing
H_cycles: 3
L_cycles: 4
z_H neurons: 71
z_L neurons: 26
π H-Cycle 1/3
Score: 4.8/5.0
β
Halted: Score >= 4.5
python scripts/test_self_learning.py# Quick demo
python scripts/demo_autonomous_learning.py
# Full training
python scripts/autonomous_trm_training.py# Download dataset
python scripts/download_lmsys_dataset.py
# Train with real conversations
python scripts/train_with_lmsys_dataset.pypython scripts/test_realistic_queries.pyDefault: data/friday.db
Change in code:
brain = Brain("path/to/your/database.db")Adjust in src/trm_brain.py:
self.H_cycles = 3 # High-level cycles
self.L_cycles = 4 # Low-level cycles
self.halt_threshold = 4.5 # When to stop| Feature | TRM (Original) | FRIDAY + TRM |
|---|---|---|
| Parameters | 7M (static) | ~100 neurons (dynamic) |
| Training | 3 days, 4x H100 | Continuous, CPU |
| Knowledge | Fixed (puzzles) | Growing (any topic) |
| Editable | No (retrain needed) | Yes (add/remove neurons) |
| Transparent | No (black box) | Yes (see all neurons) |
| Reasoning | Recursive β | Recursive β |
Typical response scores: 4.5-5.0/5.0
Evaluation criteria:
- Length (optimal 50-300 chars)
- Relevance (keywords from query)
- Grammar (proper structure)
- Neuron usage (knowledge utilization)
- Type match (fits question type)
- Completeness (full answer)
- LMSYS-Chat-1M Training β NEW
- Autonomous TRM Learning β NEW
- Self-Learning
- Learning from Models
- Teacher Models
- β TRM-inspired architecture
- β Dynamic neurons
- β Self-evaluation
- β Recursive reasoning
- β Teacher learning
- β Autonomous TRM Learning β NEW
- β Meta-Learning β NEW
- β Pattern Recognition β NEW
- β LMSYS-Chat-1M Training β NEW
- β Real Conversation Data β NEW
- Multi-Teacher Learning (learn from multiple models)
- Curriculum Learning (structured learning path)
- Active Learning (self-select questions)
- Multi-language support
- Voice interface
- Distributed neurons (multiple databases)
- Collaborative learning (multiple FRIDAYs)
- Advanced reasoning (symbolic + neural)
- Autonomous goal-setting
Contributions welcome!
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing) - Open Pull Request
MIT License - See LICENSE file
- TRM - Inspired by Tiny Recursive Model architecture
- Ollama - Local LLM support
- Three.js - 3D visualization
- SQLite - Neural database
Questions? Open an issue on GitHub!
FRIDAY - The AI that thinks recursively and grows continuously! π§ π
FRIDAY kann jetzt mit 1M+ echten Konversationen aus der Chatbot Arena trainiert werden!
Quick Start:
# 1. Download dataset
python scripts/download_lmsys_dataset.py
# 2. Train FRIDAY
python scripts/train_with_lmsys_dataset.pyErgebnis:
- β 1000+ echte Konversationen
- β 2800+ Q&A Paare
- β 300+ Neuronen aus echten Daten
- β Score 4.6/5.0 nach Training
- β Autonomous TRM Learning
Mehr Info: LMSYS Quick Start | Full Docs