BAAI / AltCLIP-m9

huggingface.co
Total runs: 21
24-hour runs: 0
7-day runs: 9
30-day runs: -56
Model's Last Updated: December 31 2022
text-to-image

Introduction of AltCLIP-m9

Model Details of AltCLIP-m9

AltCLIP-m9

It supports English(En), Chinese(Zh), Spanish(Es), French(Fr), Russian(Ru), Japanese(Ja), Korean(Ko), Arabic(Ar) and Italian(It) languages.

名称 Name 任务 Task 语言 Language(s) 模型 Model Github
AltCLIP-m9 Text-Image Multilingual CLIP FlagAI
简介 Brief Introduction

我们提出了一个简单高效的方法去训练更加优秀的九语CLIP模型。命名为AltCLIP-m9。AltCLIP训练数据来自 WuDao数据集 LIAON

AltCLIP-m9模型可以为本项目中的AltDiffusion-m9模型提供支持,关于AltDiffusion-m9模型的具体信息可查看 此教程

模型代码已经在 FlagAI 上开源,权重位于我们搭建的 modelhub 上。我们还提供了微调,推理,验证的脚本,欢迎试用。

We propose a simple and efficient method to train a better multilingua CLIP model. Named AltCLIP-m9. AltCLIP-m9 is trained with training data from WuDao dataset and Liaon .

The AltCLIP-m9 model can provide support for the AltDiffusion-m9 model in this project. Specific information on the AltDiffusion model can be found in this tutorial .

The model code has been open sourced on FlagAI and the weights are located on modelhub . We also provide scripts for fine-tuning, inference, and validation, so feel free to try them out.

引用

关于AltCLIP,我们已经推出了相关报告,有更多细节可以查阅,如对您的工作有帮助,欢迎引用。

If you find this work helpful, please consider to cite

@article{https://doi.org/10.48550/arxiv.2211.06679,
  doi = {10.48550/ARXIV.2211.06679},
  url = {https://arxiv.org/abs/2211.06679},
  author = {Chen, Zhongzhi and Liu, Guang and Zhang, Bo-Wen and Ye, Fulong and Yang, Qinghong and Wu, Ledell},
  keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences},
  title = {AltCLIP: Altering the Language Encoder in CLIP for Extended Language Capabilities},
  publisher = {arXiv},
  year = {2022},
  copyright = {arXiv.org perpetual, non-exclusive license}
}
训练 Training

训练共有两个阶段。 在平行知识蒸馏阶段,我们只是使用平行语料文本来进行蒸馏(平行语料相对于图文对更容易获取且数量更大)。在多语对比学习阶段,我们使用少量的中-英 图像-文本对(每种语言6百万)来训练我们的文本编码器以更好地适应图像编码器。

There are two phases of training. In the parallel knowledge distillation phase, we only use parallel corpus texts for distillation (parallel corpus is easier to obtain and larger in number compared to image text pairs). In the multilingual comparison learning phase, we use a small number of text-image pairs (about 6 million in each language) to train our text encoder to better fit the image encoder.

下游效果 Performance

可视化效果 Visualization effects

基于AltCLIP,我们还开发了AltDiffusion模型,可视化效果如下。

Based on AltCLIP, we have also developed the AltDiffusion model, visualized as follows.

模型推理 Inference

Please download the code from FlagAI AltCLIP

from PIL import Image
import requests

# transformers version >= 4.21.0
from modeling_altclip import AltCLIP
from processing_altclip import AltCLIPProcessor

# now our repo's in private, so we need `use_auth_token=True`
model = AltCLIP.from_pretrained("BAAI/AltCLIP-m9")
processor = AltCLIPProcessor.from_pretrained("BAAI/AltCLIP-m9")

url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)

inputs = processor(text=["a photo of a cat", "a photo of a dog"], images=image, return_tensors="pt", padding=True)

outputs = model(**inputs)
logits_per_image = outputs.logits_per_image # this is the image-text similarity score
probs = logits_per_image.softmax(dim=1) # we can take the softmax to get the label probabilities

Runs of BAAI AltCLIP-m9 on huggingface.co

