worker_error
Hi, great work! I'm new to this field. When I ran the RL model training for sdar-4b, the following error occurred at step 11. I'm not sure if you've encountered this before, but I'd be extremely grateful for any advice. The configuration uses an 8 A100 setup, with no changes made to the experimental settings.
`Generating: 20%|██████████████████████████████▉ | 38/188 [8:32:06<1:42:52, 41.15s/it, Throughput=2 tok/s]Traceback (most recent call last):
File "/mnt/data/dLLM-RL/sample/sdar_rl_rollout.py", line 566, in
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/data/dLLM-RL/sample/sdar_rl_rollout.py", line 577, in
Hi, thanks for your interest. This error is due to the time limit is reached during inference:
File "/mnt/data/dLLM-RL/sample/sdar_rl_rollout.py", line 566, in
kind, payload = out_q.get(timeout=1800)
File "/root/miniconda3/envs/dllm-rl/lib/python3.10/multiprocessing/queues.py", line 114, in get
raise Empty
_queue.Empty
To increase time limit budget, you can increase 1800, such like 3600.
However, it's uncommon to reach this time limit during inference. I only faced this error when using long-cot morel like trado-8B-thinking, or using a large block size model such like sdar-4b with large block size 32 (in this case, you should decrease max_active).
In your case, I haven't met this error on sdar-4b model with block size 4 before. Could you show me the config you are using?
wandb: entity: null resume: auto run_id: vkl6o92e experiment: project: rl_sdar function: train start_from_scratch: true total_step: 80 save_every: 10 eval_every: 10 current_epoch: 10 deepspeed_file: 1_node_8_gpus_deepspeed_zero3 num_node: 1 node_index: 0 logging_dir: rl_sdar/logs model: pretrained_model: /mnt/data/dLLM-RL/trado/models--Gen-Verse--TraDo-4B-Instruct/ optimized_name: optimized model_base: sdar dataset: train_dataset: MATH_train optimization_data: MATH_train data_type: math rollout: tensor_parallel_size: 1 max_active: 256 num_task_per_step: 64 num_response_per_task: 16 temperature: 1.0 max_token: 2000 block_size: 4 denoising_steps_per_block: 4 top_p: 1.0 top_k: 0 remasking_strategy: low_confidence_dynamic dynamic_threshold: 0.9 start_with_think: false execute: num_chunk: 128 training: gradient_checkpointing_enable: true gradient_accumulation_steps: 32 batch_size_lm: 1 mixed_precision: bf16 enable_tf32: true seed: 10086 num_train_epochs: 1 max_grad_norm: 1.0 method: TraceRL block_size: 4 shrink: 1 post_num: 0 max_gen_length: 2000 max_prompt_len: 784 lower_p: 0.1 upper_p: 0.9 eps: 0.2 beta: 0.01 use_kl_estimator_k3: true optimizer: name: adamw params: learning_rate: 1.0e-06 scale_lr: false beta1: 0.9 beta2: 0.999 weight_decay: 0.0 epsilon: 1.0e-08 lr_scheduler: scheduler: cosine params: learning_rate: ${optimizer.params.learning_rate} warmup_steps: 0 min_lr_scale: 1.0 evaluation: eval_dataset: MATH500 data_type: math tensor_parallel_size: 1 max_active: 256 num_response_per_task: 3 temperature: 1.0 max_token: 2000 block_size: 4 denoising_steps_per_block: 4 top_p: 1.0 top_k:
- 0
- 1 remasking_strategy:
- low_confidence_dynamic
- low_confidence_static dynamic_threshold: 0.9 start_with_think: false config: configs/rl_sdar.yaml
Thank you very much for your prompt reply. My configuration is as shown above, and I encountered this error in step 11.
This config is sound. Could you rerun this another time with smaller max_active, like 128 or 64? If the problem still exists, I will check the inference engine (possibly due to the most recent undate
ok, I'll try again. Thanks for your reply.
Hi, I changed max_active to 64, but the issue still occurred during the evaluation after the ten step. I'm not sure if this is an issue with the inference engine you mentioned or a problem on my end, but this kind of stagnation didn't occur during the first ten steps of training. Generating: 0%| | 0/188 [1:09:54<?, ?it/s, Throughput=12 tok/s]
This only happen during evaluation process? Did you decrease both rollout.max_active and evaluation.max_active? There are two possiblities. First is the training collapsed. Second is there are too many samples batched together in the evaluation step, and caused this stagnation. One way to find out is to evaluate the check point model and your pretrained model on MATH500 using the same evaluation config in your rl config. Could you check it?
Since you have save_every: 10, I assume you have this check point model right? If both the check point model and pretrained model face stagnation during your evaluation, it must be the problem of large max_active or inference engine. If only check point model faces stagnation, it means the training collpased, we can talk about that later. But if you only face stagnation during evaluation part, I think it's very likely to be the first reason.
Thank you for your response. First, I reduced both rollout.max_active and evaluation.max_active to 64. Regardless of whether max_active is set to 256 or 64, this evaluation stagnation only occurs during the evaluation process. Additionally, following your suggestion, I evaluated the pre-trained model and the model saved at step 10 using python eval.py config=configs/trado_eval.yaml. Both produced results without evaluation stagnation. I suspect the only possibility is an issue with the model evaluation code in the training process. This is just a guess, as I'm new to this field and not very familiar with the code yet, so I haven't conducted a detailed inspection. Any advice would be greatly appreciated.
I have solved this now. I find using max_active 256 indeed causes stagnation during evaluation for static sampling in 8 A100's training. Please set evaluation.max_active to be 16. I have tested that this can solve this problem. By the way, you don't need to start with step 1 again. You can set experiment.start_from_scratch to be False and experiment.current_epoch to be 10 to continue your training. Feel free to ask again.
Hello, may I ask a silly question? What kind of operation is applied to the shaded areas in these images? Due to server limitations, I can only inspect them on TensorBoard instead of WandB. Is the solid line a smoothed version of the fluctuating curve? Then, is the shaded area the confidence interval or the actual fluctuation range of the curve? Or something else? I would be extremely grateful for any response. @yinjjiew