DLA/
├── cras/ # Contextualized Role Adherence Score
├── sail/ # Surgical Alignment of Instruction Layers
rubric_generator.py: Creates scoring rubrics for specific roles (Logician, Physicist, etc.)evaluate_scores.py: Main scoring engine with cost management and concurrent processingprompts/: Template prompts for rubric generation and multi-dimensional scoringconfigs/: API configuration for different model providers (DeepSeek, OpenAI, etc.)
src/llamafactory/: Training framework based on LlamaFactorysrc/train.py: Main training entry point (disables WANDB by default)llama_sail_config.yaml: Configuration file with SAIL-specific parameters
SAIL's surgical approach uses specific configurations:
- Base Model
- Reward Model for token-level reward signals
- Surgical Layers: Only focal layers
- LoRA Parameters: Rank 8, alpha 16, dropout 0.0
- SAIL Alpha: 0.5 parameter controls the balance between preference and reward learning
- Hardware: Multi-GPU distributed training with FSDP
- Dataset: FOCAL dataset
- Clone the repository
git clone <repository-url> cd DLA
-
Configure API keys in
cras/configs/api_config.json# Edit the API configuration file nano cras/configs/api_config.json -
Run evaluations: Use CRAS to evaluate agent outputs
python cras/evaluate_scores.py
-
Create conda environment and install dependencies
cd sail conda env create -f sail_environment.yml conda activate sail -
Train models: Use SAIL to train/fine-tune language models
cd sail bash train.sh