21
Total runs
0
24-hour runs
1
3-day runs
9
7-day runs
-56
30-day runs

More Information About AltCLIP-m9 huggingface.co Model

AltCLIP-m9 huggingface.co

AltCLIP-m9 huggingface.co is an AI model on huggingface.co that provides AltCLIP-m9's model effect (), which can be used instantly with this BAAI AltCLIP-m9 model. huggingface.co supports a free trial of the AltCLIP-m9 model, and also provides paid use of the AltCLIP-m9. Support call AltCLIP-m9 model through api, including Node.js, Python, http.

AltCLIP-m9 huggingface.co Url

https://huggingface.co/BAAI/AltCLIP-m9

BAAI AltCLIP-m9 online free

AltCLIP-m9 huggingface.co is an online trial and call api platform, which integrates AltCLIP-m9's modeling effects, including api services, and provides a free online trial of AltCLIP-m9, you can try AltCLIP-m9 online for free by clicking the link below.

BAAI AltCLIP-m9 online free url in huggingface.co:

https://huggingface.co/BAAI/AltCLIP-m9

AltCLIP-m9 install

AltCLIP-m9 is an open source model from GitHub that offers a free installation service, and any user can find AltCLIP-m9 on GitHub to install. At the same time, huggingface.co provides the effect of AltCLIP-m9 install, users can directly use AltCLIP-m9 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

AltCLIP-m9 install url in huggingface.co:

https://huggingface.co/BAAI/AltCLIP-m9

Url of AltCLIP-m9

AltCLIP-m9 huggingface.co Url

Provider of AltCLIP-m9 huggingface.co

BAAI
ORGANIZATIONS

Other API from BAAI

huggingface.co

Total runs: 6.0M
Run Growth: 998.5K
Growth Rate: 16.62%
Updated: February 22 2024
huggingface.co

Total runs: 2.1M
Run Growth: -2.1M
Growth Rate: -98.93%
Updated: February 21 2024
huggingface.co

Total runs: 2.1M
Run Growth: -66.5K
Growth Rate: -3.12%
Updated: July 03 2024
huggingface.co

Total runs: 1.6M
Run Growth: -378.8K
Growth Rate: -23.19%
Updated: February 21 2024
huggingface.co

Total runs: 795.3K
Run Growth: 131.7K
Growth Rate: 16.58%
Updated: December 13 2023
huggingface.co

Total runs: 458.5K
Run Growth: 35.3K
Growth Rate: 7.67%
Updated: October 12 2023
huggingface.co

Total runs: 189.9K
Run Growth: 16.3K
Growth Rate: 8.56%
Updated: November 14 2023
huggingface.co

Total runs: 138.9K
Run Growth: 60.3K
Growth Rate: 43.74%
Updated: October 12 2023
huggingface.co

Total runs: 66.6K
Run Growth: -12.5K
Growth Rate: -20.56%
Updated: April 17 2024
huggingface.co

Total runs: 33.4K
Run Growth: 32.0K
Growth Rate: 95.61%
Updated: October 12 2023
huggingface.co

Total runs: 27.9K
Run Growth: 10.9K
Growth Rate: 38.64%
Updated: October 12 2023
huggingface.co

Total runs: 24.1K
Run Growth: -1.6K
Growth Rate: -6.49%
Updated: October 12 2023
huggingface.co

Total runs: 20.7K
Run Growth: -8.1K
Growth Rate: -39.09%
Updated: January 15 2025
huggingface.co

Total runs: 5.8K
Run Growth: 836
Growth Rate: 14.55%
Updated: December 26 2022
huggingface.co

Total runs: 5.1K
Run Growth: 1.2K
Growth Rate: 23.01%
Updated: September 21 2023
huggingface.co

Total runs: 5.0K
Run Growth: 491
Growth Rate: 9.79%
Updated: August 15 2024
huggingface.co

Total runs: 4.5K
Run Growth: -7.4K
Growth Rate: -165.02%
Updated: February 22 2024
huggingface.co

Total runs: 2.6K
Run Growth: 890
Growth Rate: 34.35%
Updated: August 15 2024
huggingface.co

