ReGen: Zero-Shot Text Classification via Training Data Generation with Progressive Dense Retrieval
Paper • 2305.10703 • Published
How to use yyu/review_contrastive_pretrain with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("fill-mask", model="yyu/review_contrastive_pretrain") # Load model directly
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("yyu/review_contrastive_pretrain")
model = AutoModelForMaskedLM.from_pretrained("yyu/review_contrastive_pretrain")The BERT model pretrained on the review corpus (https://huggingface.co/datasets/yyu/review_corpus). Used in the paper ReGen: Zero-Shot Text Classification via Training Data Generation with Progressive Dense Retrieval.
See github: https://github.com/yueyu1030/ReGen and paper: https://arxiv.org/abs/2305.10703 for details.