Skip to content
DeepForgeby svx
All problems

Entropy Coefficient Schedule

Problem

Geometrically anneal the entropy coefficient from beta_start to beta_end.

Return beta_start * (beta_end / beta_start)^(t / total_steps). If total_steps is not positive or t is at least total_steps, return beta_end.

Hint

Geometric decay reduces the entropy bonus by a constant factor per unit of progress.

Test cases

case 1
in: [0,100,1,0.01]
expected: 1
case 2
in: [50,100,1,0.01]
expected: 0.1
case 3
in: [100,100,1,0.01]
expected: 0.01
case 4
in: [25,100,0.04,0.01]
expected: 0.028284271247461905
Starter codePython
import math
def entropy_coefficient_schedule(t, total_steps, beta_start, beta_end):
    # Your code here
    pass

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