All Questions
58 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,...
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 ...
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 ...
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-...
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 ...
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....
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 ...
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'
...
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 ...
-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}")
...
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 ...
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: ...
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 ...
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 ...
-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
...