Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rank0]: RuntimeError: tensor does not have a device #6454

Open
1 task done
Juvenilecris opened this issue Dec 26, 2024 · 0 comments
Open
1 task done

[rank0]: RuntimeError: tensor does not have a device #6454

Juvenilecris opened this issue Dec 26, 2024 · 0 comments
Labels
pending This problem is yet to be addressed

Comments

@Juvenilecris
Copy link

Reminder

  • I have read the README and searched the existing issues.

System Info

[2024-12-26 20:11:21,720] [INFO] [real_accelerator.py:219:get_accelerator] Setting ds_accelerator to cuda (auto detect)

  • llamafactory version: 0.9.2.dev0
  • Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.35
  • Python version: 3.10.8
  • PyTorch version: 2.3.1+cu118 (GPU)
  • Transformers version: 4.46.1
  • Datasets version: 3.1.0
  • Accelerate version: 1.0.1
  • PEFT version: 0.12.0
  • TRL version: 0.9.6
  • GPU type: NVIDIA GeForce RTX 4090 D
  • DeepSpeed version: 0.15.4

Reproduction

[INFO|configuration_utils.py:677] 2024-12-26 20:03:59,299 >> loading configuration file /root/autodl-tmp/LLaMA-Factory/mmTianchi/Qwen2-VL-7B-Instruct/config.json
[INFO|configuration_utils.py:746] 2024-12-26 20:03:59,304 >> Model config Qwen2VLConfig {
"_name_or_path": "/root/autodl-tmp/LLaMA-Factory/mmTianchi/Qwen2-VL-7B-Instruct",
"architectures": [
"Qwen2VLForConditionalGeneration"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"image_token_id": 151655,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2_vl",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"rms_norm_eps": 1e-06,
"rope_scaling": {
"mrope_section": [
16,
24,
24
],
"rope_type": "default",
"type": "default"
},
"rope_theta": 1000000.0,
"sliding_window": 32768,
"tie_word_embeddings": false,
"torch_dtype": "bfloat16",
"transformers_version": "4.46.1",
"use_cache": true,
"use_sliding_window": false,
"video_token_id": 151656,
"vision_config": {
"in_chans": 3,
"model_type": "qwen2_vl",
"spatial_patch_size": 14
},
"vision_end_token_id": 151653,
"vision_start_token_id": 151652,
"vision_token_id": 151654,
"vocab_size": 152064
}

[INFO|modeling_utils.py:3934] 2024-12-26 20:03:59,330 >> loading weights file /root/autodl-tmp/LLaMA-Factory/mmTianchi/Qwen2-VL-7B-Instruct/model.safetensors.index.json
[INFO|modeling_utils.py:4080] 2024-12-26 20:03:59,332 >> Detected DeepSpeed ZeRO-3: activating zero.init() for this model
[2024-12-26 20:03:59,332] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[INFO|configuration_utils.py:1096] 2024-12-26 20:03:59,352 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

[INFO|modeling_utils.py:1670] 2024-12-26 20:03:59,353 >> Instantiating Qwen2VisionTransformerPretrainedModel model under default dtype torch.float32.
[INFO|modeling_utils.py:1537] 2024-12-26 20:03:59,354 >> Detected DeepSpeed ZeRO-3: activating zero.init() for this model
[2024-12-26 20:03:59,354] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,434] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,442] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,445] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,450] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,454] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,456] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,461] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,463] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,466] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:03:59,472] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[WARNING|logging.py:168] 2024-12-26 20:04:10,918 >> Qwen2VLRotaryEmbedding can now be fully parameterized by passing the model config through the config argument. All other arguments will be removed in v4.46
[2024-12-26 20:04:27,933] [INFO] [partition_parameters.py:348:exit] finished initializing model - num_params = 730, num_elems = 8.29B
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.79s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.79s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.79s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.79s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.78s/it]
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████| 5/5 [00:08<00:00, 1.79s/it]
[INFO|modeling_utils.py:4800] 2024-12-26 20:04:37,036 >> All model checkpoint weights were used when initializing Qwen2VLForConditionalGeneration.