Total runs: 2.6K
Run Growth: -287
Growth Rate: -10.48%
Updated: October 12 2023
huggingface.co

Total runs: 2.4K
Run Growth: 648
Growth Rate: 27.14%
Updated: February 07 2024
huggingface.co

Total runs: 2.3K
Run Growth: -11.8K
Growth Rate: -272.27%
Updated: October 23 2024
huggingface.co

Total runs: 1.9K
Run Growth: 744
Growth Rate: 35.94%
Updated: September 18 2023
huggingface.co

Total runs: 1.8K
Run Growth: -245
Growth Rate: -12.75%
Updated: November 28 2024
huggingface.co

Total runs: 1.4K
Run Growth: -3.5K
Growth Rate: -136.57%
Updated: October 23 2024
huggingface.co

Total runs: 1.3K
Run Growth: -3.0K
Growth Rate: -174.67%
Updated: October 24 2024
huggingface.co

Total runs: 822
Run Growth: 447
Growth Rate: 57.98%
Updated: April 02 2024
huggingface.co

Total runs: 755
Run Growth: -9.0K
Growth Rate: -1200.13%
Updated: March 07 2024
huggingface.co

Total runs: 716
Run Growth: 49
Growth Rate: 6.68%
Updated: June 07 2024
huggingface.co

Total runs: 647
Run Growth: 116
Growth Rate: 18.56%
Updated: October 27 2023
huggingface.co

Total runs: 613
Run Growth: 0
Growth Rate: 0.00%
Updated: January 15 2025
huggingface.co

Total runs: 441
Run Growth: 0
Growth Rate: 0.00%
Updated: January 14 2025
huggingface.co

Total runs: 301
Run Growth: 294
Growth Rate: 97.67%
Updated: April 18 2023
huggingface.co

Total runs: 155
Run Growth: -215
Growth Rate: -141.45%
Updated: August 15 2024
huggingface.co

Total runs: 114
Run Growth: 0
Growth Rate: 0.00%
Updated: January 20 2025
huggingface.co

Total runs: 102
Run Growth: -254
Growth Rate: -430.51%
Updated: June 24 2024
huggingface.co

Total runs: 94
Run Growth: -4
Growth Rate: -4.17%
Updated: December 21 2023
huggingface.co

Total runs: 88
Run Growth: 56
Growth Rate: 57.14%
Updated: August 23 2023
huggingface.co

Total runs: 83
Run Growth: 38
Growth Rate: 47.50%
Updated: August 15 2024
huggingface.co

Total runs: 62
Run Growth: -205
Growth Rate: -330.65%
Updated: June 21 2024
huggingface.co

Total runs: 58
Run Growth: -155
Growth Rate: -336.96%
Updated: April 19 2024
huggingface.co

Total runs: 54
Run Growth: 13
Growth Rate: 22.03%
Updated: August 23 2023
huggingface.co

Total runs: 46
Run Growth: -10
Growth Rate: -21.74%
Updated: October 27 2023
huggingface.co

Total runs: 44
Run Growth: -59
Growth Rate: -128.26%
Updated: December 21 2023
huggingface.co

Total runs: 39
Run Growth: -12
Growth Rate: -30.77%
Updated: August 15 2024
huggingface.co

Total runs: 35
Run Growth: -271
Growth Rate: -774.29%
Updated: June 24 2024
huggingface.co

Total runs: 34
Run Growth: 6
Growth Rate: 16.22%
Updated: August 28 2024
huggingface.co

Total runs: 32
Run Growth: -10.2K
Growth Rate: -28372.22%
Updated: February 07 2024
huggingface.co

Total runs: 29
Run Growth: 0
Growth Rate: 0.00%
Updated: January 01 2025
huggingface.co

Total runs: 26
Run Growth: 12
Growth Rate: 46.15%
Updated: July 24 2023
huggingface.co

Total runs: 17
Run Growth: -109
Growth Rate: -641.18%
Updated: May 13 2024
huggingface.co

Total runs: 16
Run Growth: -24
Growth Rate: -150.00%
Updated: July 02 2024