This is the repository card of trl-lib/trl-losses that has been pushed on the Hub. It was built to be used with the kernels library.

How to use

from kernels import get_kernel

trl_losses = get_kernel(
    "trl-lib/trl-losses",
    version=0,
    trust_remote_code=["trl-lib/trl-losses"],
)
logprobs, entropy = trl_losses.selective_log_softmax_and_entropy(logits, index)

Available functions

  • selective_log_softmax_and_entropy

Source code

The source is maintained in the huggingface/trl repository.

Downloads last month
-
apache-2.0