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

关于多卡训练sup-bert的疑问 #36

Open
Anonymous-AI1 opened this issue Nov 5, 2024 · 0 comments
Open

关于多卡训练sup-bert的疑问 #36

Anonymous-AI1 opened this issue Nov 5, 2024 · 0 comments

Comments

@Anonymous-AI1
Copy link

Hi~ 感谢你们的开源工作

#32 中已经指出对于 PyTorch 2+,应该修改 run.sh 中的脚本,由 python -m torch.distributed.launch => torchrun

"sup-bert")
    # BC=(python -m torch.distributed.launch --nproc_per_node 4 train.py)
    BC=(torchrun --nproc_per_node 4 train.py)
    TRAIN_FILE=data/nli_for_simcse.csv
    BATCH=128
    EPOCH=3
    LR=5e-5
    TEMPLATE="*cls*_This_sentence_of_\"*sent_0*\"_means*mask*.*sep+*"
    MODEL=bert-base-uncased
    args=(--mask_embedding_sentence\
          --mask_embedding_sentence_template $TEMPLATE\
          --mask_embedding_sentence_delta\
          --mask_embedding_sentence_org_mlp)
    eargs=(--mask_embedding_sentence_org_mlp\
           --mask_embedding_sentence_delta \
           --mask_embedding_sentence \
           --mask_embedding_sentence_template $TEMPLATE )
    ;;

但是如此操作后,程序在 4 * 4090 中会出现 CUDA out of memory
我记得 SimCSE、PromptBERT 均是在 4 * 24 GB 设置下训练的,因此该现象很反常

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant