2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Current SDK version is 0.16.3 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Configure stats pid to 173 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Loading settings from /root/.config/wandb/settings 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Loading settings from /opt/ml/code/wandb/settings 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Loading settings from environment variables: {'root_dir': '/opt/ml/model//sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048', 'api_key': '***REDACTED***', 'project': 'sft-codecontests-1112', 'run_name': 'sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048'} 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Applying setup settings: {'_disable_service': False} 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_setup.py:_flush():76] Inferring run settings from compute environment: {'program_relpath': 'qlearning_reasoning/training/sft.py', 'program_abspath': '/opt/ml/code/qlearning_reasoning/training/sft.py', 'program': '/opt/ml/code/qlearning_reasoning/training/sft.py'} 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:_log_setup():526] Logging user logs to /opt/ml/model//sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048/wandb/run-20241113_190246-kushalarora-rvv-main-2024-11-13-17-55-42-664-g0ro8r-algo-1/logs/debug.log 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:_log_setup():527] Logging internal logs to /opt/ml/model//sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048/wandb/run-20241113_190246-kushalarora-rvv-main-2024-11-13-17-55-42-664-g0ro8r-algo-1/logs/debug-internal.log 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:init():566] calling init triggers 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:init():573] wandb.init called with sweep_config: {} config: {'sagemaker_training_job_name': 'kushalarora-rvv-main-2024-11-13-17-55-42-664', 'batch_size': 64, 'cache_dir': '/opt/ml/data/input/.cache', 'dataset': 'code-contests', 'gradient_accumulation_steps': 8, 'logging_steps': 5, 'lr': '1e-6', 'max_seq_length': 2048, 'model_name': 'Qwen/Qwen2.5-Coder-7B-Instruct', 'num_train_epochs': 2, 'output_dir': '/opt/ml/output', 'push_to_hub': 'true', 'run_name': 'sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048', 'sagemaker_container_log_level': 20, 'sagemaker_instance_type': 'ml.p5.48xlarge', 'sagemaker_job_name': 'kushalarora-rvv-main-2024-11-13-17-55-42-664', 'sagemaker_program': 'sft.py', 'sagemaker_region': 'us-east-1', 'sagemaker_submit_directory': 's3://tri-ml-datasets/kushalarora-rvv-main-2024-11-13-17-55-42-664/source/sourcedir.tar.gz', 'sagemaker_torch_distributed_enabled': 'true', 'save_steps': 100, 'schedule': 'cosine', 'wandb_project': 'sft-codecontests-1112', 'weight_decay': 0.0, 'additional_framework_parameters': {'sagemaker_instance_type': 'ml.p5.48xlarge', 'sagemaker_torch_distributed_enabled': True}, 'channel_input_dirs': {}, 'current_host': 'algo-1', 'current_instance_group': 'homogeneousCluster', 'current_instance_group_hosts': ['algo-1'], 'current_instance_type': 'ml.p5.48xlarge', 'distribution_hosts': ['algo-1'], 'distribution_instance_groups': ['homogeneousCluster'], 'framework_module': 'sagemaker_pytorch_container.training:main', 'hosts': ['algo-1'], 'hyperparameters': {'batch_size': 64, 'cache_dir': '/opt/ml/data/input/.cache', 'dataset': 'code-contests', 'gradient_accumulation_steps': 8, 'logging_steps': 5, 'lr': '1e-6', 'max_seq_length': 2048, 'model_name': 'Qwen/Qwen2.5-Coder-7B-Instruct', 'num_train_epochs': 2, 'output_dir': '/opt/ml/model/', 'push_to_hub': True, 'run_name': 'sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048', 'save_steps': 100, 'schedule': 'cosine', 'wandb_project': 'sft-codecontests-1112', 'weight_decay': 0.0}, 'input_config_dir': '/opt/ml/input/config', 'input_data_config': {}, 'input_dir': '/opt/ml/input', 'instance_groups': ['homogeneousCluster'], 'instance_groups_dict': {'homogeneousCluster': {'hosts': ['algo-1'], 'instance_group_name': 'homogeneousCluster', 'instance_type': 'ml.p5.48xlarge'}}, 'is_hetero': False, 'is_master': True, 'is_modelparallel_enabled': None, 'is_smddpmprun_installed': False, 'is_smddprun_installed': True, 'job_name': 'kushalarora-rvv-main-2024-11-13-17-55-42-664', 'log_level': 20, 'master_hostname': 'algo-1', 'model_dir': '/opt/ml/model', 'module_dir': 's3://tri-ml-datasets/kushalarora-rvv-main-2024-11-13-17-55-42-664/source/sourcedir.tar.gz', 'module_name': '/opt/ml/code/qlearning_reasoning/training/sft', 'network_interface_name': 'eth0', 'num_cpus': 192, 'num_gpus': 8, 'num_neurons': 0, 'output_data_dir': '/opt/ml/output/data', 'output_intermediate_dir': '/opt/ml/output/intermediate', 'resource_config': {'current_group_name': 'homogeneousCluster', 'current_host': 'algo-1', 'current_instance_type': 'ml.p5.48xlarge', 'hosts': ['algo-1'], 'instance_groups': [{'hosts': ['algo-1'], 'instance_group_name': 'homogeneousCluster', 'instance_type': 'ml.p5.48xlarge'}], 'network_interface_name': 'eth0'}, 'user_entry_point': '/opt/ml/code/qlearning_reasoning/training/sft.py'} 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:init():616] starting backend 2024-11-13 19:02:46,428 INFO MainThread:173 [wandb_init.py:init():620] setting up manager 2024-11-13 19:02:46,429 INFO MainThread:173 [backend.py:_multiprocessing_setup():105] multiprocessing start_methods=fork,spawn,forkserver, using: spawn 2024-11-13 19:02:46,431 INFO MainThread:173 [wandb_init.py:init():628] backend started and connected 2024-11-13 19:02:46,434 INFO MainThread:173 [wandb_init.py:init():720] updated telemetry 2024-11-13 19:02:46,440 INFO MainThread:173 [wandb_init.py:init():753] communicating run to backend with 90.0 second timeout 2024-11-13 19:02:46,781 INFO MainThread:173 [wandb_run.py:_on_init():2262] communicating current version 2024-11-13 19:02:46,812 INFO MainThread:173 [wandb_run.py:_on_init():2271] got version response upgrade_message: "wandb version 0.18.6 is available! To upgrade, please run:\n $ pip install wandb --upgrade" 2024-11-13 19:02:46,813 INFO MainThread:173 [wandb_init.py:init():804] starting run threads in backend 2024-11-13 19:03:02,000 INFO MainThread:173 [wandb_run.py:_console_start():2241] atexit reg 2024-11-13 19:03:02,000 INFO MainThread:173 [wandb_run.py:_redirect():2096] redirect: wrap_raw 2024-11-13 19:03:02,000 INFO MainThread:173 [wandb_run.py:_redirect():2161] Wrapping output streams. 2024-11-13 19:03:02,001 INFO MainThread:173 [wandb_run.py:_redirect():2186] Redirects installed. 2024-11-13 19:03:02,001 INFO MainThread:173 [wandb_init.py:init():847] run started, returning control to user process 2024-11-13 19:03:02,004 INFO MainThread:173 [wandb_run.py:_config_callback():1343] config_cb None None {'vocab_size': 151671, 'max_position_embeddings': 32768, 'hidden_size': 3584, 'intermediate_size': 18944, 'num_hidden_layers': 28, 'num_attention_heads': 28, 'use_sliding_window': False, 'sliding_window': None, 'max_window_layers': 28, 'num_key_value_heads': 4, 'hidden_act': 'silu', 'initializer_range': 0.02, 'rms_norm_eps': 1e-06, 'use_cache': False, 'rope_theta': 1000000.0, 'rope_scaling': None, 'attention_dropout': 0.0, 'return_dict': True, 'output_hidden_states': False, 'output_attentions': False, 'torchscript': False, 'torch_dtype': 'bfloat16', 'use_bfloat16': False, 'tf_legacy_loss': False, 'pruned_heads': {}, 'tie_word_embeddings': False, 'chunk_size_feed_forward': 0, 'is_encoder_decoder': False, 'is_decoder': False, 'cross_attention_hidden_size': None, 'add_cross_attention': False, 'tie_encoder_decoder': False, 'max_length': 20, 'min_length': 0, 'do_sample': False, 'early_stopping': False, 'num_beams': 1, 'num_beam_groups': 1, 'diversity_penalty': 0.0, 'temperature': 1.0, 'top_k': 50, 'top_p': 1.0, 'typical_p': 1.0, 'repetition_penalty': 1.0, 'length_penalty': 1.0, 'no_repeat_ngram_size': 0, 'encoder_no_repeat_ngram_size': 0, 'bad_words_ids': None, 'num_return_sequences': 1, 'output_scores': False, 'return_dict_in_generate': False, 'forced_bos_token_id': None, 'forced_eos_token_id': None, 'remove_invalid_values': False, 'exponential_decay_length_penalty': None, 'suppress_tokens': None, 'begin_suppress_tokens': None, 'architectures': ['Qwen2ForCausalLM'], 'finetuning_task': None, 'id2label': {0: 'LABEL_0', 1: 'LABEL_1'}, 'label2id': {'LABEL_0': 0, 'LABEL_1': 1}, 'tokenizer_class': None, 'prefix': None, 'bos_token_id': None, 'pad_token_id': 151643, 'eos_token_id': 151645, 'sep_token_id': None, 'decoder_start_token_id': None, 'task_specific_params': None, 'problem_type': None, '_name_or_path': 'Qwen/Qwen2.5-Coder-7B-Instruct', '_attn_implementation_autoset': True, 'transformers_version': '4.46.0', 'model_type': 'qwen2', 'output_dir': '/opt/ml/model//sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048', 'overwrite_output_dir': False, 'do_train': False, 'do_eval': True, 'do_predict': False, 'eval_strategy': 'steps', 'prediction_loss_only': False, 'per_device_train_batch_size': 8, 'per_device_eval_batch_size': 8, 'per_gpu_train_batch_size': None, 'per_gpu_eval_batch_size': None, 'gradient_accumulation_steps': 8, 'eval_accumulation_steps': None, 'eval_delay': 0, 'torch_empty_cache_steps': None, 'learning_rate': 1e-06, 'weight_decay': 0.0, 'adam_beta1': 0.9, 'adam_beta2': 0.999, 'adam_epsilon': 1e-08, 'max_grad_norm': 1.0, 'num_train_epochs': 2, 'max_steps': -1, 'lr_scheduler_type': 'cosine', 'lr_scheduler_kwargs': {}, 'warmup_ratio': 0.0, 'warmup_steps': 0, 'log_level': 'passive', 'log_level_replica': 'warning', 'log_on_each_node': True, 'logging_dir': '/opt/ml/model//sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048/runs/Nov13_19-02-15_algo-1', 'logging_strategy': 'steps', 'logging_first_step': True, 'logging_steps': 5, 'logging_nan_inf_filter': True, 'save_strategy': 'epoch', 'save_steps': 100, 'save_total_limit': None, 'save_safetensors': True, 'save_on_each_node': False, 'save_only_model': False, 'restore_callback_states_from_checkpoint': False, 'no_cuda': False, 'use_cpu': False, 'use_mps_device': False, 'seed': 42, 'data_seed': None, 'jit_mode_eval': False, 'use_ipex': False, 'bf16': False, 'fp16': False, 'fp16_opt_level': 'O1', 'half_precision_backend': 'auto', 'bf16_full_eval': False, 'fp16_full_eval': False, 'tf32': None, 'local_rank': 0, 'ddp_backend': None, 'tpu_num_cores': None, 'tpu_metrics_debug': False, 'debug': [], 'dataloader_drop_last': False, 'eval_steps': 5, 'dataloader_num_workers': 0, 'dataloader_prefetch_factor': None, 'past_index': -1, 'run_name': 'sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_acc-8_len-2048', 'disable_tqdm': False, 'remove_unused_columns': True, 'label_names': None, 'load_best_model_at_end': False, 'metric_for_best_model': None, 'greater_is_better': None, 'ignore_data_skip': False, 'fsdp': ['full_shard', 'auto_wrap'], 'fsdp_min_num_params': 0, 'fsdp_config': {'activation_checkpointing': False, 'auto_wrap_policy': 'TRANSFORMER_BASED_WRAP', 'backward_prefetch': 'BACKWARD_PRE', 'cpu_ram_efficient_loading': True, 'forward_prefetch': False, 'offload_params': False, 'sharding_strategy': 'FULL_SHARD', 'state_dict_type': 'FULL_STATE_DICT', 'sync_module_states': True, 'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}, 'fsdp_transformer_layer_cls_to_wrap': None, 'accelerator_config': {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}, 'deepspeed': None, 'label_smoothing_factor': 0.0, 'optim': 'adamw_torch', 'optim_args': None, 'adafactor': False, 'group_by_length': False, 'length_column_name': 'length', 'report_to': ['wandb'], 'ddp_find_unused_parameters': None, 'ddp_bucket_cap_mb': None, 'ddp_broadcast_buffers': None, 'dataloader_pin_memory': True, 'dataloader_persistent_workers': False, 'skip_memory_metrics': True, 'use_legacy_prediction_loop': False, 'push_to_hub': True, 'resume_from_checkpoint': None, 'hub_model_id': 'sft-codecontests-qwen_ds-code-contests_model-Qwen2.5-Coder-7B-Instruct_sch-cosine_lr-1e-6_bs-64_', 'hub_strategy': 'every_save', 'hub_token': '', 'hub_private_repo': False, 'hub_always_push': False, 'gradient_checkpointing': False, 'gradient_checkpointing_kwargs': {'use_reentrant': False}, 'include_inputs_for_metrics': False, 'include_for_metrics': [], 'eval_do_concat_batches': True, 'fp16_backend': 'auto', 'evaluation_strategy': None, 'push_to_hub_model_id': None, 'push_to_hub_organization': None, 'push_to_hub_token': '', 'mp_parameters': '', 'auto_find_batch_size': False, 'full_determinism': False, 'torchdynamo': None, 'ray_scope': 'last', 'ddp_timeout': 1800, 'torch_compile': False, 'torch_compile_backend': None, 'torch_compile_mode': None, 'dispatch_batches': None, 'split_batches': None, 'include_tokens_per_second': False, 'include_num_input_tokens_seen': False, 'neftune_noise_alpha': None, 'optim_target_modules': None, 'batch_eval_metrics': False, 'eval_on_start': False, 'use_liger_kernel': False, 'eval_use_gather_object': False, 'dataset_text_field': 'text', 'packing': False, 'max_seq_length': 2048, 'dataset_num_proc': None, 'dataset_batch_size': 64, 'model_init_kwargs': None, 'dataset_kwargs': {}, 'eval_packing': None, 'num_of_sequences': 1024, 'chars_per_token': '', 'use_liger': False} 2024-11-13 19:03:02,008 INFO MainThread:173 [wandb_config.py:__setitem__():151] config set model/num_parameters = 951599936 - > 2024-11-13 19:03:02,009 INFO MainThread:173 [wandb_run.py:_config_callback():1343] config_cb model/num_parameters 951599936 None