MiniCPM-o 4.5 video-only LoRA on Hugging Face Jobs: compatibility notes and workarounds
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 26.4k
- Forks
- 2.1k
- Avg merge
- 14h 39m
- Merged PRs (30d)
- 3
Description
Hi, I ran a small video-only LoRA pilot with openbmb/MiniCPM-o-4_5 using LLaMA-Factory and Hugging Face Jobs.
This is not yet a minimal bug reproduction. I wanted to share the compatibility issues and workarounds I encountered, since they may help other users trying to fine-tune MiniCPM-o 4.5 for video-text SFT without audio.
Setup
- Model:
openbmb/MiniCPM-o-4_5 - Model revision:
4382fcae8a551b54d18f18462db974ff312aa7f3 - Training framework: LLaMA-Factory
- LLaMA-Factory revision:
0b7aaf8f6a624bd89a01a155d4265ec861cbdf38 - Cloud runtime: Hugging Face Jobs, A100
- Task: video-only soccer commentary generation
- Data shape: 30-second video clips, 448p, 4 fps, no audio
- LoRA target modules:
q_proj,v_proj - Vision tower frozen: yes
- Multimodal projector frozen: yes
Issues Encountered
- Video-only training still triggered audio-related initialization paths.
- LLaMA-Factory forward arguments conflicted with MiniCPM-o remote code in this setup.
- An in-place visual embedding scatter operation caused autograd compatibility issues during training.
- For inference,
transformers==4.56.2exposed aDynamicCache.seen_tokenscompatibility issue, while pinning inference totransformers==4.51.0worked in my run. - Continuing LoRA training from a previous adapter required explicitly downloading the PEFT adapter revision locally; otherwise the adapter revision and base model revision could be mixed, causing
adapter_config.jsonlookup failure.
Workarounds Used
For training, I applied a local compatibility patch that:
- gated audio embedding calls when running video-only training;
- removed duplicate forward kwargs before calling the underlying LLM;
- replaced in-place visual embedding
scatter_with an autograd-safe non-in-place path; - patched LLaMA-Factory's MiniCPM-o config path to use
init_audio=Falsefor video-only training.
For inference, I used:
transformers==4.51.0init_vision=Trueinit_audio=Falseinit_tts=Falsegenerate_audio=Falseenable_thinking=False
Result
After these workarounds, the pipeline completed successfully. I trained a small LoRA adapter on 300 video-text samples and evaluated it on 100 frozen test clips.
This issue is mainly to ask:
- Is video-only LoRA training for MiniCPM-o 4.5 officially supported through LLaMA-Factory?
- Is
init_audio=Falsethe recommended path for video-only SFT? - Would you prefer a minimal reproduction issue, a documentation note, or a PR for this compatibility path?
I am happy to prepare a minimal reproduction or documentation PR if this direction is useful.
Thanks for the great model and open-source work.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the video-only LoRA setup with the listed MiniCPM-o, LLaMA-Factory, and Transformers revisions, focusing on the init_audio flags, forward arguments, visual embedding operation, and adapter loading. Done means determining whether video-only SFT is supported, confirming the required compatibility settings, and documenting an accepted workaround or minimal reproduction.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100