MCPcopy
hub / github.com/InternLM/lmdeploy / top_p

Method top_p

lmdeploy/cli/utils.py:320–329  ·  view source on GitHub ↗

Add argument top_p to parser.

(parser)

Source from the content-addressed store, hash-verified

318
319 @staticmethod
320 def top_p(parser):
321 """Add argument top_p to parser."""
322
323 return parser.add_argument('--top-p',
324 type=float,
325 default=0.8,
326 help='An alternative to sampling with temperature,'
327 ' called nucleus sampling, where the model '
328 'considers the results of the tokens with '
329 'top_p probability mass')
330
331 @staticmethod
332 def top_k(parser):

Callers 3

parse_argsFunction · 0.80
parse_argsFunction · 0.80
parse_argsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected