Automatic Speech Recognition
Transformers
Safetensors
phi4mm
text-generation
nlp
code
audio
speech-summarization
speech-translation
visual-question-answering
phi-4-multimodal
phi
phi-4-mini
custom_code
Eval Results
Instructions to use microsoft/Phi-4-multimodal-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use microsoft/Phi-4-multimodal-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="microsoft/Phi-4-multimodal-instruct", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("microsoft/Phi-4-multimodal-instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix loading processor after save_pretrained with transformers 4.49+
#60
by katuni4ka - opened
- processing_phi4mm.py +1 -1
processing_phi4mm.py
CHANGED
|
@@ -506,7 +506,7 @@ class Phi4MMProcessor(ProcessorMixin):
|
|
| 506 |
image_processor_class = "AutoImageProcessor" # Phi4MMImageProcessor will be registered later
|
| 507 |
audio_processor_class = "AutoFeatureExtractor" # Phi4MMAudioFeatureExtractor will be registered later
|
| 508 |
|
| 509 |
-
def __init__(self, image_processor, audio_processor, tokenizer):
|
| 510 |
self.image_processor = image_processor
|
| 511 |
self.audio_processor = audio_processor
|
| 512 |
self.tokenizer = tokenizer
|
|
|
|
| 506 |
image_processor_class = "AutoImageProcessor" # Phi4MMImageProcessor will be registered later
|
| 507 |
audio_processor_class = "AutoFeatureExtractor" # Phi4MMAudioFeatureExtractor will be registered later
|
| 508 |
|
| 509 |
+
def __init__(self, image_processor, audio_processor, tokenizer, **kwargs):
|
| 510 |
self.image_processor = image_processor
|
| 511 |
self.audio_processor = audio_processor
|
| 512 |
self.tokenizer = tokenizer
|