File size: 647 Bytes
6c30dd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | import os
from huggingface_hub import HfApi, login
print("Iniciando entrenamiento MarsLM")
# Entrenar modelo
os.system(
"python training/train.py "
"--config configs/marslm-300M.yaml "
"--train-file artifacts/data/tokens.pt "
"--tokenizer-model artifacts/tokenizer/marslm.json "
"--output-dir artifacts/checkpoints "
"--epochs 3 "
"--batch-size 1 "
"--gradient-accumulation-steps 4"
)
print("Subiendo checkpoint a Hugging Face")
api = HfApi()
api.upload_folder(
folder_path="artifacts/checkpoints",
repo_id="Ian26/MarsLM",
repo_type="model"
)
print("MarsLM actualizado") |