Compare commits

...
2 changed files with 16 additions and 1 deletions

No files matched your search

+15
View File
@@ -287,6 +287,10 @@ def run_one_completion(
"max_tokens": tg,
"logprobs": False,
"use_prefix_cache": use_prefix_cache,
# Argmax sampling for deterministic, faster decode (matches
# mlx_lm.benchmark default). Avoids per-token softmax + categorical
# sample over the full vocab.
"temperature": 0.0,
}
if not stream:
@@ -727,6 +731,15 @@ def main() -> int:
)
runs.append(row)
all_rows.append(row)
# Per-repeat trial log so individual numbers are visible
# alongside the final averaged summary. Useful for
# spotting outliers and trial-to-trial variance.
_s = row.get("stats") or {}
logger.info(
f" repeat {r + 1}/{args.repeat}: "
f"prompt_tps={_s.get('prompt_tps', 0):.2f} "
f"gen_tps={_s.get('generation_tps', 0):.2f}"
)
else:
# Concurrent: fire N requests in parallel
# Pre-build prompt once, barrier ensures simultaneous dispatch
@@ -738,6 +751,8 @@ def main() -> int:
"max_tokens": tg,
"logprobs": False,
"use_prefix_cache": args.use_prefix_cache,
# Argmax sampling — matches mlx_lm.benchmark default
"temperature": 0.0,
}
barrier = threading.Barrier(concurrency)
batch_start = threading.Event()
+1 -1
View File
@@ -599,7 +599,7 @@ def tensor_auto_parallel(
raise ValueError(f"Unsupported model type: {type(model)}")
model = yield from tensor_parallel_sharding_strategy.shard_model(model)
return patch_tensor_model(model)
return model # PATCH-DISABLED for A/B test
class TensorParallelShardingStrategy(ABC):