Skip to content

Conversation

[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Jan 28, 2026
`torch.autograd.grad` will raise an error if any tensor of `input` does
not require gradient, e.g, the frozen `lm_head`. This commit just fix
it with a simple control flow.


ghstack-source-id: 10ade62
Pull-Request: InternLM#1458
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Jan 28, 2026
`torch.autograd.grad` will raise an error if any tensor of `input` does
not require gradient, e.g, the frozen `lm_head`. This commit just fix
it with a simple control flow.


ghstack-source-id: 10ade62
Pull-Request: InternLM#1458
[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Jan 28, 2026
`torch.autograd.grad` will raise an error if any tensor of `input` does
not require gradient, e.g, the frozen `lm_head`. This commit just fix
it with a simple control flow.


ghstack-source-id: 70be6dd
Pull-Request: InternLM#1458
[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Jan 28, 2026
`torch.autograd.grad` will raise an error if any tensor of `input` does
not require gradient, e.g, the frozen `lm_head`. This commit just fix
it with a simple control flow.


ghstack-source-id: be56a30
Pull-Request: InternLM#1458
[ghstack-poisoned]
HAOCHENYE added a commit to HAOCHENYE/xtuner that referenced this pull request Jan 28, 2026
`torch.autograd.grad` will raise an error if any tensor of `input` does
not require gradient, e.g, the frozen `lm_head`. This commit just fix
it with a simple control flow.


ghstack-source-id: ec3804f
Pull-Request: InternLM#1458
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

Successfully merging this pull request may close these issues.

2 participants