YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
Merging pipeline
1. Download LoRA model
With my current packages version I need to download locally the model otherwise I get a "ValueError: Can't find 'adapter_config.json' at 'vidore/colqwen2.5-v0.2'"
hf download vidore/colqwen2.5-v0.2 --local-dir=colqwen2.5-v0.2
2. Code used to merge
import torch
from peft import PeftModel
from colpali_engine.models import (
ColQwen2_5,
ColQwen2_5_Processor,
)
base_id = "vidore/colqwen2.5-base"
base_model = ColQwen2_5.from_pretrained(
base_id,
dtype=torch.bfloat16,
trust_remote_code=True,
)
lora_id = "./colqwen2.5-v0.2"
merged_model = PeftModel.from_pretrained(base_model, lora_id)
merged_model = merged_model.merge_and_unload(progressbar=True)
out_dir = "colqwen2.5-v0.2-merged"
merged_model.save_pretrained(out_dir, safe_serialization=True)
# Processor files of lora_id and base_id are identical exept for size value in video_preprocessor_config.json
processor = ColQwen2_5_Processor.from_pretrained(lora_id)
processor.save_pretrained(out_dir)
3. Upload
hf upload simon-artzet/colqwen2.5-v0.2-merged colqwen2.5-v0.2-merged
- Downloads last month
- 8
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support