Run this model with HF Jobs

Run openbmb/MiniCPM-V-2_6 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/openbmb/MiniCPM-V-2_6. Ask me which dataset to train on, then push the fine-tuned model to a new private 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/openbmb/MiniCPM-V-2_6 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/openbmb/MiniCPM-V-2_6. Ask me which benchmark to run, then save the scores and the per-example results to a new private 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/openbmb/MiniCPM-V-2_6. Push it to a new private model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

AttributeError: 'MiniCPMVTokenizerFast' object has no attribute 'image_processor'

#32
by shakaryan - opened

After using model for a few days, got this error and can not find any solution around the web. Does anybody solved this thing?

I am facing a similar issue in my spaces.

Since the repository is private, you'd better define processor and pass it to chat function by yourself. Otherwise, it will call
self.processor = AutoProcessor.from_pretrained(self.config._name_or_path, trust_remote_code=True)
And get nothing without valid token.

+1

initiating processor by yourself, with TOKEN - token to huggingfacehub:

processor = AutoProcessor.from_pretrained('openbmb/MiniCPM-V-2_6', trust_remote_code=True, token=TOKEN)

and passing it later in the chat:

res = model.chat(
    image=None,
    msgs=msgs,
    tokenizer=tokenizer,
    processor=processor,
)

did the job. :)

+1

initiating processor by yourself, with TOKEN - token to huggingfacehub:

processor = AutoProcessor.from_pretrained('openbmb/MiniCPM-V-2_6', trust_remote_code=True, token=TOKEN)

and passing it later in the chat:

res = model.chat(
    image=None,
    msgs=msgs,
    tokenizer=tokenizer,
    processor=processor,
)

did the job. :)

Thank you, for me worked logging in using hf cli login command.

This also worked, thanks.

shakaryan changed discussion status to closed

Sign up or log in to comment