1 Star 0 Fork 0

Zehebi / prismer

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
generate_config.py 1.34 KB
一键复制 编辑 原始数据 按行查看 历史
Shikun Liu 提交于 2023-03-03 01:09 . First Commit
# Copyright (c) 2023, NVIDIA Corporation & Affiliates. All rights reserved.
#
# This work is made available under the Nvidia Source Code License-NC.
# To view a copy of this license, visit
# https://github.com/NVlabs/prismer/blob/main/LICENSE
import os
import yaml
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--main_ip', default='', type=str)
parser.add_argument('--rank', default=0, type=int)
parser.add_argument('--num_machines', default=4, type=int)
args = parser.parse_args()
config = {
'command_file': 'null',
'commands': 'null',
'compute_environment': 'LOCAL_MACHINE',
'deepspeed_config': {},
'distributed_type': 'MULTI_GPU',
'downcast_bf16': 'no',
'dynamo_backend': 'NO',
'fsdp_config': {},
'gpu_ids': 'all',
'machine_rank': args.rank,
'main_process_ip': args.main_ip,
'main_process_port': 8080,
'main_training_function': 'main',
'megatron_lm_config': {},
'mixed_precision': 'fp16',
'num_machines': args.num_machines,
'num_processes': args.num_machines * 8,
'rdzv_backend': 'static',
'same_network': True,
'tpu_name': 'null',
'tpu_zone': 'null',
'use_cpu': False,
}
os.makedirs('/root/.cache/huggingface/accelerate', exist_ok=True)
with open('/root/.cache/huggingface/accelerate/default_config.yaml', 'w') as file:
yaml.dump(config, file)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/HangbinZheng/prismer.git
git@gitee.com:HangbinZheng/prismer.git
HangbinZheng
prismer
prismer
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891