Skip to content

Fix internvl2.5/3 deepspeed packing #3855

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 12, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix internvl3 packing
  • Loading branch information
Jintao-Huang committed Apr 12, 2025
commit bc0bc1a3142efa8f95eefb7d187bb90ecb1b7023
2 changes: 1 addition & 1 deletion swift/trainers/trainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def compute_loss(self, model, inputs, return_outputs=False, num_items_in_batch=N
if loss_scale is not None:
loss_kwargs['loss_scale'] = loss_scale

with self.template.compute_loss_context(model, inputs):
with self.template.compute_loss_context(self.model, inputs):
outputs = model(**inputs)
# Save past state if it exists
# TODO: this needs to be fixed and made cleaner later.
Expand Down