def beta_at

mlbend-generative@0.1.1.0 · main.bend:132

import mlbend-generative@0.1.1.0/main.bend as MlbendGenerative
import Base

132# β_t, the ratio the reverse step removes: 1 - ᾱ_t/ᾱ_{t-1}, clamped at
133# 0.99 — the cosine schedule's last ratio is 1 in F32 (ᾱ_T ~ 1e-15), and
134# the reverse step's 1/sqrt(1-β) would amplify any prediction error
135def beta_at(+t: Nat, +steps: Nat) -> F32:
136  F32.min((1.0 - (alpha_at(t, steps) / alpha_at(Nat.sub(t, 1n), steps) : F32) : F32), 0.99)

Uses (7)

Used by (0)

No other definition uses this definition.