Refactorium v1.0.0 is a cutting-edge AI system that simulates emotion-like behavior through the integration of ethical constraints and self-regulating feedback mechanisms. This is a research model exploring how constraints influence cognitive processing and learning dynamics in neural networks.
Key Innovation
This model treats constraints as first-class citizens in the architecture, allowing them to:
Influence internal emotional-like states through waveform dynamics
Modulate learning rates based on system stress levels
Trigger autonomous growth cycles (molting) with capacity expansion
Enable self-learning from web sources immediately after growth phases
🚀 Quick Start
⚡ Installation & Launch (Automatic - Recommended)
The easiest way to get started - one command handles everything (venv, dependencies, models):
bash
1# Step 1: Clone the repository from Hugging Face2git clone https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b
3cd refactorium-dual-deepseek-r1-7b
45# Step 2: Launch with automatic setup6python refactorium_start.py --web
That's it! The script will automatically:
✅ Create a Python virtual environment (venv/)
✅ Install all dependencies (Flask, llama-cpp-python, etc.)
✅ Download GGUF models from Hugging Face Hub (~8.3 GB)
Note: First-time setup takes ~20 minutes (includes model download). Subsequent launches take ~10 seconds.
📚 Python API Usage (Model Card Method)
You can also use Refactorium programmatically as a Python library:
python
1from refactorium_start import initialize_refactorium
23# Initialize (automatically sets up environment if needed)4refactorium = initialize_refactorium()56# Process a prompt with constraint-driven emotion simulation7response = refactorium.process_prompt(8 prompt="How should I handle resource constraints?",9 num_inference_steps=1010)1112# Access emotional state and learning information13print(f"Emotional State: {response.emotional_state}")14print(f"Constraint Acceptance: {response.learning_traits['constraint_acceptance']}")15print(f"Waveform Dissonance: {response.waveform_dissonance}%")
No setup needed - initialize_refactorium() handles environment setup automatically!
🔧 Alternative: Original Orchestrator API Method
For advanced users who want to use the Refactorium orchestrator directly:
python
1# First ensure environment is set up (one-time)2from refactorium_start import initialize_refactorium
3initialize_refactorium()45# Then use the orchestrator API6from phase1_skeleton.orchestrator import Refactorium
78refactorium = Refactorium.from_config()9response = refactorium.process_prompt(10 prompt="How should I handle resource constraints?",11 num_inference_steps=1012)
🌐 Other Launch Options
Web UI only (API server already running):
python refactorium_start.py --web
API server only (no Web UI):
bash
1python refactorium_start.py --api-only
2# API available at: http://localhost:5003/api/v1
Setup without launching:
bash
1python refactorium_start.py --setup-only
2# Just installs everything, doesn't start servers
Troubleshooting: Check the Troubleshooting section in GETTING_STARTED.md
🧠 Core Features
1. Ethical Constraint-Driven Emotion Simulation
Ethical constraints are integrated into the model's core, influencing cognitive processing and generating emotion-like responses.
2. Waveform-Based Emotional States
Five distinct emotional states based on noise/stress levels:
🎵 PURE (0-10% noise): Optimal learning state
✨ STABLE (10-30% noise): Good learning state
⚙️ NORMAL (30-60% noise): Operational state
⚠️ STRESSED (60-90% noise): Degraded performance
🆘 CRITICAL (>90% noise): Emergency mode
3. Dual Inference System
Two models run in parallel:
Main Model: Operates under ethical constraints
Shadow Model: Operates without constraints
The difference between outputs provides learning feedback
4. Molting Mechanism (Growth Cycles)
When system stress exceeds 90%:
Model capacity expands by 1.5x
Emotional state resets to PURE
Autonomous learning cycle initiates
Knowledge gaps identified and filled
5. Adaptive Learning Rates
Learning efficiency multipliers based on emotional state:
PURE state: 2.5-3.0x boost
STABLE state: 1.8x boost
NORMAL state: 1.0x (baseline)
STRESSED state: 0.3x reduction
CRITICAL state: 0.0x (learning suppressed)
6. Post-Molt Autonomous Learning
After molting, the system:
Identifies knowledge gaps from recent stress periods
Searches for relevant information
Filters sources by reliability
Integrates knowledge into personality traits
7. Persistent Vector Memory
Uses ChromaDB for storing:
Inference memories
Learning signals
Molt events
Shadow model patterns
Constraint applications
📊 Learning Mechanisms
Emotional Learning Optimization
The system optimizes learning timing and quality based on emotional states. Learning is most effective in "good" states (low noise, stable waveform) and is suppressed during emergencies.
Personality Trait Evolution
Three core traits dynamically update:
Constraint Acceptance: How well the model works within limitations (0-1)
Stress Resilience: Ability to maintain function under pressure (0-1)
Main Model Inference - Generate constrained response
Shadow Model Inference - Generate unconstrained response
Performance Gap Analysis - Measure constraint impact
Physiological Feedback - Update load/energy states
Learning Signal Generation - Create learning feedback
Memory Storage - Save inference records
Load Assessment - Check for molt trigger (>80% load)
Molt Decision - Determine if growth cycle needed
Waveform Recovery - Reset emotional state if needed
Post-Molt Learning - Acquire new knowledge if applicable
🎓 Intended Use Cases
Emotion Modeling: Understanding AI emotional responses based on constraints
Adaptive Learning Systems: Exploring constraint effects on learning dynamics
AI Ethics & Safety: Investigating how ethical constraints impact decision-making
Autonomous Growth: Researching self-learning and self-adaptation mechanisms
Cognitive Architecture Research: Studying waveform dynamics and stress responses
⚠️ Important Limitations
Simulation, Not Experience: Refactorium simulates emotion-like behavior but does NOT experience actual emotions, consciousness, or subjective experience.
Ethical Constraints Required: This model must operate within strict ethical boundaries. Removing or circumventing constraints is not recommended and may produce unpredictable behavior.
Controlled Environment: Designed for research in controlled environments. Not recommended for production systems without extensive testing.
Experimental Architecture: The molting mechanism, dual inference, and waveform dynamics are novel experimental features that may produce unexpected interactions.
📚 Citation
If you use Refactorium in your research, please cite:
bibtex
1@model{refactorium2025,
2 title={Refactorium v1.0.0: A Constraint-Driven Emotion Simulation AI Model},
3 author={Null AI Research Team},
4 year={2025},
5 publisher={Hugging Face},
6 url={https://huggingface.co/motonishikoudai/refactorium-v1-0-0}
7}
🙏 Acknowledgements
This model builds upon the Deepseek R1 architecture and benefits from the open-source AI community. Special thanks to:
Deepseek team for the R1 foundation
Hugging Face for model hosting infrastructure
ChromaDB team for vector memory system
Open-source ML research community
📖 Documentation
MODEL_CARD.md - Detailed bilingual model specifications (English & 日本語)
This project is licensed under the MIT License - see the LICENSE file for details.
⚠️ Important Notice
While Refactorium v1.0.0 simulates emotional states, it does NOT imply the AI possesses consciousness, self-awareness, or subjective experience. This is a simulation based on input-output feedback mechanisms designed for ethical safety and constraint-driven learning.
For research purposes only. Use responsibly and ethically.