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

Method __len__

generation_utils.py:356–360  ·  view source on GitHub ↗

Number of hypotheses in the list.

(self)

Source from the content-addressed store, hash-verified

354 self.worst_score = 1e9
355
356 def __len__(self):
357 """
358 Number of hypotheses in the list.
359 """
360 return len(self.beams)
361
362 def add(self, hyp: torch.LongTensor, sum_logprobs: float, mems=None):
363 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected