Transformers
Italian
matformer
bert
encoder
italian
masked-language-modeling
long-context
alibi
custom_code
Instructions to use AlBERTurin/AlBERTmini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AlBERTurin/AlBERTmini with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlBERTurin/AlBERTmini", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_matformer.py
Browse files- modeling_matformer.py +6 -4
modeling_matformer.py
CHANGED
|
@@ -26,7 +26,7 @@ except ImportError as e:
|
|
| 26 |
try:
|
| 27 |
subprocess.check_call([
|
| 28 |
sys.executable, "-m", "pip", "install",
|
| 29 |
-
"git+https://github.com/mrinaldi97/matformer.git@
|
| 30 |
])
|
| 31 |
|
| 32 |
from matformer.huggingface_integration import (
|
|
@@ -41,7 +41,9 @@ except ImportError as e:
|
|
| 41 |
|
| 42 |
except Exception as install_error:
|
| 43 |
raise ImportError(
|
| 44 |
-
"Failed to install Matformer
|
| 45 |
-
"
|
| 46 |
-
"
|
|
|
|
|
|
|
| 47 |
) from install_error
|
|
|
|
| 26 |
try:
|
| 27 |
subprocess.check_call([
|
| 28 |
sys.executable, "-m", "pip", "install",
|
| 29 |
+
"git+https://github.com/mrinaldi97/matformer.git@alberturin-v1",
|
| 30 |
])
|
| 31 |
|
| 32 |
from matformer.huggingface_integration import (
|
|
|
|
| 41 |
|
| 42 |
except Exception as install_error:
|
| 43 |
raise ImportError(
|
| 44 |
+
"Failed to install Matformer automatically.\n"
|
| 45 |
+
"Install the AlBERTurin-compatible version manually with:\n\n"
|
| 46 |
+
" pip install "
|
| 47 |
+
"git+https://github.com/mrinaldi97/matformer.git@alberturin-v1\n\n"
|
| 48 |
+
"Alternatively, set the MATFORMER_ROOT environment variable."
|
| 49 |
) from install_error
|