Skip to main content

All Questions

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
250 views

TypeError: clean() got an unexpected keyword argument 'fix_unicode' [closed]

I have write a python program into implement BERT algorithm But I encounter below error and cleantext() function is below.I updated cleantext package but it does not work.I have write a python program ...
user25005273's user avatar
0 votes
0 answers
101 views

How to use BERT for identify words unrelated to the content of a sentence and replace them with suitable words?

For this question we can see below example: A: Jack continues to pray well. B: Jack continues to play well. In the first sentence, the word "pray" is written in a typographical error and the ...
Pourya0022's user avatar
1 vote
0 answers
141 views

Why using lime with BERT giving memory error

I am using LIME to visualize my finetuned BERT model. I don't know why it is taking too much memory and killed by the system. Here is my code: tokenizer = BertTokenizer.from_pretrained('bert-base-...
BIPLAB ROY's user avatar
1 vote
0 answers
332 views

How to get prediction value for serving mlflow bert model?

Got Error messing for predicting after serving the model. I want my output in pytorch tensor. I am using bert for classification in pytorch and mlflow for model tracking and model serving. I have ...
Subhash's user avatar
  • 11
1 vote
0 answers
458 views

Pytorch BertForSequenceClassification model always predicts 0

I am using Bert on the https://www.kaggle.com/datasets/deepcontractor/supreme-court-judgment-prediction dataset to perform binary classification and am having problems with my model predicting all 0's....
camdenmcgath's user avatar
2 votes
1 answer
195 views

bert_vocab.bert_vocab_from_dataset returning wrong vocabulary [closed]

i'm trying to build a tokenizer following the tf's tutorial https://www.tensorflow.org/text/guide/subwords_tokenizer. I'm basically doing the same thing only with a different dataset. The dataset in ...
Niccolò Tiezzi's user avatar
0 votes
1 answer
572 views

Bert model for word similarity

I'm quite new to NLP, and I want to calculate the similarity between a given word and each word in a given list. I have the following code # Load the BERT model model_name = 'bert-base-uncased' ...
spain engy's user avatar
2 votes
0 answers
210 views

How can I implement this BERT model for sequential sentences classification using HuggingFace?

I want to classify the functions of sentences in the abstracts of scientific papers, and the function of a sentence is related to the functions of its surrounding sentences. I found the model proposed ...
Tom Leung's user avatar
  • 374
-1 votes
1 answer
183 views

not enough value to unpack in BERT

I am training a FinBERT model (trained on Finance corpus), this is my code for training process: for epoch in range(EPOCHS): # Show details print(f"Epoch {epoch + 1}/{EPOCHS}") ...
Jasmine N's user avatar
1 vote
0 answers
3k views

RuntimeError: each element in list of batch should be of equal size in BERT

Now i want to train bert model. But runtimeError occured. I don't know how to solve this error. Please give me some help. Here is my code. I excute this code in python = 3.8.10 pytorch = 1.8.0 I used ...
pasongsong's user avatar
4 votes
1 answer
10k views

There appear to be 1 leaked semaphore objects to clean up at shutdown

I am using MacOS & used DistilBert model using Sentence Transformer for chatbot implementation and generated the API in VS code. But after giving 3 inputs it pop’s up this error: UserWarning: ...
Tejas Sutar's user avatar
1 vote
0 answers
138 views

'Functional' object has no attribute 'predict_classes' error when we use cross_val_predict

I want to use Bert through Tensorflow. My plan is to use Bert with 5-fold cross validation, batch_size = 64, epoch = 100, and early stopping. I have 5 classes in my data. Therefore, I wrote the ...
Balive13's user avatar
  • 119
0 votes
1 answer
2k views

Target Data Missing from tensorflow fit()

So I have a problem when train deep learning with BERT with tensorflow which contain text dataset. So i want to fit() the model but got an error when training. I think it happen because the data_train ...
ddinfiwis's user avatar
-1 votes
1 answer
2k views

Warning while loading the BertModel

I load a BERT model using the following code snippet: name = "bert-base-uncased" from transformers import BertModel from transformers import BertTokenizer ...
Exploring's user avatar
  • 3,569

15 30 50 per page