Function
check_params
(args, hf_config: AutoConfig)
Source from the content-addressed store, hash-verified
| 39 | return parser.parse_args() |
| 40 | |
| 41 | def check_params(args, hf_config: AutoConfig): |
| 42 | if args.quant_type == "int8": |
| 43 | assert args.world_size >= 8, "int8 weight-only quantization requires at least 8 GPUs" |
| 44 | |
| 45 | assert hf_config.text_config.num_hidden_layers % args.world_size == 0, f"num_hidden_layers({hf_config.text_config.num_hidden_layers}) must be divisible by world_size({args.world_size})" |
| 46 | |
| 47 | @torch.no_grad() |
| 48 | def main(): |
Tested by
no test coverage detected