Instructions to use hf-internal-testing/tiny-albert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hf-internal-testing/tiny-albert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="hf-internal-testing/tiny-albert")# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("hf-internal-testing/tiny-albert") model = AutoModelForMaskedLM.from_pretrained("hf-internal-testing/tiny-albert") - Notebooks
- Google Colab
- Kaggle
doc
Browse files- make-tiny-albert.py +6 -6
make-tiny-albert.py
CHANGED
|
@@ -29,15 +29,15 @@
|
|
| 29 |
# 3. clone
|
| 30 |
# git clone https://huggingface.co/hf-internal-testing/tiny-albert
|
| 31 |
# cd tiny-albert
|
| 32 |
-
|
| 33 |
# 4. start with some pre-existing script from one of the https://huggingface.co/hf-internal-testing/ tiny model repos, e.g.
|
| 34 |
-
# wget https://huggingface.co/hf-internal-testing/tiny-
|
| 35 |
-
# chmod a+x ./make-tiny-
|
| 36 |
-
# mv ./make-tiny-
|
| 37 |
#
|
| 38 |
# 5. automatically rename things from the old names to new ones
|
| 39 |
-
# perl -pi -e 's|
|
| 40 |
-
# perl -pi -e 's|
|
| 41 |
#
|
| 42 |
# 6. edit and re-run this script while fixing it up
|
| 43 |
# ./make-tiny-albert.py
|
|
|
|
| 29 |
# 3. clone
|
| 30 |
# git clone https://huggingface.co/hf-internal-testing/tiny-albert
|
| 31 |
# cd tiny-albert
|
| 32 |
+
#
|
| 33 |
# 4. start with some pre-existing script from one of the https://huggingface.co/hf-internal-testing/ tiny model repos, e.g.
|
| 34 |
+
# wget https://huggingface.co/hf-internal-testing/tiny-xlm-roberta
|
| 35 |
+
# chmod a+x ./make-tiny-xlm-roberta.py
|
| 36 |
+
# mv ./make-tiny-xlm-roberta.py ./make-tiny-albert.py
|
| 37 |
#
|
| 38 |
# 5. automatically rename things from the old names to new ones
|
| 39 |
+
# perl -pi -e 's|XLMRoberta|Albert|g' make-*
|
| 40 |
+
# perl -pi -e 's|xlm-roberta|albert|g' make-*
|
| 41 |
#
|
| 42 |
# 6. edit and re-run this script while fixing it up
|
| 43 |
# ./make-tiny-albert.py
|