core.ops.loss.backends#
Selection of the vocab-parallel cross entropy a model binds.
Module Contents#
Functions#
Which cross entropy a config asks for, resolved once rather than on every forward. |
Data#
|
API#
- core.ops.loss.backends.CrossEntropyTarget#
None
loss = target(logits, labels, tp_group), withlogits[s, b, vocab/tp] and the target owning every reduction overtp_group. Targets consumelogits: they subtract the row max and exponentiate in place, so a caller that needs them afterwards passes a clone.
- core.ops.loss.backends.select_cross_entropy(
- cross_entropy_loss_fusion: bool = False,
- cross_entropy_fusion_impl: str = 'native',
- cuda_graph_impl: Optional[str] = None,
Which cross entropy a config asks for, resolved once rather than on every forward.
Shared by every provider: the choice depends on the config, not on which backend supplies the rest of the model, which is how it behaved before this was a provider decision.