All problems
Weight Load Time
Problem
Estimate how long it takes to stream a model's weights from memory once: model_bytes / (bandwidth_gbps * 1e6) milliseconds.
The signature is weight_load_time_ms(model_bytes, bandwidth_gbps). Return a float number of milliseconds.
Hint
This is the same memory-bound term that dominates each decode step.
Test cases
case 1
in: [14000000000,32]
expected: 437.5
case 2
in: [1000000000,1000]
expected: 1
case 3
in: [0,900]
expected: 0
case 4
in: [4000000000,900]
expected: 4.4444444444
Starter codePython
def weight_load_time_ms(model_bytes, bandwidth_gbps):
# Your code here
pass4 test cases · run your code against them in the editor