diff --git a/scripts/stack-qwen38-official-fp8.py b/scripts/stack-qwen38-official-fp8.py index 3604cc0..106e983 100755 --- a/scripts/stack-qwen38-official-fp8.py +++ b/scripts/stack-qwen38-official-fp8.py @@ -377,7 +377,14 @@ def main(): log(f"experts stacked: {written_total / 2**30:.2f} GiB in {len(prefixes)} files") # ---- stage PLE -------------------------------------------------------- - out_name = "ple.merged.safetensors" + # The file name sorts BEFORE the model-000NN shards ON PURPOSE: the reader + # opens every index-named file in sorted order and emplaces EVERY tensor + # it physically holds, first-wins (checkpoint.cpp add_shard). The raw + # shards carry tensors of the SAME name as the merged one + # (...ple.ple_embedding.ngram_embedding.shard_0.weight, [2500012,160] + # fp8), so ple.merged.safetensors lost the race and the plan read one raw + # shard as the codes. "00-" wins the sort and the name. + out_name = "00-ple.merged.safetensors" out_path = os.path.join(stage, out_name) data_bytes = total_rows * hd * 2 hdr = {merged_name: {"dtype": BF16, "shape": [total_rows, hd],