diff --git a/llmfoundry/models/mpt/modeling_mpt.py b/llmfoundry/models/mpt/modeling_mpt.py index 0afb493844..94e5fa29d5 100644 --- a/llmfoundry/models/mpt/modeling_mpt.py +++ b/llmfoundry/models/mpt/modeling_mpt.py @@ -79,6 +79,8 @@ from llmfoundry.models.layers.norm import LPLayerNorm # type: ignore # isort: on +from llmfoundry.utils.warnings import VersionedDeprecationWarning + log = logging.getLogger(__name__) CROSS_ENTROPY_IGNORE_INDEX = -100 @@ -1360,6 +1362,12 @@ def compute_loss_from_logits( else: loss = losses.sum() / (targets != loss_fn.ignore_index).sum() if sample_weighing_factor is not None: + warnings.warn( + VersionedDeprecationWarning( + message='sample_weighing_factor has been deprecated!', + remove_version='0.17.0', + ), + ) if sample_weighing_factor.shape[0] > 1: raise ValueError( 'Sample weighing factor is not supported when batch["sample_weighing_factor"].shape[0] > 1.',