mirror of
https://github.com/deepseek-ai/DeepSeek-MoE.git
synced 2026-11-05 00:57:43 +00:00
[GH-ISSUE #17] Question about AddAuxiliaryLoss? #14
Labels
No labels
pull-request
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-MoE#14
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @KaiWU5 on GitHub (Jan 26, 2024).
Original GitHub issue: https://github.com/deepseek-ai/DeepSeek-MoE/issues/17
In the code
AddAuxiliaryLoss, the loss is not stored or used in the forward function, does that mean the grad is constantly to be 1? should it be grad_output * loss?Thanks a lot if you can straighten this out for me.
@DeepSeekDDM @zwd003 Thanks a lot for helping.
@Hunter-DDM commented on GitHub (Jan 29, 2024):
For the aux loss, the gradient with respect to itself is always 1. This is equivalent to adding the aux loss to the final loss.