Downloads · 30 days
7
19% of all-time downloads
AbstractQbit/electra_large_imdb_regression_htsplice
electra_large_imdb_regression_htsplice is a text classification model from AbstractQbit. Use it when you need a label for a piece of text. It is set up for transformers.
google/electra-large-discriminator finetuned for regression on imdb dataset ratings for 3 epoches.
Downloads · 30 days
7
19% of all-time downloads
All-time downloads
36
Public
Repo size
5.4 GB
Likes
0
Public
Click a slice to open those files.
.pt2.7 GB · 67%
From the Hugging Face model README
google/electra-large-discriminator finetuned for regression on imdb dataset ratings for 3 epoches.
Large examples tokenized with head and tail parts of a review, as described in How to Fine-Tune BERT for Text Classification?
def preprocess_function(example):
tokens = tokenizer(example["text"], truncation=False)
if len(tokens['input_ids']) > 512:
tokens['input_ids'] = tokens['input_ids'][:129] + \
[102] + tokens['input_ids'][-382:]
tokens['token_type_ids'] = [0]*512
tokens['attention_mask'] = [1]*512
return tokens