Skip to content

Conversation

priyakasimbeg
Copy link
Contributor

No description provided.

@priyakasimbeg priyakasimbeg requested a review from a team as a code owner October 6, 2025 20:53
Copy link

github-actions bot commented Oct 6, 2025

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@priyakasimbeg priyakasimbeg changed the title updates to input_pipeline and model spec Updates to LM PR Oct 8, 2025
loss = -jnp.sum(targets * jax.nn.log_softmax(logits, axis=-1))
return loss
# TODO(kasimbeg): add weights?
metrics = self.compute_weighted_cross_entropy(logits, batch['targets'], batch['weights'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this workload I don't think we need weights for the cross-entropy calculation. Maybe we should explicitly del any weights?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The weights are used to identify padded elements in the validation split and correctly calculate the number of tokens returned in the eval dict.

ds,
)

return iter(it)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we use itertools.cycle here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No I don't think so. The input_pipeline already calls .repeat() on the train split and we don't want cycle on the validation split.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants