visheratin / nllb-clip-base

huggingface.co
Total runs: 57
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: October 11 2023

Introduction of nllb-clip-base

Model Details of nllb-clip-base

Model Summary

NLLB-CLIP is a model that combines a text encoder from the NLLB model and an image encoder from the standard CLIP . This allows us to extend the model capabilities to 201 languages of the Flores-200. NLLB-CLIP sets state-of-the-art on the Crossmodal-3600 dataset by performing very well on low-resource languages. You can find more details about the model in the paper .

How to use

The model repo contains the model code files that allow the use of NLLB-CLIP as any other model from the hub. The interface is also compatible with CLIP models. Example code is below:

from transformers import AutoTokenizer, CLIPProcessor
import requests
from PIL import Image

from modeling_nllb_clip import NLLBCLIPModel # local file from the repo

processor = CLIPProcessor.from_pretrained("openai/clip-vit-base-patch32")
processor = processor.image_processor
tokenizer = AutoTokenizer.from_pretrained(
    "facebook/nllb-200-distilled-600M"
)
image_path = "https://huggingface.co/spaces/jjourney1125/swin2sr/resolve/main/samples/butterfly.jpg"
image = Image.open(requests.get(image_path, stream=True).raw)
image_inputs = processor(images=image, return_tensors="pt")
text_inputs = tokenizer(
    ["cat", "dog", "butterfly"],
    padding="longest",
    return_tensors="pt",
)

hf_model = NLLBCLIPModel.from_pretrained("visheratin/nllb-clip-base")

outputs = hf_model(input_ids = text_inputs.input_ids, attention_mask = text_inputs.attention_mask, pixel_values=image_inputs.pixel_values)
Acknowledgements

I thank Lambda Cloud for providing compute resources to train the model.

Runs of visheratin nllb-clip-base on huggingface.co

57
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About nllb-clip-base huggingface.co Model

More nllb-clip-base license Visit here:

https://choosealicense.com/licenses/cc-by-nc-4.0

nllb-clip-base huggingface.co

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

visheratin nllb-clip-base online free

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

visheratin nllb-clip-base online free url in huggingface.co:

https://huggingface.co/visheratin/nllb-clip-base

nllb-clip-base install

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

nllb-clip-base install url in huggingface.co:

https://huggingface.co/visheratin/nllb-clip-base

Url of nllb-clip-base

nllb-clip-base huggingface.co Url

Provider of nllb-clip-base huggingface.co

visheratin
ORGANIZATIONS

Other API from visheratin

huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:April 19 2023