Skip to content

Commit

Permalink
remove target class method
Browse files Browse the repository at this point in the history
  • Loading branch information
irenedea committed Jul 23, 2024
1 parent 118e96c commit 3a91265
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions llmfoundry/models/mpt/modeling_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3a91265

Please sign in to comment.