Add argument top_p to parser.
(parser)
| 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): |
no outgoing calls
no test coverage detected