MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / generate_topp0

Method generate_topp0

tests/conftest.py:70–80  ·  view source on GitHub ↗
(
        self,
        prompts: Union[list[str]],
        max_tokens: int,
        **kwargs: Any,
    )

Source from the content-addressed store, hash-verified

68 return outputs
69
70 def generate_topp0(
71 self,
72 prompts: Union[list[str]],
73 max_tokens: int,
74 **kwargs: Any,
75 ) -> list[tuple[list[int], str]]:
76 from fastdeploy.engine.sampling_params import SamplingParams
77
78 topp_params = SamplingParams(temperature=0.0, top_p=0, max_tokens=max_tokens)
79 outputs = self.generate(prompts, topp_params, **kwargs)
80 return outputs
81
82 def __enter__(self):
83 return self

Callers 1

Calls 2

generateMethod · 0.95
SamplingParamsClass · 0.90

Tested by

no test coverage detected