[INFO|modeling_utils.py:4808] 2024-12-26 20:04:37,036 >> All the weights of Qwen2VLForConditionalGeneration were initialized from the model checkpoint at /root/autodl-tmp/LLaMA-Factory/mmTianchi/Qwen2-VL-7B-Instruct.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2VLForConditionalGeneration for predictions without further training.
[INFO|configuration_utils.py:1049] 2024-12-26 20:04:37,041 >> loading configuration file /root/autodl-tmp/LLaMA-Factory/mmTianchi/Qwen2-VL-7B-Instruct/generation_config.json
[INFO|configuration_utils.py:1096] 2024-12-26 20:04:37,042 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"temperature": 0.01,
"top_k": 1,
"top_p": 0.001
}

[INFO|2024-12-26 20:04:37] llamafactory.model.model_utils.checkpointing:157 >> Gradient checkpointing enabled.
[INFO|2024-12-26 20:04:37] llamafactory.model.model_utils.attention:157 >> Using torch SDPA for faster training and inference.
[INFO|2024-12-26 20:04:37] llamafactory.model.adapter:157 >> ZeRO3 / FSDP detected, remaining trainable params in float32.
[INFO|2024-12-26 20:04:37] llamafactory.model.adapter:157 >> Fine-tuning method: Full
[INFO|2024-12-26 20:04:37] llamafactory.model.loader:157 >> trainable params: 7,615,616,512 || all params: 8,291,375,616 || trainable%: 91.8499
[INFO|trainer.py:698] 2024-12-26 20:04:37,064 >> Using auto half precision backend
[INFO|deepspeed.py:334] 2024-12-26 20:04:37,325 >> Detected ZeRO Offload and non-DeepSpeed optimizers: This combination should work as long as the custom optimizer has both CPU and GPU implementation (except LAMB)
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module cpu_adam...
Time to load cpu_adam op: 2.7142465114593506 seconds
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module cpu_adam...
Time to load cpu_adam op: 2.8719851970672607 seconds
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module cpu_adam...
Time to load cpu_adam op: 2.892853021621704 seconds
Adam Optimizer #0 is created with AVX512 arithmetic capability.
Config: alpha=0.000005, betas=(0.900000, 0.999000), weight_decay=0.010000, adam_w=1
[2024-12-26 20:04:41,710] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed info: version=0.15.4, git-hash=unknown, git-branch=unknown
[2024-12-26 20:04:41,710] [INFO] [config.py:733:init] Config mesh_device None world_size = 6
[2024-12-26 20:04:41,767] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed Flops Profiler Enabled: False
[2024-12-26 20:04:41,772] [INFO] [logging.py:128:log_dist] [Rank 0] Using client Optimizer as basic optimizer
[2024-12-26 20:04:41,773] [INFO] [logging.py:128:log_dist] [Rank 0] Removing param_group that has no 'params' in the basic Optimizer
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module cpu_adam...
Time to load cpu_adam op: 3.0239319801330566 seconds
[2024-12-26 20:04:41,834] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed Basic Optimizer = DeepSpeedCPUAdam
[2024-12-26 20:04:41,834] [INFO] [utils.py:59:is_zero_supported_optimizer] Checking ZeRO support for optimizer=DeepSpeedCPUAdam type=<class 'deepspeed.ops.adam.cpu_adam.DeepSpeedCPUAdam'>
[2024-12-26 20:04:41,834] [INFO] [logging.py:128:log_dist] [Rank 0] Creating fp16 ZeRO stage 3 optimizer, MiCS is enabled False, Hierarchical params gather False
[2024-12-26 20:04:41,835] [INFO] [logging.py:128:log_dist] [Rank 0] Creating torch.bfloat16 ZeRO stage 3 optimizer
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Using /root/.cache/torch_extensions/py310_cu118 as PyTorch extensions root...
Loading extension module cpu_adam...
Time to load cpu_adam op: 3.0497524738311768 seconds
Emitting ninja build file /root/.cache/torch_extensions/py310_cu118/cpu_adam/build.ninja...
Building extension module cpu_adam...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module cpu_adam...
Time to load cpu_adam op: 3.0472681522369385 seconds
[2024-12-26 20:04:42,016] [INFO] [utils.py:781:see_memory_usage] Stage 3 initialize beginning
[2024-12-26 20:04:42,016] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 3.05 GB CA 0.0 GB Max_CA 3 GB
[2024-12-26 20:04:42,016] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 122.18 GB, percent = 12.1%
[2024-12-26 20:04:42,019] [INFO] [stage3.py:166:init] Reduce bucket size 12845056
[2024-12-26 20:04:42,019] [INFO] [stage3.py:167:init] Prefetch bucket size 11560550
[2024-12-26 20:04:42,159] [INFO] [utils.py:781:see_memory_usage] DeepSpeedZeRoOffload initialize [begin]
[2024-12-26 20:04:42,160] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:04:42,160] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 122.19 GB, percent = 12.1%
Parameter Offload: Total persistent parameters: 877056 in 401 params
[2024-12-26 20:04:42,322] [INFO] [utils.py:781:see_memory_usage] DeepSpeedZeRoOffload initialize [end]
[2024-12-26 20:04:42,323] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:04:42,323] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 122.18 GB, percent = 12.1%
[2024-12-26 20:04:42,451] [INFO] [utils.py:781:see_memory_usage] Before creating fp16 partitions
[2024-12-26 20:04:42,451] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:04:42,451] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 122.18 GB, percent = 12.1%
[2024-12-26 20:05:02,722] [INFO] [utils.py:781:see_memory_usage] After creating fp16 partitions: 3
[2024-12-26 20:05:02,723] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:05:02,724] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 172.03 GB, percent = 17.1%
[2024-12-26 20:05:03,312] [INFO] [utils.py:781:see_memory_usage] Before creating fp32 partitions
[2024-12-26 20:05:03,313] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:05:03,313] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 169.64 GB, percent = 16.8%
[2024-12-26 20:05:04,536] [INFO] [utils.py:781:see_memory_usage] After creating fp32 partitions
[2024-12-26 20:05:04,537] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:05:04,537] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 174.88 GB, percent = 17.4%
[2024-12-26 20:05:05,901] [INFO] [utils.py:781:see_memory_usage] Before initializing optimizer states
[2024-12-26 20:05:05,902] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:05:05,902] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 214.54 GB, percent = 21.3%
[2024-12-26 20:05:11,913] [INFO] [utils.py:781:see_memory_usage] After initializing optimizer states
[2024-12-26 20:05:11,914] [INFO] [utils.py:782:see_memory_usage] MA 0.0 GB Max_MA 0.0 GB CA 0.0 GB Max_CA 0 GB
[2024-12-26 20:05:11,914] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 212.72 GB, percent = 21.1%
[2024-12-26 20:05:11,915] [INFO] [stage3.py:521:setup_for_real_optimizer] optimizer state initialized
[2024-12-26 20:05:18,960] [INFO] [utils.py:781:see_memory_usage] After initializing ZeRO optimizer
[2024-12-26 20:05:18,960] [INFO] [utils.py:782:see_memory_usage] MA 0.02 GB Max_MA 2.06 GB CA 2.06 GB Max_CA 2 GB
[2024-12-26 20:05:18,961] [INFO] [utils.py:789:see_memory_usage] CPU Virtual Memory: used = 239.92 GB, percent = 23.8%
[2024-12-26 20:05:18,961] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed Final Optimizer = DeepSpeedZeroOptimizer_Stage3
[2024-12-26 20:05:18,961] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed using configured LR scheduler = None
[2024-12-26 20:05:18,961] [INFO] [logging.py:128:log_dist] [Rank 0] DeepSpeed LR Scheduler = None
[2024-12-26 20:05:18,961] [INFO] [logging.py:128:log_dist] [Rank 0] step=0, skipped=0, lr=[5e-06, 5e-06], mom=[(0.9, 0.999), (0.9, 0.999)]
[2024-12-26 20:05:18,963] [INFO] [config.py:999:print] DeepSpeedEngine configuration:
[2024-12-26 20:05:18,966] [INFO] [config.py:1003:print] activation_checkpointing_config {
"partition_activations": false,
"contiguous_memory_optimization": false,
"cpu_checkpointing": false,
"number_checkpoints": null,
"synchronize_checkpoint_boundary": false,
"profile": false
}
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] aio_config ................... {'block_size': 1048576, 'queue_depth': 8, 'thread_count': 1, 'single_submit': False, 'overlap_events': True, 'use_gds': False}
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] amp_enabled .................. False
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] amp_params ................... False
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] autotuning_config ............ {
"enabled": false,
"start_step": null,
"end_step": null,
"metric_path": null,
"arg_mappings": null,
"metric": "throughput",
"model_info": null,
"results_dir": "autotuning_results",
"exps_dir": "autotuning_exps",
"overwrite": true,
"fast": true,
"start_profile_step": 3,
"end_profile_step": 5,
"tuner_type": "gridsearch",
"tuner_early_stopping": 5,
"tuner_num_trials": 50,
"model_info_path": null,
"mp_size": 1,
"max_train_batch_size": null,
"min_train_batch_size": 1,
"max_train_micro_batch_size_per_gpu": 1.024000e+03,
"min_train_micro_batch_size_per_gpu": 1,
"num_tuning_micro_batch_sizes": 3
}
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] bfloat16_enabled ............. True
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] bfloat16_immediate_grad_update False
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] checkpoint_parallel_write_pipeline False
[2024-12-26 20:05:18,967] [INFO] [config.py:1003:print] checkpoint_tag_validation_enabled True
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] checkpoint_tag_validation_fail False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] comms_config ................. <deepspeed.comm.config.DeepSpeedCommsConfig object at 0x7f3e13fd95d0>
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] communication_data_type ...... None
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] compression_config ........... {'weight_quantization': {'shared_parameters': {'enabled': False, 'quantizer_kernel': False, 'schedule_offset': 0, 'quantize_groups': 1, 'quantize_verbose': False, 'quantization_type': 'symmetric', 'quantize_weight_in_forward': False, 'rounding': 'nearest', 'fp16_mixed_quantize': False, 'quantize_change_ratio': 0.001}, 'different_groups': {}}, 'activation_quantization': {'shared_parameters': {'enabled': False, 'quantization_type': 'symmetric', 'range_calibration': 'dynamic', 'schedule_offset': 1000}, 'different_groups': {}}, 'sparse_pruning': {'shared_parameters': {'enabled': False, 'method': 'l1', 'schedule_offset': 1000}, 'different_groups': {}}, 'row_pruning': {'shared_parameters': {'enabled': False, 'method': 'l1', 'schedule_offset': 1000}, 'different_groups': {}}, 'head_pruning': {'shared_parameters': {'enabled': False, 'method': 'topk', 'schedule_offset': 1000}, 'different_groups': {}}, 'channel_pruning': {'shared_parameters': {'enabled': False, 'method': 'l1', 'schedule_offset': 1000}, 'different_groups': {}}, 'layer_reduction': {'enabled': False}}
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] curriculum_enabled_legacy .... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] curriculum_params_legacy ..... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] data_efficiency_config ....... {'enabled': False, 'seed': 1234, 'data_sampling': {'enabled': False, 'num_epochs': 1000, 'num_workers': 0, 'curriculum_learning': {'enabled': False}}, 'data_routing': {'enabled': False, 'random_ltd': {'enabled': False, 'layer_token_lr_schedule': {'enabled': False}}}}
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] data_efficiency_enabled ...... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] dataloader_drop_last ......... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] disable_allgather ............ False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] dump_state ................... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] dynamic_loss_scale_args ...... None
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] eigenvalue_enabled ........... False
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] eigenvalue_gas_boundary_resolution 1
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] eigenvalue_layer_name ........ bert.encoder.layer
[2024-12-26 20:05:18,968] [INFO] [config.py:1003:print] eigenvalue_layer_num ......... 0
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] eigenvalue_max_iter .......... 100
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] eigenvalue_stability ......... 1e-06
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] eigenvalue_tol ............... 0.01
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] eigenvalue_verbose ........... False
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] elasticity_enabled ........... False
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] flops_profiler_config ........ {
"enabled": false,
"recompute_fwd_factor": 0.0,
"profile_step": 1,
"module_depth": -1,
"top_modules": 1,
"detailed": true,
"output_file": null
}
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] fp16_auto_cast ............... None
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] fp16_enabled ................. False
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] fp16_master_weights_and_gradients False
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] global_rank .................. 0
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] grad_accum_dtype ............. None
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] gradient_accumulation_steps .. 2
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] gradient_clipping ............ 1.0
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] gradient_predivide_factor .... 1.0
[2024-12-26 20:05:18,969] [INFO] [config.py:1003:print] graph_harvesting ............. False
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] hybrid_engine ................ enabled=False max_out_tokens=512 inference_tp_size=1 release_inference_cache=False pin_parameters=True tp_gather_partition_size=8
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] initial_dynamic_scale ........ 1
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] load_universal_checkpoint .... False
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] loss_scale ................... 1.0
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] memory_breakdown ............. False
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] mics_hierarchial_params_gather False
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] mics_shard_size .............. -1
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] monitor_config ............... tensorboard=TensorBoardConfig(enabled=False, output_path='', job_name='DeepSpeedJobName') comet=CometConfig(enabled=False, samples_log_interval=100, project=None, workspace=None, api_key=None, experiment_name=None, experiment_key=None, online=None, mode=None) wandb=WandbConfig(enabled=False, group=None, team=None, project='deepspeed') csv_monitor=CSVConfig(enabled=False, output_path='', job_name='DeepSpeedJobName')
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] nebula_config ................ {
"enabled": false,
"persistent_storage_path": null,
"persistent_time_interval": 100,
"num_of_version_in_retention": 2,
"enable_nebula_load": true,
"load_path": null
}
[2024-12-26 20:05:18,970] [INFO] [config.py:1003:print] optimizer_legacy_fusion ...... False
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] optimizer_name ............... None
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] optimizer_params ............. None
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] pipeline ..................... {'stages': 'auto', 'partition': 'best', 'seed_layers': False, 'activation_checkpoint_interval': 0, 'pipe_partitioned': True, 'grad_partitioned': True}
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] pld_enabled .................. False
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] pld_params ................... False
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] prescale_gradients ........... False
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] scheduler_name ............... None
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] scheduler_params ............. None
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] seq_parallel_communication_data_type torch.float32
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] sparse_attention ............. None
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] sparse_gradients_enabled ..... False
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] steps_per_print .............. inf
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] timers_config ................ enabled=True synchronized=True
[2024-12-26 20:05:18,971] [INFO] [config.py:1003:print] train_batch_size ............. 24
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] train_micro_batch_size_per_gpu 2
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] use_data_before_expert_parallel
False
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] use_node_local_storage ....... False
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] wall_clock_breakdown ......... False
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] weight_quantization_config ... None
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] world_size ................... 6
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] zero_allow_untested_optimizer True
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] zero_config .................. stage=3 contiguous_gradients=True reduce_scatter=True reduce_bucket_size=12845056 use_multi_rank_bucket_allreduce=True allgather_partitions=True allgather_bucket_size=500000000 overlap_comm=True load_from_fp32_weights=True elastic_checkpoint=False offload_param=DeepSpeedZeroOffloadParamConfig(device='cpu', nvme_path=None, buffer_count=5, buffer_size=100000000, max_in_cpu=1000000000, pin_memory=True) offload_optimizer=DeepSpeedZeroOffloadOptimizerConfig(device='cpu', nvme_path=None, buffer_count=4, pin_memory=True, pipeline_read=False, pipeline_write=False, fast_init=False, ratio=1.0) sub_group_size=1000000000 cpu_offload_param=None cpu_offload_use_pin_memory=None cpu_offload=None prefetch_bucket_size=11560550 param_persistence_threshold=35840 model_persistence_threshold=9223372036854775807 max_live_parameters=1000000000 max_reuse_distance=1000000000 gather_16bit_weights_on_model_save=True use_all_reduce_for_fetch_params=False stage3_gather_fp16_weights_on_model_save=False ignore_unused_parameters=True legacy_stage1=False round_robin_gradients=False zero_hpz_partition_size=1 zero_quantized_weights=False zero_quantized_nontrainable_weights=False zero_quantized_gradients=False mics_shard_size=-1 mics_hierarchical_params_gather=False memory_efficient_linear=True pipeline_loading_checkpoint=False override_module_apply=True
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] zero_enabled ................. True
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] zero_force_ds_cpu_optimizer .. True
[2024-12-26 20:05:18,972] [INFO] [config.py:1003:print] zero_optimization_stage ...... 3
[2024-12-26 20:05:18,973] [INFO] [config.py:989:print_user_config] json = {
"train_batch_size": 24,
"train_micro_batch_size_per_gpu": 2,
"gradient_accumulation_steps": 2,
"gradient_clipping": 1.0,
"zero_allow_untested_optimizer": true,
"fp16": {
"enabled": false,
"loss_scale": 0,
"loss_scale_window": 1000,
"initial_scale_power": 16,
"hysteresis": 2,
"min_loss_scale": 1
},
"bf16": {
"enabled": true
},
"zero_optimization": {
"stage": 3,
"overlap_comm": true,
"contiguous_gradients": true,
"sub_group_size": 1.000000e+09,
"reduce_bucket_size": 1.284506e+07,
"stage3_prefetch_bucket_size": 1.156055e+07,
"stage3_param_persistence_threshold": 3.584000e+04,
"stage3_max_live_parameters": 1.000000e+09,
"stage3_max_reuse_distance": 1.000000e+09,
"stage3_gather_16bit_weights_on_model_save": true,
"offload_optimizer": {
"device": "cpu",
"pin_memory": true
},
"offload_param": {
"device": "cpu",
"pin_memory": true
}
},
"steps_per_print": inf
}
[INFO|trainer.py:2313] 2024-12-26 20:05:18,973 >> ***** Running training *****
[INFO|trainer.py:2314] 2024-12-26 20:05:18,973 >> Num examples = 1,000
[INFO|trainer.py:2315] 2024-12-26 20:05:18,974 >> Num Epochs = 3
[INFO|trainer.py:2316] 2024-12-26 20:05:18,974 >> Instantaneous batch size per device = 2
[INFO|trainer.py:2319] 2024-12-26 20:05:18,974 >> Total train batch size (w. parallel, distributed & accumulation) = 24
[INFO|trainer.py:2320] 2024-12-26 20:05:18,974 >> Gradient Accumulation steps = 2
[INFO|trainer.py:2321] 2024-12-26 20:05:18,974 >> Total optimization steps = 126
[INFO|trainer.py:2322] 2024-12-26 20:05:18,978 >> Number of trainable parameters = 7,615,616,512
0%| | 0/126 [00:00<?, ?it/s][rank3]: Traceback (most recent call last):
[rank3]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank3]: launch()
[rank3]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank3]: run_exp()
[rank3]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank3]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank3]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank3]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank3]: return inner_training_loop(
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank3]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank3]: self.accelerator.backward(loss, **kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank3]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank3]: self.engine.step()
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank3]: self._take_model_step(lr_kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank3]: self.optimizer.step()
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank3]: ret_val = func(*args, **kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank3]: self._optimizer_step(sub_group_id)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank3]: cpu_loss = self.optimizer.step()
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank3]: out = func(*args, **kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank3]: return func(*args, **kwargs)
[rank3]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank3]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank3]: RuntimeError: tensor does not have a device
[rank5]: Traceback (most recent call last):
[rank5]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank5]: launch()
[rank5]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank5]: run_exp()
[rank5]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank5]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank5]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank5]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank5]: return inner_training_loop(
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank5]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank5]: self.accelerator.backward(loss, **kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank5]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank5]: self.engine.step()
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank5]: self._take_model_step(lr_kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank5]: self.optimizer.step()
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank5]: ret_val = func(*args, **kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank5]: self._optimizer_step(sub_group_id)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank5]: cpu_loss = self.optimizer.step()
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank5]: out = func(*args, **kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank5]: return func(*args, **kwargs)
[rank5]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank5]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank5]: RuntimeError: tensor does not have a device
[rank4]: Traceback (most recent call last):
[rank4]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank4]: launch()
[rank4]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank4]: run_exp()
[rank4]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank4]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank4]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank4]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank4]: return inner_training_loop(
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank4]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank4]: self.accelerator.backward(loss, **kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank4]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank4]: self.engine.step()
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank4]: self._take_model_step(lr_kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank4]: self.optimizer.step()
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank4]: ret_val = func(*args, **kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank4]: self._optimizer_step(sub_group_id)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank4]: cpu_loss = self.optimizer.step()
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank4]: out = func(*args, **kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank4]: return func(*args, **kwargs)
[rank4]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank4]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank4]: RuntimeError: tensor does not have a device
[rank2]: Traceback (most recent call last):
[rank2]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank2]: launch()
[rank2]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank2]: run_exp()
[rank2]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank2]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank2]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank2]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank2]: return inner_training_loop(
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank2]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank2]: self.accelerator.backward(loss, **kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank2]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank2]: self.engine.step()
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank2]: self._take_model_step(lr_kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank2]: self.optimizer.step()
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank2]: ret_val = func(*args, **kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank2]: self._optimizer_step(sub_group_id)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank2]: cpu_loss = self.optimizer.step()
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank2]: out = func(*args, **kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank2]: return func(*args, **kwargs)
[rank2]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank2]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank2]: RuntimeError: tensor does not have a device
[rank1]: Traceback (most recent call last):
[rank1]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank1]: launch()
[rank1]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank1]: run_exp()
[rank1]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank1]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank1]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank1]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank1]: return inner_training_loop(
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank1]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank1]: self.accelerator.backward(loss, **kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank1]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank1]: self.engine.step()
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank1]: self._take_model_step(lr_kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank1]: self.optimizer.step()
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank1]: ret_val = func(*args, **kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank1]: self._optimizer_step(sub_group_id)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank1]: cpu_loss = self.optimizer.step()
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank1]: out = func(*args, **kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank1]: return func(*args, **kwargs)
[rank1]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank1]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank1]: RuntimeError: tensor does not have a device
[rank0]: Traceback (most recent call last):
[rank0]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 23, in
[rank0]: launch()
[rank0]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/launcher.py", line 19, in launch
[rank0]: run_exp()
[rank0]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/tuner.py", line 59, in run_exp
[rank0]: run_sft(model_args, data_args, training_args, finetuning_args, generating_args, callbacks)
[rank0]: File "/root/autodl-tmp/LLaMA-Factory/src/llamafactory/train/sft/workflow.py", line 101, in run_sft
[rank0]: train_result = trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2122, in train
[rank0]: return inner_training_loop(
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 2474, in _inner_training_loop
[rank0]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/transformers/trainer.py", line 3606, in training_step
[rank0]: self.accelerator.backward(loss, **kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/accelerator.py", line 2238, in backward
[rank0]: self.deepspeed_engine_wrapped.backward(loss, **kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/accelerate/utils/deepspeed.py", line 195, in backward
[rank0]: self.engine.step()
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2213, in step
[rank0]: self._take_model_step(lr_kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 2119, in _take_model_step
[rank0]: self.optimizer.step()
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/utils/nvtx.py", line 18, in wrapped_fn
[rank0]: ret_val = func(*args, **kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 2095, in step
[rank0]: self._optimizer_step(sub_group_id)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/runtime/zero/stage3.py", line 971, in _optimizer_step
[rank0]: cpu_loss = self.optimizer.step()
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/torch/optim/optimizer.py", line 391, in wrapper
[rank0]: out = func(*args, **kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
[rank0]: return func(*args, **kwargs)
[rank0]: File "/root/miniconda3/lib/python3.10/site-packages/deepspeed/ops/adam/cpu_adam.py", line 163, in step
[rank0]: self.ds_opt_adam.adam_update(self.opt_id, state['step'], group['lr'], beta1, beta2, group['eps'],
[rank0]: RuntimeError: tensor does not have a device

Expected behavior

No response

Others

No response

@github-actions github-actions bot added the pending This problem is yet to be addressed label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant