Instructions to use distilbert/distilbert-base-uncased with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use distilbert/distilbert-base-uncased with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="distilbert/distilbert-base-uncased")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased") model = AutoModelForMaskedLM.from_pretrained("distilbert/distilbert-base-uncased") - Inference
- Notebooks
- Google Colab
- Kaggle
I need Some Help
#14
by thebryanalvarado - opened
Hello, I want to run this model of the tutorial this pytorch part but it takes many time.
this is my code
Sorry for my english and sorry for I don't know how to publish a post or maybe start a discussion in comunity.
Check what device you are using using, if you are using CPU then change your device type to CUDA (GPU) by running-> torch.set_default_device('cuda')
Try to run this code on Google Colaboratory while changing runtime to T4 gpu.
Hope this helps :)
Hello @dhairyaS-Bn thanks for answer but my laptop has a nvidia 1670 that is useful or not.
use google colaboratory the model wont work on nvidia 1670 that much better, if it still takes much more time try to reduce samples

