Is run_clip.py an example of fine-tune or an example of training a vision-text model from scratch？
### System Info

- `transformers` version: 4.21.0
- Platform: Linux-3.10.0-957.el7.x86_64-x86_64-with-glibc2.17
- Python version: 3.9.12
- Huggingface_hub version: 0.8.1
- PyTorch version (GPU?): 1.12.0+cu102 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>


### Who can help?

Hi @patil-suraj I am a newer to CLIP, and while browsing [run_clip.py](https://github.com/huggingface/transformers/blob/main/examples/pytorch/contrastive-image-text/run_clip.py), I have a question, Is `run_clip.py` an example of fine-tune or an example of training a vision-text model from scratch?  Is it possible to fine-tune CLIP on my own dataset using `run_clip.py`？

### Information

- [ ] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

python run_clip.py

### Expected behavior

fine-tune
Hey @gongshaojie12, is the README available [here](https://github.com/huggingface/transformers/tree/main/examples/pytorch/contrastive-image-text) answering your questions?

In the [code sample](https://github.com/huggingface/transformers/tree/main/examples/pytorch/contrastive-image-text#train-the-model), you'll see it's using @ydshieh's "coco_dataset_script" as a dataset; feel free to replace the dataset here by a similar dataset of yours to use the script on your own data.<|||||>Hi!

The script is mostly for finetuning. But it's also possible to train from scratch - you just need to create a model, save it, and use it for the argument `model_name_or_path` - if this is what you like to do.<|||||>Hi, @LysandreJik @ydshieh  Thank you very much for your reply, maybe the first sentence in the README (`The following example showcases how to train a CLIP-like vision-text dual encoder model using a pre-trained vision and text encoder.`) bothered me. This sentence makes me think that `run_clip.py` is training a CLIP-like model from scratch, rather than fine-tuning the existing CLIP model. If there is something wrong with my understanding, please criticize and correct me, thank you!<|||||>The doc mentions `using a pre-trained vision and text encoder.`, so I think there is no ambiguity here. It doesn't necessary finetune the original clip checkpoints thought. You can use any text and image encoders.

Close this issue now. Don't hesitate if you have further question, @gongshaojie12 