Explorar el Código

benchmark_forward: Use dtype=bfloat16

Aleksandr Borzunov hace 2 años
padre
commit
e188610125
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/petals/cli/benchmark_forward.py

+ 1 - 1
src/petals/cli/benchmark_forward.py

@@ -42,7 +42,7 @@ def main():
 @torch.inference_mode()
 def benchmark_forward(process_idx, args):
     tokenizer = BloomTokenizerFast.from_pretrained(args.model)
-    model = DistributedBloomForCausalLM.from_pretrained(args.model, initial_peers=args.initial_peers, torch_dtype=torch.float32)
+    model = DistributedBloomForCausalLM.from_pretrained(args.model, initial_peers=args.initial_peers, torch_dtype=torch.bfloat16)
     logger.info(f"Created model: {process_idx=} {model.device=}")
 
     torch.manual_seed(42)