Downloads · 30 days
41
2% of all-time downloads
M-CLIP/Swedish-2M
Swedish-2M 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"Swe-CLIP 2M</h1
Downloads · 30 days
41
2% of all-time downloads
All-time downloads
2.2K
Public
Repo size
1.5 GB
Likes
1
Public
Click a slice to open those files.
.bin499 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('Swe-CLIP-500k')
embeddings = model(['Älgen är skogens konung!', 'Alla isbjörnar är vänsterhänta'])
print(embeddings.shape)
# Yields: torch.Size([2, 640])
<!-- ABOUT THE PROJECT -->
A KB/Bert-Swedish-Cased tuned to match the embedding space of the CLIP text encoder which accompanies the Res50x4 vision encoder. <br>
Training data pairs was generated by sampling 2 Million sentences from the combined descriptions of GCC + MSCOCO + VizWiz, and translating them into Swedish. All translation was done using the Huggingface Opus Model, which seemingly procudes higher quality translations than relying on the AWS translate service.