From 3a912657374d2eba7353b35b2053b356b7e9a84a Mon Sep 17 00:00:00 2001 From: Irene Dea Date: Tue, 23 Jul 2024 12:03:34 +0000 Subject: [PATCH] remove target class method --- llmfoundry/models/mpt/modeling_mpt.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/llmfoundry/models/mpt/modeling_mpt.py b/llmfoundry/models/mpt/modeling_mpt.py index 956b0d0624..f3f7c1320e 100644 --- a/llmfoundry/models/mpt/modeling_mpt.py +++ b/llmfoundry/models/mpt/modeling_mpt.py @@ -1395,11 +1395,6 @@ def model_class(self) -> Type[MPTForCausalLM]: def config_class(self) -> Type[MPTConfig]: return MPTConfig - def get_targets(self, batch: Mapping) -> torch.Tensor: - targets = torch.roll(batch['labels'], shifts=-1) - targets[:, -1] = -100 - return targets - def forward(self, batch: MutableMapping) -> CausalLMOutputWithPast: if self.config.ffn_config['ffn_type'] in ffns_with_megablocks: # Clear MegaBlocks MoE load balancing loss cache