[Hotfix] Fix bugs in testing continuous batching (#5270)

* fix bug

* fix bugs

* fix bugs

* fix bugs and add padding

* add funcs and fix bugs

* fix typos

* fix bugs

* add func
This commit is contained in:
Jianghai
2024-01-18 16:31:14 +08:00
committed by GitHub
parent 5ae9099f92
commit 9e2342bde2
6 changed files with 86 additions and 23 deletions

View File

@@ -95,11 +95,10 @@ def benchmark_inference(args):
if args.dtype == "fp16":
model = model.half()
elif args.dtype == "bf16":
elif args.dtype == "fp16":
model = model.to(torch.bfloat16)
# mbsz = args.mbsz
mbsz = args.batch_size
mbsz = args.mbsz
if args.mode == "caiinference":
inference_config = InferenceConfig(
dtype=args.dtype,