Back to all models
fill-mask mask_token: [MASK]
Query this model
🔥 This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint
								$ curl -X POST \
https://api-inference.huggingface.co/models/activebus/BERT-XD_Review
Share Copied link to clipboard

Monthly model downloads

activebus/BERT-XD_Review activebus/BERT-XD_Review
64 downloads
last 30 days

pytorch

tf

Contributed by

activebus Hu Xu
6 models

How to use this model directly from the 🤗/transformers library:

			
Copy to clipboard
from transformers import AutoTokenizer, AutoModelWithLMHead tokenizer = AutoTokenizer.from_pretrained("activebus/BERT-XD_Review") model = AutoModelWithLMHead.from_pretrained("activebus/BERT-XD_Review")

ReviewBERT

BERT (post-)trained from review corpus to understand sentiment, options and various e-commence aspects.
Please visit https://github.com/howardhsu/BERT-for-RRC-ABSA for details.

BERT-XD_Review is a cross-domain (beyond just laptop and restaurant) language model, where each example is from a single product / restaurant with the same rating, post-trained (fine-tuned) on a combination of 5-core Amazon reviews and all Yelp data, expected to be 22 G in total. It is trained for 4 epochs on bert-base-uncased. The preprocessing code here.

Model Description

The original model is from BERT-base-uncased. Models are post-trained from Amazon Dataset and Yelp Dataset.

Instructions

Loading the post-trained weights are as simple as, e.g.,

import torch
from transformers import AutoModel, AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("activebus/BERT-XD_Review")
model = AutoModel.from_pretrained("activebus/BERT-XD_Review")

Evaluation Results

Check our NAACL paper BERT_Review is expected to have similar performance on domain-specific tasks (such as aspect extraction) as BERT-DK, but much better on general tasks such as aspect sentiment classification (different domains mostly share similar sentiment words).

Citation

If you find this work useful, please cite as following.

@inproceedings{xu_bert2019,
    title = "BERT Post-Training for Review Reading Comprehension and Aspect-based Sentiment Analysis",
    author = "Xu, Hu and Liu, Bing and Shu, Lei and Yu, Philip S.",
    booktitle = "Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics",
    month = "jun",
    year = "2019",
}