Download scripts/train.py from ThomasTheMaker/pico-decoder-tiny-experiments: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/ThomasTheMaker/pico-decoder-tiny-experiments/resolve/a1f100c9548202e80bd367f574ba4045706ee2ba/scripts/train.py
- Command line
-
hf download hf://ThomasTheMaker/pico-decoder-tiny-experiments@a1f100c9548202e80bd367f574ba4045706ee2ba/scripts/train.py
-
curl -L -o train.py https://huggingface.co/ThomasTheMaker/pico-decoder-tiny-experiments/resolve/a1f100c9548202e80bd367f574ba4045706ee2ba/scripts/train.py
751 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| A minimal script to train the Pico language model. In practice, you should just use the | |
| `poetry run train` command to run the training pipeline. Doing so will invoke this script. | |
| Training logic is located in `src/training/trainer.py`. | |
| """ | |
| from pathlib import Path | |
| import click | |
| from src.training.trainer import Trainer | |
| def main(config_path: Path) -> None: | |
| """Train the Pico language model using the specified configuration.""" | |
| trainer = Trainer(config_path=str(config_path)) | |
| trainer.train() | |
| if __name__ == "__main__": | |
| main() | |