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
Instructions to use kumapo/Phi-4-multimodal-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kumapo/Phi-4-multimodal-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="kumapo/Phi-4-multimodal-instruct", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("kumapo/Phi-4-multimodal-instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
fix
Browse files- modeling_phi4mm.py +1 -0
modeling_phi4mm.py
CHANGED
|
@@ -2100,6 +2100,7 @@ class Phi4MMForCausalLM(Phi4MMPreTrainedModel, GenerationMixin):
|
|
| 2100 |
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
| 2101 |
)
|
| 2102 |
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
|
|
|
| 2103 |
|
| 2104 |
if isinstance(input_mode, torch.Tensor):
|
| 2105 |
# len(input_mode) == num_beams in beam search, and all elements of input_mode should have the same value
|
|
|
|
| 2100 |
output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
|
| 2101 |
)
|
| 2102 |
return_dict = return_dict if return_dict is not None else self.config.use_return_dict
|
| 2103 |
+
num_logits_to_keep = num_logits_to_keep if num_logits_to_keep is not None else 0
|
| 2104 |
|
| 2105 |
if isinstance(input_mode, torch.Tensor):
|
| 2106 |
# len(input_mode) == num_beams in beam search, and all elements of input_mode should have the same value
|