Skip to content
DeepForgeby svx
All problems
EasyDeep Learningdl-446

Per User Token Rate

Problem

Compute the per-user decode rate when each user receives exactly one token per engine step: 1000 / step_time_ms tokens per second.

The signature is per_user_token_rate(step_time_ms). Return tokens per second as a float.

Hint

One token per step means the per-user rate is simply the step rate.

Test cases

case 1
in: [20]
expected: 50
case 2
in: [8]
expected: 125
case 3
in: [100]
expected: 10
case 4
in: [0.5]
expected: 2000
Starter codePython
def per_user_token_rate(step_time_ms):
    # Your code here
    pass

4 test cases · run your code against them in the editor