MCPcopy Create free account
hub / github.com/ZinYY/TreeLoRA / ChatPrediction

Class ChatPrediction

utils/data/data_utils.py:83–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81
82
83class ChatPrediction(TypedDict, total=False):
84 generation: Message
85 tokens: List[str] # not required
86 logprobs: List[float] # not required
87
88def sample_top_p(probs, p):
89 probs_sort, probs_idx = torch.sort(probs, dim=-1, descending=True)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected