MCPcopy Create free account
hub / github.com/InternScience/SciReason / generate

Method generate

opencompass/models/base.py:53–65  ·  view source on GitHub ↗

Generate results given a list of inputs. Args: inputs (List[str]): A list of strings. max_out_len (int): The maximum length of the output. Returns: List[str]: A list of generated strings.

(self, inputs: List[str], max_out_len: int)

Source from the content-addressed store, hash-verified

51
52 @abstractmethod
53 def generate(self, inputs: List[str], max_out_len: int) -> List[str]:
54 """Generate results given a list of inputs.
55
56 Args:
57 inputs (List[str]): A list of strings.
58 max_out_len (int): The maximum length of the output.
59
60 Returns:
61 List[str]: A list of generated strings.
62 """
63 raise NotImplementedError(f'{self.__class__.__name__} does not support'
64 ' gen-based evaluation yet, try ppl-based '
65 'instead.')
66
67 @abstractmethod
68 def get_ppl(self,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected