nip.utils.hugging_face.TokenCounts#
- class nip.utils.hugging_face.TokenCounts(prompt: Int[ndarray, 'rollout round'], completion: Int[ndarray, 'rollout round'], total: Int[ndarray, 'rollout round'])[source]#
Dataclass to hold token count information.
Methods Summary
Attributes
promptThe number of tokens in the prompt for each rollout, round, and agent.
completionThe number of tokens in the completion for each rollout, round, and agent.
totalThe total number of tokens (prompt + completion)
Methods
- __eq__(other)#
Return self==value.
- __init__(prompt: Int[ndarray, 'rollout round'], completion: Int[ndarray, 'rollout round'], total: Int[ndarray, 'rollout round']) None#
- __repr__()#
Return repr(self).