YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

import torch
from peft import PeftModel
from transformers import AutoProcessor, AutoModelForCausalLM

def create_model(model_name_or_path = 'microsoft/Phi-4-multimodal-instruct'):
    model = AutoModelForCausalLM.from_pretrained(
        model_name_or_path,
        device_map="auto",
        trust_remote_code=True,
        cache_dir = os.getenv('CACHE_DIR'),
        _attn_implementation='sdpa',
        torch_dtype = torch.bfloat16
    )
    return model

model_name_or_path = 'microsoft/Phi-4-multimodal-instruct'
model = create_model(model_name_or_path)

model.load_adapter("binhquoc/alm-add-phi4-non", adapter_name="speech")

model.set_adapter("speech")
processor = AutoProcessor.from_pretrained(
    model_name_or_path,
    trust_remote_code=True,
    cache_dir = os.getenv('CACHE_DIR'),
)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including binhquoc/alm-add-phi4-non