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", dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix: update frequencies when updating the rope base value
Browse files
rotary.py
CHANGED
|
@@ -495,6 +495,7 @@ class RotaryEmbedding(torch.nn.Module):
|
|
| 495 |
def base(self, new_base):
|
| 496 |
if new_base > 0:
|
| 497 |
self._base = float(new_base)
|
|
|
|
| 498 |
else:
|
| 499 |
raise ValueError("Rotary base value must be positive")
|
| 500 |
|
|
|
|
| 495 |
def base(self, new_base):
|
| 496 |
if new_base > 0:
|
| 497 |
self._base = float(new_base)
|
| 498 |
+
self.inv_freq = self._compute_inv_freq(device=self.inv_freq.device)
|
| 499 |
else:
|
| 500 |
raise ValueError("Rotary base value must be positive")
|
| 501 |
|