MCPcopy
hub / github.com/zai-org/GLM-130B / predict_single_batch

Method predict_single_batch

evaluation/tasks.py:204–206  ·  view source on GitHub ↗
(self, batch)

Source from the content-addressed store, hash-verified

202 return MultiChoiceTaskDataset(join(self.config.path, relative_path), self.config)
203
204 def predict_single_batch(self, batch) -> List[int]:
205 log_probs = self.model.cond_log_prob(batch)
206 return [np.argmax(log_probs_single).item() for log_probs_single in log_probs]
207
208
209class LanguageModelTask(BaseTask, ABC):

Callers

nothing calls this directly

Calls 1

cond_log_probMethod · 0.80

Tested by

no test coverage detected