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

BERT model is slow in Pytorch #27756

Closed
2 of 4 tasks
akote123 opened this issue Nov 29, 2023 · 2 comments
Closed
2 of 4 tasks

BERT model is slow in Pytorch #27756

akote123 opened this issue Nov 29, 2023 · 2 comments

Comments

@akote123
Copy link

akote123 commented Nov 29, 2023

System Info

transformers 4.35.2
tensorflow 2.15.0
torch 2.1.1

  • transformers version: 4.35.2
  • Platform: Linux-6.2.0-1016-aws-aarch64-with-glibc2.35
  • Python version: 3.11.0
  • Huggingface_hub version: 0.19.4
  • Safetensors version: 0.4.0
  • Accelerate version: 0.24.1
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.1.1 (False)
  • Tensorflow version (GPU?): 2.15.0 (False)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?:

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

TF code is as follows:
tf_bert.txt
Pytorch code is :
pytorch_bert.txt

Expected behavior

I have tried BERT uncased model with Tensorflow and Pytorch but Pyt is slower . In pytorch if I increase the batch size to 512 the system gets hang.

@ArthurZucker
Copy link
Collaborator

Hey 🤗 thanks for opening an issue! We try to keep the github issues for bugs/feature requests.
Could you ask your question on the forum instead? I'm sure the community will be of help!

Thanks!

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot closed this as completed Jan 7, 2024
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

2 participants