Pre-Forward and Post-Forward Callbacks? #2300
|
Hi everyone. Does this library support adding calls to custom functions on specific points of the training loop? For example, calling a custom function before each forward pass and/or after each forward pass. |
Answered by
NanoCode012
Jan 31, 2025
Replies: 1 comment
|
Hello, since we wrap transformers Trainer. You can create a callback and add it to the trainer Here are the possible hook options You can see the callbacks we have in the repo here: |
0 replies
Answer selected by
eldarkurtic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, since we wrap transformers Trainer. You can create a callback and add it to the trainer
Here are the possible hook options
on_step_begin: https://huggingface.co/docs/transformers/main_classes/callback#transformers.TrainerCallback.on_step_beginYou can see the callbacks we have in the repo here:
src/axolotl/utils/callbacks/__init__.py