Skip to content

Commit ad3578b

Browse files
authored
Added second control argument to NoisyInterpolatingDiscreteFlow
1 parent 32bd84b commit ad3578b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/processes.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,21 @@ end
4242

4343
"""
4444
NoisyInterpolatingDiscreteFlow(κ₁, κ₂, dκ₁, dκ₂)
45-
NoisyInterpolatingDiscreteFlow(noise) - Uses default cosine schedule, where `noise` is the maximum amplitude of the uniform noise component.
45+
NoisyInterpolatingDiscreteFlow(noise, K = 1) - Uses default cosine schedule, where `noise` is the maximum amplitude of the uniform noise component.
4646
NoisyInterpolatingDiscreteFlow() - Uses default cosine schedule and noise = 0.2.
4747
4848
A convex mixture of X0, uniform noise, and X1. Equation 10 in https://arxiv.org/pdf/2407.15595
4949
Compared to InterpolatingDiscreteFlow, it encourages the model to make multiple switches during inference.
5050
κ₁, κ₂ are the schedules for target token interpolation and uniform noise probability.
5151
dκ₁, dκ₂ are the derivatives of κ₁, κ₂.
52-
Defaults to using a cosine schedule.
52+
Defaults to using a cosine schedule. `K=2` will resolve the discrete states later than `K=1`.
5353
"""
5454

55-
NoisyInterpolatingDiscreteFlow(noise) = NoisyInterpolatingDiscreteFlow(
56-
t -> oftype(t,(1 - cos((π/2)*t))),
57-
t -> oftype(t,(noise * sin*t))),
58-
t -> oftype(t,((π/2)*sin((π/2)*t))),
59-
t -> oftype(t,(noise*π*cos*t))),
55+
NoisyInterpolatingDiscreteFlow(noise, K = 1) = NoisyInterpolatingDiscreteFlow(
56+
t -> oftype(t,(1 - cos((π/2)*t))^K), #K1
57+
t -> oftype(t,(noise * sin*t))), #K2
58+
t -> oftype(t,(K * /2) * sin((π/2) * t) * (1 - cos((π/2) * t))^(K - 1))), #dK1
59+
t -> oftype(t,(noise*π*cos*t))) #dK2
6060
)
6161
NoisyInterpolatingDiscreteFlow() = NoisyInterpolatingDiscreteFlow(0.2)
6262

0 commit comments

Comments
 (0)