Get speculative config from args.
(args)
| 100 | |
| 101 | |
| 102 | def get_speculative_config(args): |
| 103 | """Get speculative config from args.""" |
| 104 | from lmdeploy.messages import SpeculativeConfig |
| 105 | speculative_config = None |
| 106 | if args.speculative_algorithm is not None: |
| 107 | speculative_config = SpeculativeConfig( |
| 108 | method=args.speculative_algorithm, |
| 109 | model=args.speculative_draft_model, |
| 110 | num_speculative_tokens=args.speculative_num_draft_tokens, |
| 111 | ) |
| 112 | return speculative_config |
| 113 | |
| 114 | |
| 115 | class ArgumentHelper: |
no test coverage detected