Skip to main content

All Questions

0 votes
1 answer
124 views

torch.OutOfMemoryError: CUDA out of memory. (Google Colab)

I tried to adapt the mBERT model to an existing code. However, I received the following issue even though I tried different solutions. torch.OutOfMemoryError: CUDA out of memory. Tried to allocate 20....
MarMarhoun's user avatar
0 votes
0 answers
78 views

Emotion Analysis with bhadresh-savani/bert-base-uncased-emotion

Hope I can get some help here please! I am trying to run an emotion analysis model from Hugging Face rep. (bhadresh-savani/bert-base-uncased-emotion) and I am struggling with the model run as it's ...
Rita Bini's user avatar
2 votes
1 answer
39 views

How to convert character indices to BERT token indices

I am working with a question-answer dataset UCLNLP/adversarial_qa. from datasets import load_dataset ds = load_dataset("UCLNLP/adversarial_qa", "adversarialQA") How do I map ...
Jack Peng's user avatar
  • 632
0 votes
0 answers
17 views

Bert models show tokenizing statistics

Is there any built-in way to request some tokenizing statistics when using BertTokenizer.from_pretrained('bert-base-uncased') and BertModel.from_pretrained('bert-base-uncased') to understand how ...
accidentallall's user avatar
2 votes
1 answer
58 views

Dutch sentiment analysis RobBERTje outputs just positive/negative labels, netural label is missing

When I run Dutch sentiment analysis RobBERTje, it outputs just positive/negative labels, netural label is missing in the data. https://huggingface.co/DTAI-KULeuven/robbert-v2-dutch-sentiment There are ...
pjercic's user avatar
  • 473
0 votes
1 answer
65 views

Why is Keras pretrained BERT MaskedLM producing inconsistent predictions?

I am trying to use keras-nlp with a pretrained masked BERT model to predict some tokens in a sequence. However the model produces inconsistent results. What could be wrong or am i misunderstanding ...
user3085693's user avatar
0 votes
1 answer
326 views

How do I freeze only some embedding indices with tied embeddings?

I found in Is it possible to freeze only certain embedding weights in the embedding layer in pytorch? a nice way to freeze only some indices of an embedding layer. However, while including it in a ...
Mirco Ramo's user avatar
0 votes
1 answer
84 views

SBERT Fine-tuning always stops before finish all epochs

I'm working on a project using the SBERT pre-trained models (specifically MiniLM) for a text classification project with 995 classifications. I am following the steps laid out here for the most part ...
SohmOuse's user avatar
1 vote
2 answers
70 views

Identify starting row of actual data in Pandas DataFrame with merged header cells

My original df looks like this - df Note in the data frame: The headers are there till row 3 & from row 4 onwards, the values for those headers are starting. The numbers of rows & columns ...
Debojit Roy's user avatar
0 votes
0 answers
66 views

BERT embedding cosine similarities look very random and useless

I thought you can use BERT embeddings to determine semantic similarity. I was trying to group some words in categories using this, but the results were very bad. E.g. here is a small example with ...
mihovg93's user avatar
0 votes
0 answers
49 views

The Impact of Pretraining on Fine-tuning and Inference

I am working on a binary prediction classification task, primarily focusing on fine-tuning a BERT model to learn the association between CVEs and CWEs. I've structured my task into three phases: first,...
joehu's user avatar
  • 19
0 votes
1 answer
51 views

Trying to run GermanSentiment in Python on 10k to 30k texts, keeps crashing? Possibly too large dataset?

I want to do sentiment analysis on 2 datasets of tweets, one with 9k strings and one with 30k strings. I have imported GermanSentiment and it ran just fine with the demo code from GitHub, but when I ...
PyDev's user avatar
  • 91
0 votes
0 answers
114 views

How to fix RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn

I am trying to use a custom csv dataset to finetune a model: TheBloke/Mistral-7B-Instruct-v0.1-GPTQ.I performed data preprocessing and I split the dataset into train, validation and test set and then ...
Mayor's user avatar
  • 29
0 votes
0 answers
60 views

Issues Tokenizing SQL Data for BERT Model

I'm working on a project where I need to extract references from a SQL database, preprocess them, and use them to train a BERT model for token classification. Below is the code I have so far: # -*- ...
Gioking's user avatar
  • 29
0 votes
0 answers
132 views

TypeError: cross_entropy_loss(): argument 'target' (position 2) must be Tensor, not NoneType

Purpose: I tried to build a text classification pipeline using PyTorch and the Huggingface transformers library. The plan was to tokenize text data and combine it with numerical features for training ...
Bilal Sedef's user avatar

15 30 50 per page
1
2 3 4 5
18