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:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jinaai/xlm-roberta-flash-implementation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
c232c27
1
Parent(s): 11ba200
chore: source
Browse filesSigned-off-by: jupyterjazz <saba.sturua@jina.ai>
mha.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
# Copyright (c) 2023, Tri Dao.
|
|
|
|
| 2 |
|
| 3 |
import math
|
| 4 |
from functools import partial
|
|
|
|
| 1 |
# Copyright (c) 2023, Tri Dao.
|
| 2 |
+
# Adapted from https://github.com/Dao-AILab/flash-attention/pull/556
|
| 3 |
|
| 4 |
import math
|
| 5 |
from functools import partial
|
rotary.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
# Copyright (c) 2023, Tri Dao.
|
| 2 |
|
| 3 |
import math
|
|
|
|
| 1 |
+
# Adapted from https://github.com/Dao-AILab/flash-attention/pull/556
|
| 2 |
# Copyright (c) 2023, Tri Dao.
|
| 3 |
|
| 4 |
import math
|