flashinfer.cake_lm_head_det_train

Cake deterministic LM-head training helpers and entry points. The module is a stable API; its backend package, flashinfer.experimental.cake.cake_lm_head_det_train, is experimental and is imported on first use.

cake_lm_head_det_train_loss(X, W, labels, *)

Differentiable chunked LM-head projection + loss with a memory-bounded backward, SM100 / SM103 / SM107 only.

cake_lm_head_det_train_logprob(X, W, labels, *)

Differentiable chunked selected-token log-probability, SM100 / SM103 / SM107 only.

cake_lm_head_det_train_preload([device, ...])

Do part of the one-time work of a process's first chunked LM-head call ahead of it, then wait for the device once (SM100 / SM103 / SM107 only).

cake_lm_head_det_train_support_logprob(X, W, ...)

Differentiable log-probabilities over a ragged candidate support per token, SM100 / SM103 / SM107 only.

cake_lm_head_det_train_support_kl(X, W, ...)

Unreduced forward KL from a detached teacher over a ragged candidate support, SM100 / SM103 / SM107 only.