Questions tagged [bert]

BERT stands for Bidirectional Encoder Representations from Transformers and is designed to pre-train deep bidirectional representations by jointly conditioning on both left and right context in all layers

Filter by
Sorted by
Tagged with
0 votes
0 answers
21 views

Assign layers and weights in BERT

I print the weight names and shape of the BERT transformer. Now, I want to assign the printed weight to the layers in the transformers architecture: In the following, I can assign query, key and ...
Christian01's user avatar
0 votes
0 answers
13 views

What happens when I set is_decoder to True in the bert API from huggingface?

Please help me understand the implications of initialising the bert model from huggingface with is_decoder parameter set to True ...
figs_and_nuts's user avatar
1 vote
1 answer
48 views

How does Bert masked language modelling task make sense if half the time the next sentence is wrong context in the sequence passed through the encoder

Bert has two types of tasks that it uses to learn contextual word embeddings: Masked word prediction Next sentence prediction I have read the paper and even there the training details are a little ...
figs_and_nuts's user avatar
0 votes
0 answers
10 views

F1 and Exact-Match (EM) Score in Extractive QA NLP

I have a question as to how the F1 should be calculated in NLP and whether the text normalization is optional or not. So I have been working on a project where we created a closed-domain extractive QA ...
tt40kiwi's user avatar
  • 101
0 votes
0 answers
16 views

TFRobertaSequenceClassification for Address Normalization task

I have dataset with two column: one with faulty addresses, and other with correct addresses. I want to train a model such that, I can use it later for correcting all the incoming faulty addresses. I ...
learner_account's user avatar
0 votes
0 answers
33 views

How can I avoid the irrelevant number of sentences in the result?

The nature of the data I have is not arranged; however, I'm trying to extract the appropriate sentences for each query as a sample for ground truth. Also, the most critical problem is that I use the ...
Begnnier's user avatar
0 votes
0 answers
30 views

How to use Bertweet model for topic modeling

The problem is implementation of Bertweet in a topic-modeling project with understandable output like BERTopic, i want to use it on a relatively large (20k tweets) unlabelled dataset to segment it ...
Rossin's user avatar
  • 1
1 vote
2 answers
87 views

Training model using BERT

I have generated dataset using chat gpt. Dataset has 9000 data recodes. It's 6 class sentiment analysis. classes are 0,1,2,3,4,5 I used 3000 recodes for training, 1200 recods for validation and ...
Sandun Tharaka's user avatar
0 votes
0 answers
39 views

Help understanding working of KeyBERT for keyphrase extraction

I'm fairly new to reading and understanding research papers, so I wanted to get a second opinion on whether my understanding of KeyBERT was correct. Here is a high level overview of my understanding ...
Prithvi's user avatar
  • 33
0 votes
0 answers
28 views

Combining Textual, Categorical and Numerical data for Semantic Search using SentenceTransformers model

