Instructions to use microsoft/dit-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/dit-base with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoImageProcessor, BeitForMaskedImageModeling processor = AutoImageProcessor.from_pretrained("microsoft/dit-base") model = BeitForMaskedImageModeling.from_pretrained("microsoft/dit-base", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Add upstream DiT MIT license information
#5
by jakewa - opened
LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The MIT License (MIT)
|
| 2 |
+
|
| 3 |
+
Copyright (c) Microsoft Corporation
|
| 4 |
+
|
| 5 |
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
| 6 |
+
of this software and associated documentation files (the "Software"), to deal
|
| 7 |
+
in the Software without restriction, including without limitation the rights
|
| 8 |
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
| 9 |
+
copies of the Software, and to permit persons to whom the Software is
|
| 10 |
+
furnished to do so, subject to the following conditions:
|
| 11 |
+
|
| 12 |
+
The above copyright notice and this permission notice shall be included in all
|
| 13 |
+
copies or substantial portions of the Software.
|
| 14 |
+
|
| 15 |
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
| 16 |
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 17 |
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
| 18 |
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 19 |
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
| 20 |
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
| 21 |
+
SOFTWARE.
|
README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
tags:
|
| 3 |
- dit
|
| 4 |
inference: false
|
|
@@ -10,6 +11,10 @@ Document Image Transformer (DiT) model pre-trained on IIT-CDIP (Lewis et al., 20
|
|
| 10 |
|
| 11 |
Disclaimer: The team releasing DiT did not write a model card for this model so this model card has been written by the Hugging Face team.
|
| 12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
## Model description
|
| 14 |
|
| 15 |
The Document Image Transformer (DiT) is a transformer encoder model (BERT-like) pre-trained on a large collection of images in a self-supervised fashion. The pre-training objective for the model is to predict visual tokens from the encoder of a discrete VAE (dVAE), based on masked patches.
|
|
@@ -54,4 +59,4 @@ loss, logits = outputs.loss, outputs.logits
|
|
| 54 |
journal={Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval},
|
| 55 |
year={2006}
|
| 56 |
}
|
| 57 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
+
license: mit
|
| 3 |
tags:
|
| 4 |
- dit
|
| 5 |
inference: false
|
|
|
|
| 11 |
|
| 12 |
Disclaimer: The team releasing DiT did not write a model card for this model so this model card has been written by the Hugging Face team.
|
| 13 |
|
| 14 |
+
## License
|
| 15 |
+
|
| 16 |
+
DiT is released under the [MIT License](LICENSE), as provided in the [upstream UniLM repository](https://github.com/microsoft/unilm/blob/31c5b904ca1bf2afb4c234a6675c683a4e5fc7cd/LICENSE). Copyright (c) Microsoft Corporation.
|
| 17 |
+
|
| 18 |
## Model description
|
| 19 |
|
| 20 |
The Document Image Transformer (DiT) is a transformer encoder model (BERT-like) pre-trained on a large collection of images in a self-supervised fashion. The pre-training objective for the model is to predict visual tokens from the encoder of a discrete VAE (dVAE), based on masked patches.
|
|
|
|
| 59 |
journal={Proceedings of the 29th annual international ACM SIGIR conference on Research and development in information retrieval},
|
| 60 |
year={2006}
|
| 61 |
}
|
| 62 |
+
```
|