Category "huggingface-transformers"

Converting h5 to tflite [closed]

I have been trying to get this zero-shot text classification joeddav / xlm-roberta-large-xnli to convert from h5 to tflite file (https://huggi

Slow prediction speed for translation model opus-mt-en-ro

I'm using the model Helsinki-NLP/opus-mt-en-ro from huggingface. To produce output, I'm using the following code: inputs = tokenizer( questions,

Why aren't transformers imported in Python?

I want to import transformers in jupyter notebook but I get the following error. What is the reason for this error? My Python version is 3.8 ImportError: cannot

Is there any faster way to get word embeddings given sub-word embeddings in BERT

Using bert.tokenizer I can get the subword ids and the word spans of words in a sentence, for example, given the sentence "This is an example", I get the encode

Loading HuggingFace tokenizer from Dropbox (or other cloud storage)

I have a classifying model, and I have nearly finished turning it into a streamlit app. I have the embeddings and model on dropbox. I have successfully imported

Sentence Pair Classification using BERT Transformers Value Error

I was doing sentence pair classification using BERT. At first, I encode the sentence pair as train_encode = tokenizer(train1, train2,padding="max_length",trunca

Huggingface transformers) training loss sometimes decreases really slowly (using Trainer)

I'm fine-tuning sentiment analysis model using news data. As the simplest way is using Huggingface pre-trained model (roberta-base), I followed Huggingface tuto

Huggingface transformers) training loss sometimes decreases really slowly (using Trainer)

I'm fine-tuning sentiment analysis model using news data. As the simplest way is using Huggingface pre-trained model (roberta-base), I followed Huggingface tuto

It looks like the config file at 'bert-base-uncased' is not a valid JSON file?

Working fine for months, then I interrupted a "bert-large-cased" download and the following code returns the error in the title: from transformers import BertMo

Value error trying to fit a logistic regression with SentenceTransformer output (embeddig)

My code: model = SentenceTransformer('hiiamsid/sentence_similarity_spanish_es') I apply the model to the text column of the data frame prueba['encoder'] = prueb

Do I need to train on my own data in using bert model as an embedding vector?

When I try the huggingface models and it gives the following error message: from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pre

Weird behaviour when finetuning Huggingface Bert model with Tensorflow

I am trying to fine tune a Huggingface Bert model using Tensorflow (on ColabPro GPU enabled) for tweets sentiment analysis. I followed step by step the guide on

M2M100Tokenizer.from_pretrained 'NoneType' object is not callable

I have the following chunk of code from this link: from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer hi_text = "जीव

OSError: You seem to have cloned a repository without having git-lfs installed. Please install git-lfs and run git lfs install followed by git lfs pul

I'm using Jupyter Labs on AWS SageMaker. Kernel: conda_pytorch_p36 and did Restart & Run All. I git cloned this repo. Attempt at installing git-lfs: !curl -

Type of adapters for machine translation (AdapterHub tutorial)

I'm following this guide which explains how to apply adapters to a model for a binary classification task, and I want to adapt it to a machine translation task.

Transformers model from Hugging-Face throws error that specific classes couldn t be loaded

Hi after running this code below, I get the following error. ValueError: Could not load model facebook/bart-large-mnli with any of the following classes: (<c

Solving "CUDA out of memory" when fine-tuning GPT-2 (HuggingFace)

I get the reoccuring CUDA out of memory error when using the HuggingFace Transformers library to fine-tune a GPT-2 model and can't seem to solve it, despite my

RuntimeError: Found dtype Long but expected Float when fine-tuning using Trainer API

I'm trying to fine-tune BERT model for sentiment analysis (classifying text as positive/negative) with Huggingface Trainer API. My dataset has two columns, Text

How to early-stop autoregressive model with a list of stop words?

I am using GPT-Neo model from transformers to generate text. Because the prompt I use starts with '{', so I would like to stop the sentence once the paring '}'

RoBERTa classifier: cannot generate single prediction

I have succesfully trained a text emotion classifier fine-tuning a RoBERTa language model, mostly using a helpful notebook found online. Now I am trying to writ