I'm building a food semantic search model and I want to use a pre-trained SentenceTransformers model with cosine similarity. I'm using Epicurious dataset for the corpus which consists of textual (&...
Alex's user avatar
  • 1
0 votes
0 answers
22 views

How to deal with short text data using NLP models?

Now I want to use my own domain data to train NLP model like BERT. The following is the details of my data: data length distribution: over 70% of my data has the length shorter than 5 and the largest ...
Jackie Shi's user avatar
0 votes
0 answers
275 views

Adapting a BERT-based model from HuggingFace for NER (named entity recognition) and RE (relation extraction)?

Context: NER (named entity recognition) and RE (relation extraction) from sentences obtained from radiology reports (medical text). There is a BERT-based model from HuggingFace I would like to use for ...
Pablo Messina's user avatar
4 votes
2 answers
3k views

Why does everyone use BERT in research instead of LLAMA or GPT or PaLM, etc?

It could be that I'm misunderstanding the problems space and the iterations of LLAMA, GPT, and PaLM are all based on BERT like many language models are, but every time I see a new paper in improving ...
Ethan's user avatar
  • 143
0 votes
0 answers
32 views

Classification errors on 'bert-base-uncased' text classifier

Disclaimer : This is a long question, please be patient. Thanks in advance I am using bert-base-uncased for text-classification. I have 11 classes, and the classification is happening alright for most ...
Vinay Varahabhotla's user avatar
0 votes
0 answers
28 views

BERT + tensorflow + deterministic

Im using BERT in tensorflow, but when I try to turn it deterministic I got the error: "When determinism is enabled, random ops must have a seed specified. [[{{node dropout/dropout/random_uniform/...
Heloisa Rocha's user avatar
0 votes
0 answers
13 views

How to analyze social media data to see its impact on a game's sales

I work for a console gaming giant. We forecasted the sales for a RPG game that was to be released few months back. But the actual sales was twice the forecast. This compelled the developers to ...
Ritik P. Nayak's user avatar
0 votes
2 answers
32 views

building embeddings for Phrases from scratch

I have a datadet with many phrases which I would like to embed them from scratch. I dont want the cosine of the words in order to get a phrase embedding, this is because the phrases may appear in a ...
Christina Valavani's user avatar
0 votes
1 answer
38 views

Word embeddings

I m looking into word embedding and I would like to ask if I could train words or sentences in two layers. And if I wanted that one layer is more important, how could I calculate it? For example ...
Christina Valavani's user avatar
0 votes
1 answer
30 views

BERT is a supervised learning or semi-supervised learning?

I use 'bert-base-cased' pre-trained model for encoding a dataset of text that was labeled to labels 0, 1. Then the encoded dataset is trained using BERT model imported from Transformer library. Does ...
Balive13's user avatar
0 votes
1 answer
167 views

Can bert uncased predict text classification on foreign data?

I am trying to do the fake news/real news classification and used a pre-trained bert uncased model as transfer learning and it gave a solid 81% accuracy. But the problem is while doing sanity checks, ...
Jasmin Wilson's user avatar
0 votes
0 answers
14 views

Use unclassified texts to improve BERT and RNN GRUN token classification model

I have a training (gold) labelled dataset than consists of 10000 sentences. The task is to create a model that classifies correctly unseen data with B-I-O tags. I have used a BERT and a GRU RNN model. ...
Spyros Triantsfyllou's user avatar
0 votes
1 answer
93 views

Building BERT tokenizer with custom data

I'm wondering if there is a way to train our own Bert tokenizer instead of using pre-trained tokenizer provided by huggingface?
Loius Leong's user avatar
0 votes
1 answer
38 views

what is the difference between NSP and text prediction

In BERT, NSP (Next Sentence Prediction) is for predicting next sentence based on context and Text prediction task is also for predicting next word or phrases. So, both are for predicting next sentence ...
tovijayak's user avatar
1 vote
0 answers
47 views

I can't get good performance from BERT

I trained NLP models. This is a subset (200 instances) of my data set of 10,000 instances:This the link of the dataset on pastebin I compare an LSTM model with a glove model and a BERT model. I ...
Seydou GORO's user avatar
0 votes
0 answers
21 views

Why type of help can we get on stack Exchange: Datascience?

I have a text classification dataset. The aim is to predict the category of an article based on its title. I have about 100 categories and 10 thousands instances. I've tried models like RNN, LSTM. I'...
Seydou GORO's user avatar
1 vote
0 answers
110 views

Otimization of similarity search for multiple embeddings by creating a weighted artificial embedding

I have embeddings of text created with a BERT model. A group of these embeddings should be used to find similar embeddings corresponding to this group. I know that you can use average or max (or ...
soph's user avatar
  • 113
0 votes
2 answers
61 views

detect/generate possible tokens for the dataset (name,type/category,signatures)

I have a dataset in the following format: name, type, signature Eg1 : A, 2, abc123 Eg2 : A, 2, ab3 Eg3 : A, 2, addc1 If we need to train the following dataset ...
jason's user avatar
  • 53
0 votes
0 answers
22 views

Huggingface not saving model checkpoint

I am trying to train T5 model. This is how my training arguments look like: ...
RajS's user avatar
  • 103
0 votes
1 answer
45 views

Bert model for document sentiment classification

I am trying to fine-tune a Bert model for sentiment analysis. Instead of one sentence, my inputs are documents (including several sentences) and I am not removing dots. I was wondering if is it okay ...
mansoor sh's user avatar
0 votes
0 answers
85 views

Clustering with BERT. Why are my clusters overlapped? How to improve BERT embeddings?

I am trying to create BERT embeddings of text data, then use dimensionality reduction and cluster. I tried with some big datasets like amazon reviews and 20newsgroups, but whenever I created ...
William Smith's user avatar
0 votes
0 answers
41 views

The embedding output of bert

I want to get the embedding matrix of the Bert model (the input before the first block layers) to feed it into another architecture. I really appreciate it if you help me with that. Thanks
mansoor sh's user avatar
1 vote
2 answers
734 views

Fine-tuned MLM based RoBERTa not improving performance

We have lots of domain-specific data (200M+ data points, each document having ~100 to ~500 words) and we wanted to have a domain-specific LM. We took some sample data points (2M+) & fine-tuned ...
Kalsi's user avatar
  • 11
1 vote
1 answer
50 views

Below text-classification model gives accuracy of 0.77 only on one dataset and 0.99 on spam-ham dataset? What should I do to increase with my dataset?

...
rutvi's user avatar
  • 19
0 votes
0 answers
16 views

Unstable training of BERT binary sequence classification. Higher loss but lower gradients

I'm training a BERT sequence classifier on a custom dataset. When the training starts, the loss is at around ~0.4 in a few steps. I print the absolute sum of gradients for each layer/item in the model ...
Maroof's user avatar
  • 1
0 votes
0 answers
18 views

Creating Word Embeddings using BERT for Machine-Generated Text Data

I have a dataset of machine-generated sequences that are not natural language, but the order of the words in the sequence is important. I want to create word embeddings using BERT to capture the ...
Bella_18's user avatar
  • 101
0 votes
1 answer
318 views

BERTopic: Is it okay to ignore the first two topics?

I used BERTopic to generate a topic model over a large dataset of texts. The result is very appealing and the modeled topics are mostly perfectly interpretable for a human, especially compared to ...
oberbus's user avatar
0 votes
1 answer
134 views

Doubt in ELMO, BERT, Word2Vec

I read an answer on Quora where a NLP Practioner stated that using ELMO and BERT embeddings as input to LSTM or some RNN will defeat the purpose of ELMo and BERT. I am not sure I agree with the above ...
NeverGiveUp's user avatar
0 votes
2 answers
65 views

Fine-tune GPT on sketch data (stroke-3)

These past days I have started a personal project where I would like to build a model that, given an uncompleted sketch, it can finish it. I was planning on using some pretrained models that are ...
ilved17's user avatar
  • 31
7 votes
1 answer
1k views

Do transformers (e.g. BERT) have an unlimited input size?

There are various sources on the internet that claim that BERT has a fixed input size of 512 tokens (e.g. this, this, this, this ...). This magical number also appears in the BERT paper (Devlin et al. ...
Mew's user avatar
  • 193
0 votes
0 answers
16 views

How to effectively use CharBERT for text similarity?

I'm looking into CharBERT for an university project, and I noticed that it was finetuned on many tasks like sentiment analysis, NER, and so on. I tried to use it to do text similarity by using only ...
Gab's user avatar
  • 1
0 votes
0 answers
12 views

How can we integrate zero shot classification with a supervised classifier?

We have two sets of labels that are known and unknown to the supervised classifier (SC). We infer for a test example using the SC and a zero shot classifier (ZC). Let's assume, our inference datapoint ...
user3190883's user avatar
1 vote
2 answers
162 views

Using BERT to extract a list of words and phrases from documents

I have a list of words and phrases (~3k items). What are my options to extract them from documents (~3M of job descriptions) with NLP? I do not have labeled data. For example my list of words and ...
E.K.'s user avatar
  • 405
1 vote
1 answer
112 views

Does high number of output labels affect the performance of BERT and how to handle the class imbalance issue while doing multi text classification?

I am using BERT to do multiclass text classification. The number of output classes I have to predict from is: 116 and there is high degree of class imbalance that I see. We have the following kind of ...
Swagat Mishra's user avatar
1 vote
1 answer
189 views

Is there any concern for a pretrained model to overfitting to a fine-tuning task that has overlapping pretraining and training data?

Let's say my language model is pretrained on a general text corpus, and I want to use it for some specific downstream task that has it's datasets also included in the general corpus, is there any ...
Brian's user avatar
  • 11
0 votes
0 answers
9 views

Which is the best choice for evaluating models on small and unbalanced textual datasets?

We are dealing with a small multilabel dataset (around 15k samples) of texts that is imbalanced. Some classes have more than 4k samples and others have around 700 samples. We are using a classifier ...
Zaratruta's user avatar
  • 139
1 vote
1 answer
52 views

Is it valid changing the classification treshold of neural networks for improving the classification performance?

I'm dealing with text classification using BERT pre-trained model with a multiclass imbalanced dataset. When we use a 0.5 default classification threshold we obtain a f1 measure of around 0.7. But we ...
Zaratruta's user avatar
  • 139
0 votes
1 answer
198 views

SBERT Embeddings from Conversations

I have a dataset consisting of text-based conversations between two humans. One conversation has on average 20 turns and can look as follows: ...
DictionaryProver's user avatar
1 vote
1 answer
376 views

How does BERT work for Aspect-Based sentiment analysis?

I have recently used a package to perform Aspect-Based Sentiment Analysis (ABSA) through a BERT model. Briefly, the model takes two inputs: words that constitute the aspects a sentence on which we ...
Alberto De Benedittis's user avatar
0 votes
0 answers
16 views

How do I predict the BERT embedding of a vector that is associated with the given X?

I have a list of sentences called X. Each sentence is associated with a sentence in a list Y. I'm trying to use BERT to create a model that, given a sentence in X, will predict which of the sentences ...
moonman239's user avatar
1 vote
1 answer
92 views

What to do if my dataset have only One instance for class in classification?

I am working on a benchmark dataset for text classification. The dataset has about 300 classes, and approximately 50 of these classes have a single instance. In a paper that used fine-tuning BERT, the ...
mandana hosseini's user avatar

1
2 3 4 5
8