Skip to content
New issue

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

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

Already on GitHub? # to your account

crossencoder training on multigpu #2991

Open
riyajatar37003 opened this issue Oct 16, 2024 · 2 comments
Open

crossencoder training on multigpu #2991

riyajatar37003 opened this issue Oct 16, 2024 · 2 comments

Comments

@riyajatar37003
Copy link

Hi,

I can see how to train embedding model with brand new trainer. but i couldn't see same for crossencoder.
can you point me if i am missing ?

Thanks
https://sbert.net/docs/sentence_transformer/training_overview.html

@riyajatar37003
Copy link
Author

https://sbert.net/docs/package_reference/cross_encoder/cross_encoder.html#training-inputs
in this code , how can i save checkpoints after k-steps of training ?

@tomaarsen
Copy link
Collaborator

The CrossEncoder training hasn't yet been updated to use a new modern Trainer, that's still on my TODO-list, I'm afraid.
There's currently not a very convenient way to save checkpoints every k steps. The easiest is actually to subclass the CrossEncoder, copy the fit method, and add a line like if training_steps % 1000 == 0: self.save(output_path + str(training_steps)) or something like it.

Apologies. I'll improve CrossEncoder support in the coming months.

  • Tom Aarsen

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

No branches or pull requests

2 participants