Skip to content

Commit 988d683

Browse files
committed
Update
[ghstack-poisoned]
2 parents 0baec15 + f0b88bd commit 988d683

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

xtuner/v1/loss/base_loss_ctx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from typing_extensions import Self
1313

1414
from xtuner.v1.loss.utils import sp_split
15-
from xtuner.v1.model.utils.misc import ModelForwardExtraLogInfo
1615

1716
from .chunk_loss import ChunkLoss
1817

@@ -187,6 +186,7 @@ def forward(
187186
head_weight: torch.Tensor,
188187
head_bias: torch.Tensor | None = None,
189188
) -> tuple[torch.Tensor, tuple[torch.Tensor | None, dict[str, Any]]]:
189+
from xtuner.v1.model.utils.misc import ModelForwardExtraLogInfo
190190
assert self.loss_kwargs is not None, "loss_kwargs must be set before calling forward"
191191
if head_bias is not None:
192192
raise NotImplementedError("Loss does not support head_bias yet.")

0 commit comments

Comments
 (0)