MCPcopy Create free account
hub / github.com/OpenMOSS/MOSS / __init__

Method __init__

utils.py:7–8  ·  view source on GitHub ↗
(self, stop_indices: list)

Source from the content-addressed store, hash-verified

5class StopWordsCriteria(StoppingCriteria):
6
7 def __init__(self, stop_indices: list):
8 self.stop_indices = stop_indices
9
10 def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
11 # do not support batch inference

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected