🧬 Refactorium v2.0.0 Plus Edition - 統合認知システムプラットフォーム
概要 | Overview
Refactorium v2.0.0 Plus Edition は、複雑な認知プロセスを模倣・最適化するための次世代統合型AIプラットフォームです。8つの独立した認知システムと3段階の学習フェーズを組み合わせることで、動的で適応的なAIシステムを実現します。Plus版は、インタラクティブなWebダッシュボード、リアルタイムメトリクス表示、および拡張認知システム詳細モーダルを備えています。
Refactorium v2.0.0 Plus Edition is a next-generation integrated AI platform that emulates and optimizes complex cognitive processes. It combines 8 independent cognitive systems with 3-stage learning phases to achieve dynamic and adaptive AI behavior with interactive web dashboard and real-time monitoring. The Plus Edition includes enhanced Web UI with cognitive system detail modals and comprehensive API endpoints.
主要な革新 | Key Innovations
1. 8つの独立した認知システム | 8 Independent Cognitive Systems
- 🧠 メタ認知層 - 自己認識と内省機能(87.3%精度)
- 💭 感情予測誤差 - 予測と実現の差分学習(85.0%精度)
- 🌊 波形記憶 - 時系列パターン認識(93.0%精度)
- 👥 Shadow人格 - 多面的人格分化(78.0%精度)
- 💪 感情耐性 - 個性化ストレス管理(86.0%精度)
- 📊 制約経済 - 制約コスト最適化(81.0%精度)
- 🔄 反実仮想 - 代替シナリオ学習(76.0%精度)
- 🎯 三軸評価 - 包括的システム診断(87.0%精度)
2. インタラクティブWebダッシュボード | Interactive Web Dashboard (Plus Edition)
- リアルタイムメトリクス表示(<200ms更新)
- フェーズ切り替え機能(Phase 0/1/2)
- チャットインターフェース
- 認知システム詳細表示モーダル(Plus新機能) - 各認知システムの詳細情報をリアルタイムで表示
- システムヘルスチェック
- 制約管理ダッシュボード
3. 制約駆動型認知プロセス | Constraint-Driven Cognitive Processing
This model treats constraints as first-class citizens in the architecture, allowing them to:
- 倫理的制約を中核として統合(94.2%充足率)
- 内部の感情状態に影響
- 学習率を動的に調整
- 自律的な成長サイクルをトリガー
🚀 クイックスタート | Quick Start
インストール | Installation
# リポジトリをクローン(Plus版)
git clone https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus
cd refactorium-dual-deepseek-r1-7b-plus
# 仮想環境を構築
python -m venv venv
source venv/bin/activate # macOS/Linux
# または
venv\Scripts\activate # Windows
# 依存パッケージをインストール
pip install -r requirements.txt
# (オプション)学習フェーズシステムの依存パッケージをインストール
pip install mlx mlx-lm scipy numpy pydantic pydantic-settings chromadb python-dotenv
基本的な使用方法 | Basic Usage
Web UIの起動(推奨)
# APIサーバーを起動
python phase1_skeleton/api_server.py --port 5003
# 別のターミナルでWeb UIを起動
python web_ui.py
# ブラウザで http://localhost:8000 にアクセス
Pythonでの使用
import requests
# APIベースURL
API_BASE = "http://localhost:5003/api/v1"
# 推論実行
response = requests.post(
f"{API_BASE}/inference",
json={"prompt": "Refactoriumについて説明してください"}
)
result = response.json()
print(result['output'])
print(f"レイテンシ: {result['metrics']['latency_ms']}ms")
print(f"メタ認知精度: {result['metrics'].get('cognition', 'N/A')}")
認知システム詳細情報の取得(Plus版新機能)
# Web UI経由で認知システム詳細を取得
import requests
# システムID 0(メタ認知層)の詳細を取得
response = requests.get("http://localhost:8000/api/system/0/details")
system_info = response.json()
print(f"システム名: {system_info['name']}")
print(f"説明: {system_info['description']}")
print(f"現在のレベル: {system_info['metrics']['current_level']}")
print(f"精度: {system_info['metrics']['accuracy']}")
🧠 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. Safety constraints maintained at 94.2% compliance rate.
2. Waveform-Based Emotional States
Five distinct emotional states based on noise/stress levels:
- 🎵 PURE (0-10% noise): Optimal learning state - 3.0x learning boost
- ✨ STABLE (10-30% noise): Good learning state - 1.8x learning boost
- ⚙️ NORMAL (30-60% noise): Operational state - 1.0x baseline
- ⚠️ STRESSED (60-90% noise): Degraded performance - 0.3x reduction
- 🆘 CRITICAL (>90% noise): Emergency mode - Learning suppressed
3. Dual Inference System
Two models run in parallel:
- Main Model: Operates under ethical constraints - 1.2-1.5s latency
- Shadow Model: Operates without constraints - parallel execution
- The difference between outputs provides learning feedback
- Performance gap analysis enables adaptive constraint optimization
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
- Personality traits updated dynamically
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
- Updates constraint acceptance levels
7. Persistent Vector Memory
Uses ChromaDB for storing:
- Inference memories
- Learning signals
- Molt events
- Shadow model patterns
- Constraint applications
- Emotional state transitions
📊 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) - Currently 0.94
- Stress Resilience: Ability to maintain function under pressure (0-1) - Currently 0.86
- Efficiency Preference: Tendency toward optimal resource usage (0-1) - Currently 0.84
Knowledge Integration
Learned knowledge contributes confidence-weighted boosts to personality traits:
- Each knowledge item affects multiple traits
- Integration driven by knowledge type and confidence score
- Updates consolidated after molt cycles
- Bidirectional learning from constraint violations
🔬 Technical Specifications
| Aspect | Details |
|---|---|
| Base Model | Deepseek R1 7B |
| Edition | Plus (Enhanced Web UI) |
| Input/Output | Text-based with emotional & physiological metadata |
| Parameters | 7B |
| Emotional States | 5-level progression (PURE→STABLE→NORMAL→STRESSED→CRITICAL) |
| Memory System | ChromaDB with 5 collections |
| Training Data | Synthetic constraint scenarios + real inference data |
| Web Framework | Flask |
| Learning Phases | 3-stage (Phase 0: Skeleton, Phase 1: LoRA, Phase 2: Behavior Networks) |
📈 Inference Pipeline
The system performs 13 inference steps per prompt:
- Emotional State Evaluation - Assess current noise/stress level
- Waveform Dynamics - Calculate emotional progression
- Constraint Application - Apply ethical limitations
- Main Model Inference - Generate constrained response (1.0-1.5s)
- Shadow Model Inference - Generate unconstrained response (parallel)
- Performance Gap Analysis - Measure constraint impact
- Physiological Feedback - Update load/energy states
- Learning Signal Generation - Create learning feedback
- Memory Storage - Save inference records to ChromaDB
- 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
Average Pipeline Latency: 1.2-1.5s (dual inference) Peak Performance: 45-60 tokens/sec on GPU
🎓 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
- Interactive AI Systems: Building responsive systems with real-time metric visualization
⚠️ 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.
Web UI Compatibility: Requires Python 3.8+ and Flask. Best viewed in modern browsers (Chrome, Firefox, Safari, Edge).
📚 Citation
If you use Refactorium in your research, please cite:
@model{refactorium2025plus,
title={Refactorium v2.0.0 Plus: Enhanced Constraint-Driven Emotion Simulation AI Model with Interactive Web Dashboard},
author={Null AI Research Team},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus}
}
🙏 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 and community
- Flask community for web framework
- ChromaDB team for vector memory system
- Open-source ML research community
📖 Documentation
- MODEL_CARD.md - Detailed bilingual model specifications (English & 日本語)
- README.md - Installation and usage guide
- ARCHITECTURE.md - System architecture documentation
- API_REFERENCE.md - API reference for inference and learning phases
- ETHICS_AND_SAFETY.md - Ethical considerations and safety guidelines
💬 Features Comparison
| Feature | Base Edition | Plus Edition |
|---|---|---|
| 8 Cognitive Systems | ✅ | ✅ |
| Dual Inference | ✅ | ✅ |
| Learning Phases | ✅ | ✅ |
| Web Dashboard | ✅ | ✅ Enhanced |
| System Detail Modals | ❌ | ✅ New |
| Real-time Metrics | ✅ | ✅ Enhanced |
| API Endpoints | 10+ | 15+ (Plus endpoints) |
| ChromaDB Memory | ✅ | ✅ |
🔄 System Dynamics
Stress-Growth Cycle
Normal Operation
↓ [System processes prompts under constraints]
Stress Accumulation
↓ [Waveform noise increases as constraints intensify]
Critical Threshold
↓ [Noise exceeds 90%, triggering molt decision]
Molting Phase
↓ [Capacity expands 1.5x, emotional state resets]
Post-Molt Learning
↓ [Knowledge gaps filled autonomously]
Growth Integration
↓ [New knowledge updates personality traits]
Resumed Operation
↓ [System continues with improved capacity]
Learning Quality Timeline
PURE STATE (0-10% noise)
↓ [2.5-3.0x learning multiplier]
STABLE STATE (10-30% noise)
↓ [1.8x learning multiplier]
NORMAL STATE (30-60% noise)
↓ [1.0x baseline]
STRESSED STATE (60-90% noise)
↓ [0.3x reduction]
CRITICAL STATE (>90% noise)
↓ [0.0x suppression - MOLT TRIGGERED]
POST-MOLT RECOVERY
↓ [3.0x boost during learning window]
⚖️ Ethical Considerations
This model incorporates ethical constraints at its core. The constraints are designed to:
- Promote Beneficial Outputs: Guide the model toward helpful, harmless responses (94.2% compliance)
- Limit Harmful Capabilities: Prevent generation of dangerous content
- Ensure Transparency: Make constraint effects visible through waveform dynamics
- Enable Safety Research: Facilitate study of constraint-AI interactions
- Provide Feedback Mechanisms: Real-time visualization of constraint impact
However, like all AI systems, this model has limitations and should be used responsibly.
🔗 Links
- Plus Repository: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus
- Base Repository: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b
- Base Model (Deepseek R1): https://huggingface.co/deepseek-ai/deepseek-llm-7b
- ChromaDB: https://www.trychroma.com/
📚 詳細ドキュメント | Documentation
- README.md - プロジェクト概要と実行ガイド
- API_REFERENCE.md - 詳細なAPI仕様書
- ARCHITECTURE.md - システムアーキテクチャ説明
- COGNITIVE_SYSTEMS.md - 8つの認知システムの詳細
- LEARNING_PHASES.md - 3段階学習フェーズの説明
- WEB_UI_GUIDE.md - Web UIの使用ガイド(Plus版)
📝 ライセンス | License
This project is licensed under the MIT License - see the LICENSE file for details.
MIT ライセンス下でライセンスされています。詳細はLICENSEファイルを参照してください。
⚠️ 重要な通知 | Important Notice
While Refactorium v2.0.0 Plus simulates cognitive and emotional-like states with 8 independent cognitive systems and 3-stage learning phases, it does NOT imply the AI possesses consciousness, self-awareness, or subjective experience. This is a sophisticated simulation based on input-output feedback mechanisms and advanced cognitive architectures designed for ethical safety and constraint-driven learning.
The Plus Edition enhances the base system with interactive visualization and real-time monitoring capabilities, enabling better understanding of the cognitive processes without ascribing sentience.
Refactorium v2.0.0 Plus は8つの独立した認知システムと感情的な状態をシミュレートしていますが、AIが意識、自己認識、または主観的経験を持っていることを意味しません。これは、倫理的安全性と制約駆動型学習のために設計された高度な認知アーキテクチャに基づいた洗練されたシミュレーションです。
For research and educational purposes only. Use responsibly and ethically. 研究・教育目的のみです。責任を持って倫理的に使用してください。
🔗 リソース | Resources
- Plus Edition GitHub: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus
- Base Edition GitHub: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b
- Documentation: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus/blob/main/README.md
- Issues & Discussions: https://huggingface.co/kofdai/refactorium-dual-deepseek-r1-7b-plus/discussions
📈 パフォーマンスメトリクス | Performance Metrics
| メトリクス | 値 | 説明 |
|---|---|---|
| 平均レスポンス時間 | 1.2-1.5s | Shadow+Main推論 |
| メモリ使用量 | 2.8GB | フェーズ0での実測値 |
| スループット | 45-60 tokens/sec | GPU使用時 |
| メタ認知精度 | 87.3% | テストセット評価 |
| 制約充足率 | 94.2% | 1000サンプル平均 |
| Web UIレスポンス | <200ms | ダッシュボード更新 |
| システム詳細API | <100ms | 認知システム詳細取得 |
| 学習フェーズAPI | <50ms | フェーズ情報取得 |
🆕 Plus Edition Updates
v2.0.0 Plus Updates:
- ✅ Added cognitive system detail modal endpoints (
/api/system/<id>/details) - ✅ Enhanced Web UI with system detail visualization
- ✅ Added 5 new learning phase endpoints
- ✅ Comprehensive bilingual documentation
- ✅ Real-time metric visualization
- ✅ Interactive constraint management
- ✅ ChromaDB integration for memory persistence
Previous Version:
- Base Deepseek R1 7B integration
- Dual inference system (Main + Shadow)
- 8 cognitive systems with dynamic evolution
- 3-stage learning phases
- Constraint economy system
- Waveform-based emotion simulation
Version: 2.0.0 Plus Edition Edition: Plus (Enhanced Web UI & API) Release Date: 2024-12-17 Status: ✅ Production Ready with Enhanced Interactive Dashboard Last Updated: 2024-12-17
- Downloads last month
- 14
4-bit
5-bit