FreddeFrallan
commited on
Commit
•
08c8057
1
Parent(s):
ccc9920
Update README.md
Browse files
README.md
CHANGED
@@ -3,12 +3,22 @@
|
|
3 |
<h1 align="center">M-BERT Distil 40</h1>
|
4 |
|
5 |
<p align="center">
|
6 |
-
<a href="https://huggingface.co/M-CLIP/M-BERT-Distil-40">
|
7 |
-
·
|
8 |
-
<a href="https://huggingface.co/distilbert-base-multilingual-cased">Huggingface Base Model</a>
|
9 |
</p>
|
10 |
</p>
|
11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
<!-- ABOUT THE PROJECT -->
|
14 |
## About
|
|
|
3 |
<h1 align="center">M-BERT Distil 40</h1>
|
4 |
|
5 |
<p align="center">
|
6 |
+
<a href="https://huggingface.co/M-CLIP/M-BERT-Distil-40">Github Model Card</a>
|
|
|
|
|
7 |
</p>
|
8 |
</p>
|
9 |
|
10 |
+
## Usage
|
11 |
+
To use this model along with the original CLIP vision encoder you need to download the code and additional linear weights from the [Multilingual-CLIP Github](https://github.com/FreddeFrallan/Multilingual-CLIP).
|
12 |
+
|
13 |
+
Once this is done, you can load and use the model with the following code
|
14 |
+
```python
|
15 |
+
from src import multilingual_clip
|
16 |
+
|
17 |
+
model = multilingual_clip.load_model('M-BERT-Distil-40')
|
18 |
+
embeddings = model(['Älgen är skogens konung!', 'Wie leben Eisbären in der Antarktis?', 'Вы знали, что все белые медведи левши?'])
|
19 |
+
print(embeddings.shape)
|
20 |
+
# Yields: torch.Size([3, 640])
|
21 |
+
```
|
22 |
|
23 |
<!-- ABOUT THE PROJECT -->
|
24 |
## About
|