From b742b5549ec2796be0d6f98f0dafd070cb093309 Mon Sep 17 00:00:00 2001 From: Christian Medina <37550954+cmedinasoriano@users.noreply.github.com> Date: Thu, 2 Jul 2026 23:32:38 -0400 Subject: [PATCH] fix: alternate GPUs for each shard (0,1,0,1) --- quantize_streaming.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quantize_streaming.py b/quantize_streaming.py index 698faec..b6ad47f 100644 --- a/quantize_streaming.py +++ b/quantize_streaming.py @@ -96,7 +96,7 @@ def streaming_quantize(model_path: str, output_path: str): futures = [] for j, shard_file in enumerate(batch): idx = i + j - gpu_id = (j // shards_per_gpu) % num_gpus # Assign to GPU + gpu_id = idx % num_gpus # Alternate GPUs: 0,1,0,1... futures.append(executor.submit(process_shard, idx, shard_file, gpu_id)) for future in concurrent.futures.as_completed(futures): future.result()