Run this model with HF Jobs

Run HuggingFaceM4/idefics2-8b-base 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 and TRL to fine-tune https://huggingface.co/HuggingFaceM4/idefics2-8b-base. 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/HuggingFaceM4/idefics2-8b-base 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.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/HuggingFaceM4/idefics2-8b-base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/HuggingFaceM4/idefics2-8b-base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Some issues regarding training

#9
by zwq2018 - opened

Hello, I conduct post-pre-training based on the based model (idefics2-8b-base), but I have some questions.

  1. When I used Llava1.0 image-text pair (595k pertaining data) and idefics2-8b-base for pre-training, I found that the initial loss was very high, approximately around 6 - 7. This seems abnormal? May I ask what the loss is approximately like when you complete the pertaining for 8b based model?

  2. I found that the ignore_index seems to be different in different versions of transformers. For example, when transformers=4.40, you set image_token_id(32001) as ignore_index, while in the version 4.42 you use -100. I use the following code to set my label:

 labels[labels == self.processor.tokenizer.pad_token_id] = -100   
 labels[labels == image_token_id] =  -100  
  1. When I set the ignore label, for fake_token_around_image (32000), should it be ignored or its loss be calculated. I mean, do I need the following code:
labels[labels == fake_image_token_id] = -100
  1. Loss values can depend on many factors, you should track the performance on different tasks instead to see if there is a bug?
  2. We ignore the loss calculation on both the pad tokens and the image tokens yes.
  3. We didn't mask the loss on these tokens but you can do it, yes

Sign up or log in to comment