describe how this repo works
- User
describe how this repo works
Assistant
Based on the repository content, I'll explain how the self-adaptive-llms (Transformer²) system works:
Core Concept: Transformer² is a framework that allows Large Language Models (LLMs) to adapt in real-time for different tasks without traditional fine-tuning. It does this by selectively adjusting only the singular components of the model's weight matrices during inference.
Key Components:
- Two-Pass Mechanism:
- First Pass: A dispatch system identifies the properties of the incoming task
- Second Pass: Task-specific "expert" vectors are dynamically mixed to obtain targeted behavior for the prompt
- Training Process: The system supports multiple optimization algorithms:
- Reinforce: Uses policy gradient reinforcement learning
- Random Shooting: Tries multiple random parameter sets and selects the best performing one
- CEM (Cross-Entropy Method): An evolutionary strategy that iteratively updates a probability distribution over parameters
- Task Handling:
- Supports various tasks including:
- Code generation (mbpp2)
- Mathematical reasoning (gsm8k)
- General reasoning (ai2_arc)
- Classification tasks
- Model Architecture:
- Built on top of existing LLM architectures (appears to use Llama variants)
- Modifies only specific components of the model weights rather than the entire model
- Uses a policy-based approach to determine how to adapt the model weights
- Evaluation:
- Supports both prompt-based and few-shot evaluation methods
- Can evaluate performance across different tasks
- Includes metrics for both task performance and model behavior
Usage Flow:
- Installation:
bashgit clone https://github.com/SakanaAI/self-adaptive-llms cd self-adaptive-llms conda create -n t2 python=3.11 -y conda activate t2 pip install -r requirements.txt- Training:
bashbash scripts/train_task_expert.sh- Evaluation:
bash- User
how Transformer² dynamically adapt its behavior during inference time by adjusting only the most important components of its weights?
Assistant
- User
dose this make sense or not? why?
Assistant
- User
Please evaluate this repo rigorously
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.