How lexsi-labs/aligntune works
AlignTune is a toolkit for LLM post-training: users configure training through its Python API or CLI, select an algorithm and backend, and train/evaluate models. Its major branches include SFT/RL and other training methods, reward functions, data preparation, model adaptation, evaluation/auditing, and model export/merging. The README documents capabilities and the training entry points; sampled source confirms the CLI-to-factory call. Other internal links are omitted where the excerpts do not establish ownership.
Main entry points: backend_factory.py Backend factory · unified.py Training CLI · main.py Training entry point · trainer_factory.py RL trainers
Components 23
User Entry
- Training CLI
src/aligntune/cli/unified.py - Training entry point
src/aligntune/main.py - Utility advisor
src/aligntune/core/advisor.py - Stage compositions
src/aligntune/core/composition/runner.py
Training Runtime
- Backend factory
src/aligntune/core/backend_factory.py - SFT trainers
src/aligntune/core/sft/trainer_factory.py - RL trainers
src/aligntune/core/rl/trainer_factory.py - TRL, Unsloth, ES
src/aligntune/backends - Distillation
src/aligntune/core/distill/trainer_factory.py - RAFT training
src/aligntune/backends/trl/raft/raft_trainer.py
Data and Models
- Dataset manager
src/aligntune/data/manager.py - Model loading
src/aligntune/core/model_loader.py
Rewards and Evaluation
- Reward functions
src/aligntune/rewards/core.py - Verifiable rewards
src/aligntune/rewards/verifiable.py - RL reward handling
src/aligntune/core/rl/reward_handler.py - Model evaluation
src/aligntune/eval/runner.py - Alignment audit
src/aligntune/eval/alignment_auditor.py
Model Extensions
- PEFT and adapters
src/aligntune/core/adapters - Long-context support
src/aligntune/core/long_context - Indic tokenization
src/aligntune/core/tokenization - Model merging
src/aligntune/core/merge - Model export
src/aligntune/core/export
Other components
- Engineer
Connections 23
- Engineer → Training CLI: runs commands
README.md - Engineer → Backend factory: creates trainer
README.md - Training CLI → Training entry point: runs training
- Training entry point → Backend factory: creates trainer
src/aligntune/main.py - Engineer → Utility advisor: estimates resources
README.md - Engineer → Stage compositions: orchestrates stages
README.md - Backend factory → TRL, Unsloth, ES: routes training
README.md - Backend factory → SFT trainers: creates SFT trainer
README.md - Backend factory → RL trainers: creates RL trainer
README.md - Backend factory → Distillation: creates trainer
README.md - Backend factory → RAFT training: creates trainer
README.md - Dataset manager → Backend factory: supplies datasets
- Model loading → Backend factory: supplies models
- RL trainers → RL reward handling: computes rewards
- RL reward handling → Reward functions: uses reward functions
src/aligntune/core/rl/reward_handler.py - Reward functions → Verifiable rewards: includes functions
src/aligntune/rewards/core.py - Engineer → Model evaluation: evaluates model
README.md - Engineer → Alignment audit: audits alignment
README.md - Engineer → PEFT and adapters: configures adapters
README.md - Engineer → Long-context support: configures context
README.md - Engineer → Indic tokenization: extends vocabulary
README.md - Engineer → Model merging: merges models
README.md - Engineer → Model export: exports model
README.md