A trainable agent for role-playing that learns from actual experiences, characteristics, and emotions to simulate historical figures without requiring additional prompts or reference documents.
One Minute Overview#
Character-LLM is a trainable agent specifically designed for role-playing that can think and respond like historical figures such as Beethoven, Cleopatra, and Socrates. Unlike simple prompted agents, Character-LLMs are specially trained with detailed character-specific knowledge and representative personality traits, eliminating the need for constant prompting.
Core Value: Generates diverse training data through Experience Reconstruction technology, enabling AI to authentically simulate the behavior, language, and knowledge systems of historical figures.
Quick Start#
Installation Difficulty: High - Requires GPU infrastructure and specialized AI knowledge
# Clone repository
git clone https://github.com/choosewhatulike/trainable-agents.git
cd trainable-agents
# Install dependencies
pip install -r requirements.txt
# Download model weights
# Requires base model (llama-7b) first, then apply weight differences
Is this suitable for me?
- ✅ Role-playing game development: Scenarios requiring interaction with historical figures
- ✅ Educational applications: Letting students learn by conversing with historical figures
- ✅ Creative writing assistance: Providing dialogue and interactions in specific character styles
- ❌ Simple chatbots: No need for specific role-playing functionality
- ❌ Commercial applications: Models and data are for academic research only
Core Capabilities#
1. Authentic Role-Playing - Accurate Historical Figure Simulation#
Character-LLMs can think and respond like specific historical figures, using tone, manner, and vocabulary appropriate to each character, with complete knowledge of that character. Real Value: Creates genuinely lifelike historical character interaction experiences, enhancing authenticity in educational and entertainment applications
2. Character-Specific Knowledge Base - Detailed Character Backgrounds#
Each character model contains extensive training data specific to that character, averaging 1.6K scenes, 754K words, and 13.2 dialogue turns. Real Value: Ensures character responses align with historical facts and personality traits, preventing responses inconsistent with the character's identity
3. Experience Reconstruction Technology - High-Quality Data Generation#
Through a unique Experience Reconstruction process, uses GPT-3.5-turbo to generate detailed and diverse character experience data, including scene extraction, interaction generation, and hallucination protection scenarios. Real Value: Reduces manual data collection costs while improving character model quality and consistency
4. Multi-Character Support - Nine Historical Figures#
Offers pre-trained models for nine historical figures including Beethoven, Cleopatra, Voldemort, Spartacus, Hermione, Newton, Caesar, Socrates, and Martin Luther King Jr. Real Value: No need to train from scratch, directly use high-quality historical character models
5. Distributed Training Support - Efficient Model Training#
Supports multi-GPU distributed training, completing model training in 30-45 minutes on 8 A100 GPUs. Real Value: Accelerates training of large-scale character models, improving research efficiency
Technology Stack & Integration#
Development Language: Python Main Dependencies: FastChat, Transformers, Hugging Face Hub, PyTorch Integration Method: API / SDK / Library
Ecosystem & Extension#
- Plugins/Extensions: Based on FastChat framework, supports extended functionality
- Integration Capabilities: Can integrate with existing LLM ecosystems, supports model weight differential application
Maintenance Status#
- Development Activity: Active project with regular updates
- Recent Updates: Recent maintenance activities supporting model training and inference
- Community Response: Related discussions in academic research community, suitable for research and experimentation
Commercial & License#
License: Code Apache-2.0, Data CC BY-NC 4.0
- ✅ Commercial: Code allows commercial use, models and data for academic research only
- ✅ Modification: Allows code and model modification
- ⚠️ Restrictions: Models and data cannot be used for commercial purposes
Documentation & Learning Resources#
- Documentation Quality: Comprehensive
- Official Documentation: https://github.com/choosewhatulike/trainable-agents
- Example Code: Provides single-turn and multi-turn conversation examples, character creation tutorials