From 9ad6194318888aebb19ca2cd7e78b4d0356a19f2 Mon Sep 17 00:00:00 2001 From: Julien Chaumond Date: Thu, 3 Dec 2020 16:56:55 +0100 Subject: [PATCH] Tweak wording + Add badge w/ number of models on the hub (#8914) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add badge w/ number of models on the hub * try to apease @sgugger 😇 * not sure what this `c` was about [ci skip] * Fix script and move stuff around * Fix doc styling error Co-authored-by: Sylvain Gugger --- README.md | 5 ++++- docs/source/index.rst | 10 ++++++++-- utils/check_copies.py | 2 +- utils/style_doc.py | 2 +- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b0c4170112..1a1b5b50ec 100644 --- a/README.md +++ b/README.md @@ -156,6 +156,10 @@ If you'd like to play with the examples, you must [install the library from sour ## Models architectures +**[All the model checkpoints](https://huggingface.co/models)** provided by 🤗 Transformers are seamlessly integrated from the huggingface.co [model hub](https://huggingface.co) where they are uploaded directly by [users](https://huggingface.co/users) and [organizations](https://huggingface.co/organizations). + +Current number of checkpoints: ![](https://img.shields.io/endpoint?url=https://huggingface.co/api/shields/models&color=brightgreen) + 🤗 Transformers currently provides the following architectures (see [here](https://huggingface.co/transformers/model_summary.html) for a high-level summary of each them): 1. **[ALBERT](https://huggingface.co/transformers/model_doc/albert.html)** (from Google Research and the Toyota Technological Institute at Chicago) released with the paper [ALBERT: A Lite BERT for Self-supervised Learning of Language Representations](https://arxiv.org/abs/1909.11942), by Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut. @@ -195,7 +199,6 @@ ultilingual BERT into [DistilmBERT](https://github.com/huggingface/transformers/ 1. **[XLM-ProphetNet](https://huggingface.co/transformers/model_doc/xlmprophetnet.html)** (from Microsoft Research) released with the paper [ProphetNet: Predicting Future N-gram for Sequence-to-Sequence Pre-training](https://arxiv.org/abs/2001.04063) by Yu Yan, Weizhen Qi, Yeyun Gong, Dayiheng Liu, Nan Duan, Jiusheng Chen, Ruofei Zhang and Ming Zhou. 1. **[XLM-RoBERTa](https://huggingface.co/transformers/model_doc/xlmroberta.html)** (from Facebook AI), released together with the paper [Unsupervised Cross-lingual Representation Learning at Scale](https://arxiv.org/abs/1911.02116) by Alexis Conneau*, Kartikay Khandelwal*, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzmán, Edouard Grave, Myle Ott, Luke Zettlemoyer and Veselin Stoyanov. 1. **[XLNet](https://huggingface.co/transformers/model_doc/xlnet.html)** (from Google/CMU) released with the paper [​XLNet: Generalized Autoregressive Pretraining for Language Understanding](https://arxiv.org/abs/1906.08237) by Zhilin Yang*, Zihang Dai*, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le. -1. **[Other community models](https://huggingface.co/models)**, contributed by the [community](https://huggingface.co/users). 1. Want to contribute a new model? We have added a **detailed guide and templates** to guide you in the process of adding a new model. You can find them in the [`templates`](./templates) folder of the repository. Be sure to check the [contributing guidelines](./CONTRIBUTING.md) and contact the maintainers or open an issue to collect feedbacks before starting your PR. To check if each model has an implementation in PyTorch/TensorFlow/Flax or has an associated tokenizer backed by the 🤗 Tokenizers library, refer to [this table](https://huggingface.co/transformers/index.html#bigtable) diff --git a/docs/source/index.rst b/docs/source/index.rst index 8efba56edb..6061a4da3a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -37,6 +37,14 @@ Choose the right framework for every part of a model's lifetime: Experimental support for Flax with a few models right now, expected to grow in the coming months. +`All the model checkpoints `__ are seamlessly integrated from the huggingface.co `model +hub `__ where they are uploaded directly by `users `__ and +`organizations `__. + +Current number of checkpoints: |checkpoints| + +.. |checkpoints| image:: https://img.shields.io/endpoint?url=https://huggingface.co/api/shields/models&color=brightgreen + Contents ----------------------------------------------------------------------------------------------------------------------- @@ -168,8 +176,6 @@ and conversion utilities for the following models: 34. :doc:`XLNet ` (from Google/CMU) released with the paper `​XLNet: Generalized Autoregressive Pretraining for Language Understanding `__ by Zhilin Yang*, Zihang Dai*, Yiming Yang, Jaime Carbonell, Ruslan Salakhutdinov, Quoc V. Le. -35. `Other community models `__, contributed by the `community - `__. .. _bigtable: diff --git a/utils/check_copies.py b/utils/check_copies.py index b52b658ec0..ae5d91c86c 100644 --- a/utils/check_copies.py +++ b/utils/check_copies.py @@ -16,7 +16,7 @@ import argparse import collections import glob -import importlib +import importlib.util import os import re import tempfile diff --git a/utils/style_doc.py b/utils/style_doc.py index 538bd60e5b..6469e602e8 100644 --- a/utils/style_doc.py +++ b/utils/style_doc.py @@ -50,7 +50,7 @@ _re_table = re.compile(r"(\+-+)+\+\s*$") # Matches a code block in rst `:: `. _re_code_block = re.compile(r"^\s*::\s*$") # Matches any block of the form `.. something::` or `.. something:: bla`. -_re_ignore = re.compile(r"^\s*\.\.\s+(\S+)\s*::\s*\S*\s*$") +_re_ignore = re.compile(r"^\s*\.\.\s+(.*?)\s*::\s*\S*\s*$") # Matches comment introduction in rst. _re_comment = re.compile(r"\s*\.\.\s*$") # Matches the special tag to ignore some paragraphs.