MCPcopy Create free account
hub / github.com/THUDM/GLM / __call__

Method __call__

generation_utils.py:395–399  ·  view source on GitHub ↗

Torch method for processing logits.

(self, input_ids: torch.LongTensor, scores: torch.FloatTensor)

Source from the content-addressed store, hash-verified

393 """Abstract base class for all logit processors that can be applied during generation."""
394
395 def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor:
396 """Torch method for processing logits."""
397 raise NotImplementedError(
398 f"{self.__class__} is an abstract class. Only classes inheriting this class can be called."
399 )
400
401
402class LogitsProcessorList(list):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected