LLM research codebase for training and inference
Top 10.8% on sourcepulse
Meta Lingua is a minimal and fast PyTorch library for LLM research, enabling end-to-end training, inference, and evaluation. It targets researchers seeking to experiment with novel architectures, losses, and data, offering a lean, easily modifiable codebase for quick iteration and analysis of speed and stability.
How It Works
Lingua provides a modular PyTorch-based framework with core components for model architecture, distributed training (supporting Data Parallel, FSDP, Model Parallelism, torch.compile
, activation checkpointing, and float8), data loading, profiling, and checkpoint management. Its distributed.py
module is key, abstracting complex parallelism strategies into a single parallelize_module
function. Configurations are managed via dataclasses and YAML files, allowing flexible parameter tuning.
Quick Start & Requirements
git clone https://github.com/facebookresearch/lingua
and bash setup/create_env.sh
or sbatch setup/create_env.sh
.python setup/download_prepare_hf_data.py
and tokenizer download via python setup/download_tokenizer.py
.Highlighted Details
torch.compile
for efficiency.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is noted as being under development. Configuration files are templates requiring user adaptation for specific hardware and data paths. Debugging and rapid iteration are facilitated by SLURM job management and local torchrun
execution.
2 weeks ago
1 day