WizardLM-2-8x22B-GPTQ-ERQ / reconstitute.py
Cheshire-AI's picture
fixes
5c7d24c
raw
history blame contribute delete
436 Bytes
import os
import json
def reconstruct_file(index_file, output_file):
with open(index_file, 'r') as f:
shards = json.load(f)
with open(output_file, 'wb') as output:
for shard in shards:
with open(shard, 'rb') as part:
output.write(part.read())
index_file = 'model.safetensors.index.json'
output_file = 'reconstructed_model.safetensors'
reconstruct_file(index_file, output_file)