Instructions to use vinai/bertweet-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vinai/bertweet-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="vinai/bertweet-large")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("vinai/bertweet-large") model = AutoModelForMaskedLM.from_pretrained("vinai/bertweet-large", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -67,7 +67,8 @@ Before applying BPE to the pre-training corpus of English Tweets, we tokenized t
|
|
| 67 |
|
| 68 |
For `vinai/bertweet-large`, given the raw input Tweets, to obtain the same pre-processing output, users could employ our [TweetNormalizer](https://github.com/VinAIResearch/BERTweet/blob/master/TweetNormalizer.py) module.
|
| 69 |
|
| 70 |
-
- Installation: `pip3 install nltk emoji`
|
|
|
|
| 71 |
|
| 72 |
```python
|
| 73 |
import torch
|
|
|
|
| 67 |
|
| 68 |
For `vinai/bertweet-large`, given the raw input Tweets, to obtain the same pre-processing output, users could employ our [TweetNormalizer](https://github.com/VinAIResearch/BERTweet/blob/master/TweetNormalizer.py) module.
|
| 69 |
|
| 70 |
+
- Installation: `pip3 install nltk emoji==0.6.0`
|
| 71 |
+
- The `emoji` version must be either 0.5.4 or 0.6.0. Newer `emoji` versions have been updated to newer versions of the Emoji Charts, thus not consistent with the one used for pre-processing our pre-training Tweet corpus.
|
| 72 |
|
| 73 |
```python
|
| 74 |
import torch
|