nemo_automodel.components.loss.dllm_loss
nemo_automodel.components.loss.dllm_loss
Loss functions for diffusion LLM (dLLM) training.
All loss classes return DLLMLossOutput so the recipe can handle them
uniformly without branching on model type.
Module Contents
Classes
Functions
Data
API
Bases: Module
Flat cross-entropy loss for block-diffusion (diffusion_gemma) training.
The diffusion_gemma checkpoint uses uniform random-token (D3PM-uniform)
corruption, not absorbing [MASK]. Its loss is plain mean cross-entropy
over all supervised canvas positions (corrupted AND uncorrupted): the loss
support is the full selected canvas (target_mask = canvas_mask), which is
NOT noise-gated. noise_mask is accepted (for diagnostics) but does NOT
gate the loss support:
.. math:: \text{loss} = \frac{\sum_{i \in \text{supervised (canvas)}} \text{CE}_i}{N}
where N is the supervised canvas-token count. There is no 1/p (1/t)
reweighting (that is the absorbing-kernel ELBO weight, which does not apply
to the uniform kernel) and no autoregressive term. Flatness is a
property of this class, not of a caller passing p_mask = 1.
The signature matches MDLMCrossEntropyLoss /
HybridDiffusionLLMLoss so the recipe can call it uniformly; the
p_mask / causal_logits / loss_mask_ar / num_ar_tokens
arguments are accepted but ignored.
Compute the flat block-diffusion cross-entropy loss.
Parameters:
Model output logits over the canvas, shape [B, L, V].
Clean (uncorrupted) canvas token IDs, shape [B, L].
Boolean mask of corrupted positions, shape [B, L].
Ignored (flat loss has no per-token weight).
Supervised positions mask, shape [B, L].
If provided, the global corrupted-token count
used as the normalization denominator (summed across grad-acc
microbatches). If None, normalizes by the local corrupted
count in this microbatch.
Ignored (the flat loss scores the clean targets),
shape [B, L] when supplied.
Returns: DLLMLossOutput
class:DLLMLossOutput where total_loss == dllm_loss (no AR).
Bases: Module
Position-decay cross-entropy loss for DFlash draft model training.
Implements Eq. 4 of the DFlash paper:
.. math:: w_k = \exp!\left(-\frac{k-1}{\gamma}\right), \quad k = 1, \dots, T
where k indexes the predicted positions within a block (k=0 is the clean anchor and is not predicted; k=1 is the first masked position).
The normalization policy is selected by normalize. Pass num_tokens
as a global all-reduced denominator for consistency across DP replicas and
gradient-accumulation steps.
Paper default γ values (Appendix A.1):
- block size 16 → γ = 7
- block size 10 → γ = 5
- block size 8 → γ = 4
Parameters:
Decay parameter γ.
When True, compute the per-token NLL with the
chunked linear-CE path (forward_fused) — projects the
LM head and runs cross-entropy in position chunks, each wrapped in
torch.utils.checkpoint so the full [B, T, vocab] logits
tensor is never materialised (peak is one chunk). Keeps large
num_blocks_per_sample (e.g. paper-default 512) within memory on
full-vocab targets.
We deliberately do NOT use liger_kernel’s
LigerFusedLinearCrossEntropyLoss here: its custom autograd
Function computes grad_input eagerly in forward and only
integrates with FSDP via the model-patching redirection
(apply_liger_kernel_to_*). Used standalone under FSDP2 the
gradient does not reach the sharded model params (grad_norm 0).
The chunked path is plain autograd, so FSDP2 handles it correctly.
Number of predicted positions per chunk in the chunked linear-CE path. Smaller = lower peak memory, more recompute.
Loss denominator. "tokens" (default) divides the weighted
sum by num_tokens, a global all-reduced count that keeps the loss
consistent across DP replicas and grad-accum. "mean" divides by
the effective weight sum (w_k * block_mask).sum() for dflash, and
by batch * blocks for D-PACE — whose weights carry the objective’s
signal, so a weight-sum denominator would cancel it (and, being
per-rank, would bias the DP gradient average). The block count counts
sampled anchors rather than tokens, so it keeps both loss_type
values on a comparable scale without changing the D-PACE optimum.
Loss variant. "dflash" keeps the original decay-weighted
cross entropy. The "dpace*" variants use detached Dynamic
Position-Aware Cross-Entropy weights (D-PACE, arXiv:2605.18810).
Smoothing alpha for D-PACE confidence products.
Project one position chunk; return its per-token NLL and argmax-matches.
Wrapped in torch.utils.checkpoint by the caller, so the
[chunk, vocab] logits are recomputed in backward rather than held.
The argmax is non-differentiable, so it adds no backward cost.
Eq. 4 decay weights for the k predicted positions of one block.
Parameters:
Predicted positions per block (block_size - 1).
Device for the returned tensor.
Dtype for the returned tensor.
Returns: torch.Tensor
Tensor of shape [k]; all-ones (uniform) when loss_gamma is None
Compute detached D-PACE position weights.
Parameters:
Per-token NLL of the draft on the target token, shape
[batch, blocks, k]; the draft confidence is exp(-token_nll).
Taken as the NLL rather than the confidence so the smoothed
log-confidence stays finite even where exp(-token_nll)
underflows.
Float valid-position mask, same shape.
Boolean valid-position mask, same shape.
Returns: torch.Tensor
Detached weights of shape [batch, blocks, k], in token_nll’s
Per-rank (correct, count) sums per block offset.
Parameters:
Bool/float argmax-match tensor, shape [batch, blocks, k].
Valid-position mask, shape [batch, blocks, k].
Whether the caller supplied an explicit block layout.
Returns: torch.Tensor | None
(correct_per_pos, count_per_pos), each shape [k] and summed
Denominator for normalize="mean": weight sum for "dflash", else block count.
D-PACE is a weighted sum: the weight magnitude is the signal (the expected accepted-prefix length), so a weight-sum denominator would cancel exactly the variation the objective encodes, and a data-dependent denominator would desync the DP gradient average (exact only when every rank divides by the same constant).
The published objective divides by the batch size alone. We also divide by
the block count: it counts sampled anchors, not unmasked tokens, so unlike
a weight sum it cancels nothing the objective encodes, and it is
num_anchors whenever the batch supplies that many valid anchors —
i.e. a constant, leaving the gradient direction and the optimum unchanged.
What it buys is scale: without it, flipping loss_type in the YAML
moves the effective learning rate by orders of magnitude and the run
diverges instead of erroring. The reported value is correspondingly
n_blocks times smaller than the published one.
Parameters:
Position weights from position_weights, shape
[batch, blocks, k].
Batch size (weights.shape[0]).
Sampled-block count (weights.shape[1]); used for
D-PACE only when total_blocks is not given.
The trainer’s configured block-sampling budget (e.g.
num_anchors), used in place of n_blocks for D-PACE so the
denominator is identical on every DP rank. n_blocks is
min(num_anchors, valid_anchors_in_batch) and therefore
differs per micro-batch and per rank; num_anchors is a config
constant.
Returns: torch.Tensor
Scalar tensor.
Build per-position weights, then sum and normalise.
Parameters:
Per-token NLL, shape [batch, blocks, k] (k = block_size - 1 predicted positions per block).
Valid-position mask, same shape [batch, blocks, k];
zero entries (padding) are excluded from the loss.
Optional global, DP-all-reduced token count used as the
denominator when normalize != "mean".
Per-offset argmax-correct counts, shape [k].
Per-offset valid-position counts, shape [k].
See _mean_denominator.
Returns: DLLMLossOutput
Tuple containing the public DLLMLossOutput and the exact
Restore the block axis for the legacy flattened input contract.
Compute the DFlash decay-weighted loss from pre-computed logits.
Parameters:
Draft logits shaped [batch, blocks, k, vocab] or legacy
flattened [batch, tokens, vocab].
Token IDs shaped [batch, blocks, k] or [batch, tokens].
Valid-position mask with the same leading shape as
target_ids; zero entries are excluded.
Optional global token count for loss normalisation.
Legacy flattened-input block size.
See _mean_denominator.
Returns: DLLMLossOutput
class:DLLMLossOutput.
Chunked linear-CE: never materialises the full logits tensor.
Projects the LM head + cross-entropy in chunks of chunk_size
predicted positions, each wrapped in torch.utils.checkpoint so
the [chunk, vocab] logits are recomputed in backward instead of
held — peak logit memory is one chunk, not [batch*blocks*k, vocab].
Pure autograd, so the gradient flows correctly through FSDP2 (unlike a
standalone liger fused-CE Function).
Parameters:
Draft hidden states shaped [batch, blocks, k, hidden] or
legacy flattened [batch, tokens, hidden].
LM-head projection weight, shape [vocab, hidden].
Token IDs shaped [batch, blocks, k] or [batch, tokens].
Valid-position mask with the same leading shape as
target_ids.
as in forward.
Legacy flattened-input block size.
Optional LM-head bias, shape [vocab].
See _mean_denominator.
Returns: DLLMLossOutput
class:DLLMLossOutput.
Like forward, but also returns the per-token NLL it computed.
Lets a second training objective over the same fixed-anchor block layout
(DFlash 2’s D-PACE selector weighting) reuse this call’s own backbone
confidence instead of recomputing a second full-vocabulary
cross-entropy pass over the same logits.
Parameters:
Draft logits shaped [batch, blocks, k, vocab] or legacy
flattened [batch, tokens, vocab].
Token IDs shaped [batch, blocks, k] or [batch, tokens].
Valid-position mask with the same leading shape as
target_ids; zero entries are excluded.
Optional global token count for loss normalisation.
Legacy flattened-input block size. Required for D-PACE so its confidence product resets at each block boundary.
See _mean_denominator.
Returns: DFlashLossDetails
class:DFlashLossDetails with block-shaped NLLs and predictions.
Per-position loss weights for this instance’s loss_type, unreduced.
Exposed (beyond forward / forward_fused) so a second
training objective over the same fixed-anchor block layout — DFlash 2’s
candidate-selector CE — can weight its own per-position loss by the exact
same schedule instead of re-deriving one, keeping “position importance”
identical between the two objectives by construction.
Parameters:
Per-token NLL, shape [batch, blocks, k] (k = block_size - 1 predicted positions per block). Only its shape,
device, and dtype are used for loss_type="dflash"; the D-PACE
variants read its values as the draft’s per-position confidence.
Valid-position mask, same shape [batch, blocks, k];
zero entries (padding) are excluded.
Returns: torch.Tensor
Tensor of shape [batch, blocks, k]: block_mask scaled by the
Weight values by position_weights and reduce with normalize="mean" semantics.
Lets a second training objective over the same fixed-anchor block layout
(DFlash 2’s candidate-selector CE) share this loss’s exact position
weighting and denominator instead of re-deriving both, so switching
loss_type ("dflash" <-> a D-PACE variant) rescales every objective
built on this block layout identically, not only the one forward
computes directly.
Parameters:
Per-position loss values to weight and reduce, shape
[batch, blocks, k].
Per-token NLL the position weights are derived from —
typically the backbone’s own per-position NLL over the same
block, shape [batch, blocks, k]. Ignored for
loss_type="dflash".
The mask position_weights builds the schedule
from, shape [batch, blocks, k] — keep this the base
objective’s own valid-position mask, not narrowed to some
condition specific to values. The D-PACE weight is a
sequential cumprod/cumsum across the block, so narrowing this
mask changes every other position’s weight too, not only the
excluded one’s; narrow with value_mask instead.
Which positions values is actually summed over, and
(for loss_type="dflash") the weight-sum denominator too —
matching a single-term reduction’s own semantics. Defaults to
block_mask. Pass a narrower mask (e.g. DFlash 2’s
pred_mask * has_target, valid only where a real supervision
target exists) to exclude positions from the reduction without
perturbing the schedule block_mask builds.
See _mean_denominator.
Returns: torch.Tensor
Tuple of scalar tensors (mean, denominator): the weighted mean of
DFlash loss internals reused by the online trainer wrappers.
Scalar tensor used to normalize output.total_loss.
Public four-field loss result returned by DFlashDecayLoss.
Greedy token IDs, shape [batch, blocks, k].
Per-token NLL, shape [batch, blocks, k].
Bases: NamedTuple
Unified return type for all dLLM loss functions.
Pure diffusion loss for logging/metrics.
Per-rank raw count of argmax-correct predictions
at each block offset k=1..block_size-1, shape [block_size-1].
None when not computed (e.g. block_size unknown).
Per-rank raw count of valid predicted positions
at each block offset, shape [block_size-1]. SUM-allreducing
draft_correct_per_pos and draft_count_per_pos across
DP/CP replicas and dividing post-reduction yields per-position
global accuracy; summing across positions before dividing gives
the overall draft top-1 accuracy.
Loss used for backward (may include AR component).
Bases: Module
Combined diffusion + optional AR loss for hybrid diffusion LLM models.
Used by Nemotron-Labs-Diffusion. The diffusion component computes
MDLM-style loss at noise-masked positions, weighted by 1/p_mask. An
optional autoregressive (AR) component adds standard cross-entropy at AR
positions (the causal branch of model output).
Total loss = alpha * diffusion_loss + ar_loss.
Compute the hybrid diffusion + AR loss.
Parameters:
Model output logits, shape [B, L, V] or
[B, L+L_ar, V] if the model produces both diffusion and AR
logits in a single concatenated tensor (legacy path).
Clean token IDs, shape [B, L].
Boolean mask of corrupted positions, shape [B, L].
Per-position masking probability, shape [B, L].
Diffusion loss mask (supervised positions), shape [B, L].
AR loss mask, shape [B, L]. If None, no AR loss.
Total diffusion label tokens for normalization.
Total AR label tokens for normalization.
Optional separate AR logits, shape [B, L, V].
When provided, avoids the concat/split of the legacy layout.
Ignored (the model applies masking internally),
shape [B, L] when supplied.
Returns: DLLMLossOutput
class:DLLMLossOutput with combined total_loss and the pure
Bases: Module
Introspective DLM all-masked loss (Yu et al., 2026; arXiv:2604.11035).
Operates on the concatenated [x_t (L) | x_0 (L)] forward output produced
under the block-diffusion attention mask, where x_t is the noisy (masked)
copy and x_0 the clean copy. With a next-token “logit shift” (the hidden
state at position i predicts token i+1) the objective combines two
cross-entropy terms, both supervised on the response (answer) tokens:
.. math:: L = \text{CE}\text{noisy} + \alpha \cdot \text{CE}\text{clean}
CE_noisy— decode CE on thex_thalf (distributionq): each masked token is conditioned on the clean ground-truth prefix.CE_clean— verify CE on thex_0half (distributionp): the clean copy of the response under strict causal attention.
With auto_balance=True the fixed weight is replaced by the detached
ratio CE_noisy / CE_clean each step so the two terms stay comparable in
magnitude (paper Eq. 2, used for the later stride expansions). Otherwise the
fixed clean_loss_weight is used (the paper’s 0.2 for early training).
Parameters:
Fixed alpha for the clean-copy CE.
Replace alpha with (CE_noisy / CE_clean).detach().
Compute the I-DLM block-diffusion loss.
Parameters:
Concatenated forward logits, shape [B, 2L, V] ordered
[x_t | x_0].
Clean token IDs for one copy, shape [B, L].
Bool mask of supervised (response) positions, [B, L].
Bool/long padding-validity mask, shape [B, L].
Length L of one copy.
Global, DP-all-reduced supervised-token count
used as the loss denominator (summed across grad-accum
microbatches and data-parallel ranks). Pass this so the loss is a
proper global token-mean — required for the recipe’s
(loss * dp_group_size).backward() scaling to give
DP/grad-accum-invariant gradients. Falls back to the local
supervised count when None (single-process use / unit tests).
Returns: DLLMLossOutput
class:DLLMLossOutput with the combined total_loss and
Bases: Module
Cross-entropy loss for MDLM training.
Matches the reference dllm framework (dllm/core/trainers/mdlm.py):
.. math:: \text{loss} = \frac{\sum_{i \in \text{masked}} \text{CE}_i \cdot w(t)}{\sum \text{maskable}}
where :math:w(t) = 1/t for the scheduler weight type (linear schedule).
Compute the MDLM cross-entropy loss.
Parameters:
Model output logits, shape [B, L, V].
Clean (uncorrupted) token IDs, shape [B, L].
Boolean mask of corrupted positions, shape [B, L].
Per-position masking probability, shape [B, L].
Supervised positions mask, shape [B, L].
If provided, used for global normalization (total supervised tokens across all grad-acc microbatches).
Ignored (the absorbing kernel needs only
noise_mask), shape [B, L] when supplied.
Returns: DLLMLossOutput
class:DLLMLossOutput where total_loss == dllm_loss.
Bases: Module
Discrete-time NELBO for SCDD (openreview.net/forum?id=zQKlzKB6I9).
The forward process mixes an absorbing [MASK] channel with uniform
transitions (see scdd_schedule), so a position at time t is
either [MASK] or a possibly-wrong non-[MASK] token. The two cases
contribute different terms to the ELBO:
z_t = [MASK]— the familiar denoising term, the reverse-KL mass that the model must place on the clean token when it un-absorbs.z_t != [MASK]— the correction term, the reverse KL of the true posterior against the model posterior at an already-visible token. This is what trains the model to overwrite its own earlier mistakes, and it is scored at every non-[MASK]supervised position, including uncorrupted ones (where it vanishes only in the degeneratemax_ratio = 0limit).
Both terms are scaled by num_timesteps so the loss is the discrete-time
NELBO per token rather than a per-step increment.
Setting max_ratio = 0 removes the uniform channel entirely and the loss
reduces exactly to the MDLM objective -log p(x_0) / t at masked
positions with zero correction term — the invariant the unit tests pin.
The model output is re-parameterised as a distribution over non-[MASK]
tokens (the [MASK] logit is driven to -inf before the log-softmax),
matching the SCDD backbone parameterisation: the denoiser never predicts the
absorbing state.
Unlike the absorbing losses, the ELBO needs the model’s probability of
every non-[MASK] token, so it cannot be reduced by a fused
cross-entropy kernel. The vocabulary-sized work is instead done in position
chunks wrapped in torch.utils.checkpoint (the same treatment
DFlashDecayLoss.forward_fused gives its LM-head projection), so the
two [positions, vocab] fp32 intermediates are recomputed in backward and
peak activation is one chunk rather than the whole batch.
Reduce one position chunk over the vocabulary axis.
This is the only part of the ELBO whose working set scales with the
vocabulary, so it is the part the caller wraps in
torch.utils.checkpoint: the two [chunk, vocab] fp32
intermediates are then recomputed in backward instead of held. Every
position is independent, so chunking is exact.
Parameters:
Model logits, shape [chunk, vocab].
Clean token IDs, shape [chunk].
Corrupted token IDs seen by the model, shape [chunk].
log of the uniform base mass at s, shape
[chunk].
log of the retained-mass ratio at s, shape
[chunk].
Token ID of the absorbing [MASK] state.
Returns: torch.Tensor
Tuple of (sum_log, log_at_x0, log_at_zt, log_p_zt), each of
Compute the SCDD discrete-time NELBO.
Parameters:
Model output logits, shape [batch, sequence, vocab].
Clean token IDs x_0, shape [batch, sequence].
Boolean mask of corrupted positions, shape
[batch, sequence]. Ignored — the SCDD ELBO is supported on
every supervised position, corrupted or not.
Per-position diffusion time t, shape
[batch, sequence], constant along the sequence axis (the
SCDD forward process draws one t per sequence). This is the
contract with
apply_corruption,
which samples t on the 1/T grid and broadcasts it here;
unlike the absorbing kernels this slot carries the time itself,
because the ELBO weights need the full schedule at t and at
the previous grid point.
Supervised positions mask, shape [batch, sequence].
Ignored (SCDD has no autoregressive term).
If provided, the global supervised-token count
used as the normalisation denominator (summed across grad-acc
microbatches). If None, normalises by the local supervised
count.
Ignored (SCDD has no autoregressive term).
Ignored (SCDD has no autoregressive term).
Corrupted token IDs z_t the model was fed, shape
[batch, sequence]. Required: the correction term is a
function of the visible token, which cannot be recovered from
noise_mask alone.
Returns: DLLMLossOutput
class:DLLMLossOutput where total_loss == dllm_loss.
Marginal of the SCDD forward process at a diffusion time.
SCDD (Self-Correcting Discrete Diffusion, openreview.net/forum?id=zQKlzKB6I9)
generalises the
absorbing masked-diffusion forward process by mixing in uniform transitions,
so the denoiser sees corrupted-but-plausible tokens during training and
learns to correct them rather than only to fill [MASK]. The marginal
of a clean token x at time t is
.. math:: q(z_t \mid x) = \gamma_t\bigl(\rho_t x + (1-\rho_t) u\bigr)
- (1-\gamma_t),m
where u is uniform over the non-[MASK] vocabulary and m is the
absorbing [MASK] state.
1 - gamma_t — probability the token is [MASK],
shape [batch].
gamma_t * rho_t — probability the token is retained,
shape [batch].
Probability the token is not [MASK], shape [batch].
Probability the token is retained given that it is not [MASK],
shape [batch].
gamma_t * (1 - rho_t) — probability the token was
redrawn from the uniform distribution, shape [batch].
Bases: Module
Uno diffusion-adapter loss (Sahoo et al., 2026; arXiv:2609.04010).
Operates on the concatenated [x_t (L) | x_0 (L)] forward output produced under the
block-diffusion attention mask, where the LoRA adapter is gated on for the noisy x_t half
only. The clean half therefore gives the frozen AR distribution, which serves as the detached
teacher; the noisy half is the diffusion student. Both are compared at the same index over the
response positions:
.. math:: L = \gamma \cdot \text{TV} + \beta \cdot \text{KL}(p_\text{student} | p_\text{teacher})
TV— the blockwise total-variation objective of the paper (Sec. 3, after Leviathan et al. 2023, Cor. 3.6): the full L1 distancesum_v |p_student - p_teacher|per position. Computed in position chunks wrapped intorch.utils.checkpointso only one[chunk, vocab]pair of fp32 probabilities is live at a time.KL— reverse KL, computed byKDLosswith the arguments swapped (KDLosscomputesKL(P_teacher_arg || P_student_arg)).
The released Uno-Qwen3-8B recipe uses TV only (tv_weight=1, kl_weight=0).
Parameters:
Weight gamma of the total-variation term.
Weight beta of the reverse-KL term.
Positions per checkpointed TV chunk (also the KDLoss chunk size). None
computes everything in one shot without checkpointing.
Compute the Uno distillation loss.
Parameters:
Concatenated forward logits, Tensor of shape [batch, 2 * sequence, vocab] ordered
[x_t | x_0]; the x_0 half is the LoRA-off teacher and is detached here.
Bool Tensor of shape [batch, sequence] marking supervised (response)
positions, unshifted: position i compares the next-token distributions predicted
at i by the two halves.
Bool/long padding-validity Tensor of shape [batch, sequence].
Length sequence of one copy.
Global, DP-all-reduced supervised-token count used as the loss
denominator (summed across grad-accum microbatches and data-parallel ranks). Falls
back to the local supervised count when None.
Returns: DLLMLossOutput
class:DLLMLossOutput with the weighted total_loss and dllm_loss set to the
Compute per-token negative log-likelihood, shape [B, L].
Per-row L1 distance between the student and teacher softmax distributions.
Parameters:
Tensor of shape [rows, vocab].
Tensor of shape [rows, vocab], detached.
Returns: torch.Tensor
Tensor of shape [rows] with sum_v |softmax(student) - softmax(teacher)| in float32.
Autoregressive next-token CE on the encoder’s causal logits.
The co-trained encoder loss for diffusion_gemma SFT: a standard causal
LM cross-entropy over the clean full sequence, scored where both the current
and next position are valid (non-pad).
Parameters:
Encoder logits over the clean sequence, [B, S, V].
Clean token IDs, [B, S].
Boolean non-pad mask [B, S]. If None, all positions count.
Optional global denominator (summed across grad-acc microbatches); defaults to the local valid next-token count.
Returns: torch.Tensor
Scalar AR loss (mean CE over valid next-token positions).
Evaluate the SCDD forward-process marginal at diffusion time t.
The uniform-noise mass follows a Beta-shaped bump c(t) = B t^a (1-t)^b
with a = gamma_shape * t_peak and b = gamma_shape * (1 - t_peak),
normalised so that its ratio against the retained mass peaks at max_ratio
at t = t_peak. The retained mass decays linearly, giving the closed form
clean = (1-t)/(1+c), uniform = c/(1+c), absorbed = t/(1+c).
Both rho and gamma are monotonically decreasing in t, which is what
makes [MASK] an absorbing state of the induced Markov chain (no
remasking during sampling).
Parameters:
Diffusion times in [0, 1], shape [batch]. Values outside the
unit interval are clamped (fractional powers of a negative base are
undefined).
Peak uniform-to-retained mass ratio, in [0, 1). 0
degenerates the process to pure absorbing masked diffusion (MDLM).
Total shape mass of the bump; larger values concentrate the uniform noise around t_peak.
Time in (0, 1) at which the uniform-noise ratio peaks.
Returns: SCDDSchedule
class:SCDDSchedule at t; every field has shape [batch].