- pip install -U deep_training >= 0.1.0
- (PaLM,LaMDA 修改默认激活函数)最小版本要求 0.1.0
gpt2
laMDA
LLaMA
PaLM
t5
unilm
t5decoder
第一步,参数配置 convert_onnx = True
第二步 加载权重例子
model = MyTransformer.load_from_checkpoint('./best.pt', config=config, model_args=model_args,
training_args=training_args)
第三步 #导出onnx模型
model.convert_to_onnx('./best.onnx')
修改参数配置 devices = N
# Available names: bagua, colossalai, ddp, ddp_find_unused_parameters_false, ddp_fork,
# ddp_fork_find_unused_parameters_false, ddp_fully_sharded,
# ddp_notebook, ddp_notebook_find_unused_parameters_false, ddp_sharded,
# ddp_sharded_find_unused_parameters_false, ddp_sharded_spawn,
# ddp_sharded_spawn_find_unused_parameters_false,
# ddp_spawn, ddp_spawn_find_unused_parameters_false,
# deepspeed, deepspeed_stage_1, deepspeed_stage_2, deepspeed_stage_2_offload,
# deepspeed_stage_3, deepspeed_stage_3_offload, deepspeed_stage_3_offload_nvme,
# dp, fsdp, fsdp_native, fsdp_native_full_shard_offload, horovod, hpu_parallel,
# hpu_single, ipu_strategy, single_device, single_tpu, tpu_spawn, tpu_spawn_debug"
创建一个模型工厂, 轻量且高效的训练程序,让训练模型更容易,更轻松上手。
QQ交流群:185144988