Skip to content

Training error on klue-dp taskΒ #6

@pion0926

Description

@pion0926

Abstract(μš”μ•½) πŸ”₯

run-all.sh multi gpu μ‹€ν–‰ μ‹œ 일뢀 task(dependency parsing)κ°€ μ •μƒμ μœΌλ‘œ μž‘λ™ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

error-message:

RuntimeError: The size of tensor a (23) must match the size of tensor b (25) at non-singleton dimension 2

How to Reproduce(μž¬ν˜„ 방법) πŸ€”

[python==3.7.11]

git clone --recursive https://github.com/KLUE-benchmark/KLUE-Baseline.git
pip install -r requirements.txt
pip install torch==1.7.0+cu110 -f https://download.pytorch.org/whl/torch_stable.html (cuda version matching with torch)

run-all.sh μˆ˜μ •:
KLUE-DP
task="klue-dp"

python run_klue.py train --task ${task} --output_dir ${OUTPUT_DIR} --data_dir ${DATA_DIR}/${task}-${VERSION} --model_name_or_path klue/roberta-large --learning_rate 5e-5 --num_train_epochs 15 --gradient_accumulation_steps 1 --warmup_ratio 0.2 --train_batch_size 32 --patience 10000 --max_seq_length 256 --metric_key uas_macro_f1 --gpus 0 --num_workers 4

->

python run_klue.py train --task ${task} --output_dir ${OUTPUT_DIR} --data_dir ${DATA_DIR}/${task}-${VERSION} --model_name_or_path klue/roberta-large --learning_rate 3e-5 --num_train_epochs 10 --train_batch_size 16 --eval_batch_size 16 --max_seq_length 510 --gradient_accumulation_steps 2 --warmup_ratio 0.2 --weight_decay 0.01 --max_grad_norm 1.0 --patience 100000 --metric_key slot_micro_f1 --gpus 1 2 3 --num_workers 8

bash run-all.sh

RuntimeError: The size of tensor a (23) must match the size of tensor b (25) at non-singleton dimension 2

How to solve (μ–΄λ–»κ²Œ ν•΄κ²°ν•  수 μžˆμ„κΉŒμš”) πŸ™‹β€β™€

single GPU에선 λ©”λͺ¨λ¦¬ λΆ€μ‘±μœΌλ‘œ roBERTa-Large λͺ¨λΈλ‘œ ν•™μŠ΅μ΄ λΆˆκ°€ν•˜μ—¬
ν˜Ήμ‹œ 도움 받을 수 μžˆμ„κΉŒ μ‹Άμ–΄ λ¬Έμ˜λ“œλ¦½λ‹ˆλ‹€!

κ°μ‚¬ν•©λ‹ˆλ‹€.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions