Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to resume training? #43

Open
RK-BAKU opened this issue Oct 25, 2022 · 3 comments
Open

How to resume training? #43

RK-BAKU opened this issue Oct 25, 2022 · 3 comments

Comments

@RK-BAKU
Copy link

RK-BAKU commented Oct 25, 2022

Hi guys!
Is it possible to continue training from specific checkpoint?

@mgh1
Copy link

mgh1 commented Feb 20, 2023

This is important! Any help on this one?

@CherylChaoNYCU
Copy link

CherylChaoNYCU commented May 21, 2023

@RK-BAKU @mgh1

Hi, for me I just load the model I saved and then keep training on the model:

model.load_model("t5", 'file/to/your/trained/model', use_gpu=True)

#the rest is all the same for training

MAX_EPOCHS = 3

torch.cuda.memory_summary(device=None, abbreviated=False)
torch.utils.checkpoint

model.train(train_df=df[0:(int)(0.7TRAINNING_SIZE)],
eval_df=df[(int)(0.7
TRAINNING_SIZE):TRAINNING_SIZE],
source_max_token_len=MAX_LEN,
target_max_token_len=SUMMARY_LEN,
batch_size=5, max_epochs=MAX_EPOCHS, outputdir='/content/gdrive/MyDrive/HW5_HL_gen/t5model',use_gpu=True)

@kolaganisankar
Copy link

@RK-BAKU @mgh1

Hi, for me I just load the model I saved and then keep training on the model:

model.load_model("t5", 'file/to/your/trained/model', use_gpu=True)

#the rest is all the same for training

MAX_EPOCHS = 3

torch.cuda.memory_summary(device=None, abbreviated=False) torch.utils.checkpoint

model.train(train_df=df[0:(int)(0.7_TRAINNING_SIZE)], eval_df=df[(int)(0.7_TRAINNING_SIZE):TRAINNING_SIZE], source_max_token_len=MAX_LEN, target_max_token_len=SUMMARY_LEN, batch_size=5, max_epochs=MAX_EPOCHS, outputdir='/content/gdrive/MyDrive/HW5_HL_gen/t5model',use_gpu=True)

How do you save the model?

Because there doesnt seems to be any save model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants