jzhang38 / TinyLlama

The TinyLlama project is an open endeavor to pretrain a 1.1B Llama model on 3 trillion tokens.
Apache License 2.0
7.83k stars 460 forks source link

What is the purpose of the "sanity check" which in the tinyllama.py? #80

Closed JerryDaHeLian closed 1 year ago

JerryDaHeLian commented 1 year ago

If the integrity check fails, there is no feedback for this code in the tinyllama.py: def train(fabric, state, train_dataloader, val_dataloader, monitor, resume): model = state["model"] optimizer = state["optimizer"]

if val_dataloader is not None:
    validate(fabric, model, val_dataloader)  # sanity check

Will this code continue to be improved in the future?

jzhang38 commented 1 year ago

This is solely to identify any potential bugs in the validation function that might disrupt the training. If this occurs, we can detect it immediately rather than 10 hours later during the training run's first validation.

JerryDaHeLian commented 1 year ago

This is solely to identify any potential bugs in the validation function that might disrupt the training. If this occurs, we can detect it immediately rather than 10 hours later during the training run's first validation.

Thank you for your reply! But important point is “If the integrity check fails, there is no feedback for this code in the tinyllama.py:” ,I found that even if there was an error, there was no output in the validate Function body。