Run this model with HF Jobs

Run M-CLIP/M-BERT-Distil-40 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/M-CLIP/M-BERT-Distil-40. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/M-CLIP/M-BERT-Distil-40 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

M-BERT Distil 40

Github Model Card

Usage

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-Distil-40')
embeddings = model(['Älgen är skogens konung!', 'Wie leben Eisbären in der Antarktis?', 'Вы знали, что все белые медведи левши?'])
print(embeddings.shape)
# Yields: torch.Size([3, 640])

About

A distilbert-base-multilingual tuned to match the embedding space for 40 languages, to the embedding space of the CLIP text encoder which accompanies the Res50x4 vision encoder.
A full list of the 100 languages used during pre-training can be found here, and a list of the 40 languages 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 40 languages.

Evaluation

These results can be viewed at Github.
A non-rigorous qualitative evaluation shows that for the languages French, German, Spanish, Russian, Swedish and Greek it seemingly yields respectable results for most instances. The exception being that Greeks are apparently unable to recognize happy persons.
When testing on Kannada, a language which was included during pre-training but not fine-tuning, it performed close to random

Downloads last month
42
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Space using M-CLIP/M-BERT-Distil-40 1