Instructions to use jinaai/xlm-roberta-flash-implementation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jinaai/xlm-roberta-flash-implementation with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jinaai/xlm-roberta-flash-implementation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update configuration_xlm_roberta.py
Browse files
configuration_xlm_roberta.py
CHANGED
|
@@ -21,7 +21,7 @@ class XLMRobertaFlashConfig(PretrainedConfig):
|
|
| 21 |
position_embedding_type="absolute",
|
| 22 |
use_cache=True,
|
| 23 |
classifier_dropout=None,
|
| 24 |
-
use_flash_attn=True
|
| 25 |
**kwargs,
|
| 26 |
):
|
| 27 |
super().__init__(pad_token_id=pad_token_id, bos_token_id=bos_token_id, eos_token_id=eos_token_id, **kwargs)
|
|
|
|
| 21 |
position_embedding_type="absolute",
|
| 22 |
use_cache=True,
|
| 23 |
classifier_dropout=None,
|
| 24 |
+
use_flash_attn=True,
|
| 25 |
**kwargs,
|
| 26 |
):
|
| 27 |
super().__init__(pad_token_id=pad_token_id, bos_token_id=bos_token_id, eos_token_id=eos_token_id, **kwargs)
|