Hi, I was curious about how the self.loss_function is implemented in the Qwen2.5-VL model to compute the loss during training.
Could someone explain how it works or point me to the relevant part of the code?
Thank you so much for sharing. However, these issues predated the Transformers version 4.53.0.dev0. What I want to know is where the self.loss_function was implemented for these models so I can modify it correctly.
The loss functions are defined in src/transformers/loss/loss_utils.py. The logic for selecting which loss function to use is implemented in the PreTrainedModel class, located in src/transformers/modeling_utils.py.