Downloads · 30 days
27
0% of all-time downloads
M-CLIP/M-BERT-Base-69
M-BERT-Base-69 is a feature extraction model from M-CLIP. Use it when you need embeddings to search or compare text. It is set up for transformers.
<br / <p align="center" <h1 align="center"M-BERT Base 69</h1
Downloads · 30 days
27
0% of all-time downloads
All-time downloads
291K
Public
Repo size
2.1 GB
Likes
0
Public
Click a slice to open those files.
.bin711 MB · 50%
From the Hugging Face model README
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.
Once this is done, you can load and use the model with the following code
from src import multilingual_clip
model = multilingual_clip.load_model('M-BERT-Base-40')
embeddings = model(['Älgen är skogens konung!', 'Wie leben Eisbären in der Antarktis?', 'Вы знали, что все белые медведи левши?'])
print(embeddings.shape)
# Yields: torch.Size([3, 640])
<!-- ABOUT THE PROJECT -->
A BERT-base-multilingual tuned to match the embedding space for 69 languages, to the embedding space of the CLIP text encoder which accompanies the Res50x4 vision encoder. <br> A full list of the 100 languages used during pre-training can be found here, and a list of the 4069languages used during fine-tuning can be found in SupportedLanguages.md.
Training data pairs was generated by sampling 40k sentences for each language from the combined descriptions of GCC + MSCOCO + VizWiz, and translating them into the corresponding language. All translation was done using the AWS translate service, the quality of these translations have currently not been analyzed, but one can assume the quality varies between the 69 languages.