Function
check_params
(args, hf_config: AutoConfig)
Source from the content-addressed store, hash-verified
| 32 | |
| 33 | |
| 34 | def check_params(args, hf_config: AutoConfig): |
| 35 | if args.quant_type == "int8": |
| 36 | assert args.world_size >= 8, "int8 weight-only quantization requires at least 8 GPUs" |
| 37 | |
| 38 | assert hf_config.num_hidden_layers % args.world_size == 0, f"num_hidden_layers({hf_config.num_hidden_layers}) must be divisible by world_size({args.world_size})" |
| 39 | |
| 40 | |
| 41 | @torch.no_grad() |
Tested by
no test coverage detected