Skip to content

Commit 575362a

Browse files
committed
Clarify Princeton cross-entropy constraints
1 parent 07cfe54 commit 575362a

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

problems/princeton/cross_entropy_py/submission.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1+
#!POPCORN leaderboard princeton_cross_entropy
2+
13
"""
24
Baseline submission for the cross-entropy problem.
35
46
Replace these functions with a faster implementation.
57
8+
The evaluator uses:
9+
- B = 4096
10+
- V in {32000, 50264, 128256}
11+
- V % 8 == 0
12+
- finite real-valued logits (no masking with -inf)
13+
614
Example local bandwidth calculation for the three ranked shapes:
715
816
def print_max_bw(batch_size, vocab_size, combined_ms):

problems/princeton/cross_entropy_py/task.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,27 @@ description: |
1313
- cross_entropy_backward(logits, targets, grad_output) -> grad_logits
1414
1515
Inputs:
16-
- logits: torch.bfloat16 tensor of shape (B, V)
16+
- logits: torch.bfloat16 tensor of real-valued, finite logits with shape (B, V)
1717
- targets: torch.int64 tensor of shape (B,)
1818
- grad_output: torch.float32 tensor of shape (B,)
1919
2020
Outputs:
2121
- forward output: torch.float32 tensor of shape (B,)
2222
- backward output: torch.bfloat16 tensor of shape (B, V)
2323
24+
Assumptions used by the evaluator and benchmark:
25+
- batch size is fixed at B = 4096
26+
- vocab sizes are V in {32000, 50264, 128256}
27+
- vocab size is guaranteed to be divisible by 8
28+
- logits are ordinary real numbers; masked values such as -inf are not used
29+
2430
config:
2531
main: "eval.py"
2632

2733
tests:
2834
- {"vocab_size": 32000}
35+
- {"vocab_size": 50264}
36+
- {"vocab_size": 128256}
2937

3038
benchmarks:
3139
- {"vocab_size": 32000}

0 commit comments

Comments
 (0)