wanglaiqi
Results
3
issues of
wanglaiqi
loss 曲线如何打印出来的
def load_from_torch_shard_ckpt(model, ckpt_dir): """ Load sharded checkpoints directly from huggingface dir. """ with open(os.path.join(ckpt_dir, 'pytorch_model.bin.index.json')) as fp: ckpt_index = json.load(fp) total_size = ckpt_index['metadata']['total_size'] weight_map = ckpt_index['weight_map'] file_weight_map = {} for...