alt.freeweights.phi / paza-Phi-4-multimodal-instruct
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.phiSubject:

paza-Phi-4-multimodal-instruct

Date: 2026-11-15Commit: 1e78f4fSigned: 2DC28CC7B26A283B ✓

Automatic speech recognition model with 5.6B parameters. Safetensors weights, 22.3 GB in all. Published by microsoft under MIT.

5.6B params22.3GBpaza-Phi-4-multimodal-instructsafetensorspermissive
FactsParams5.6BSize22.3 GBFormatssafetensorsTaskautomatic speech recognitionLicenseMITFrom sourcepermissive
$ fw get microsoft/paza-Phi-4-multimodal-instruct
# manifest sha256 093411f524b3… · 22.3 GB · 27 files
$ fw verify ./paza-Phi-4-multimodal-instruct microsoft/paza-Phi-4-multimodal-instruct
From sourceHosted (signed)microsoft/paza-Phi-4-multimodal-instructLast check: 2026-11-15 03:24 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of Phi-4-multimodal-instruct.

Works with

Overview

Size
22.3 GB
Weights
22.3 GB (safetensors)
Parameters
5.6B
Formats
safetensors
Task
automatic speech recognition
License
MIT (permissive)
Files
27, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.phi
Lineage

Original release from the publisher.

Base model: microsoft/Phi-4-multimodal-instruct

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:24 UTCpassed

Model card

From the publisher at commit 1e78f4f. Shown as plain text with links; images open at the publisher.

paza-Phi-4-multimodal-instruct#

Model Overview#

This is a fine-tuned version of microsoft/Phi-4-multimodal-instruct for automatic speech recognition (ASR) in Swahili, Kalenjin, Kikuyu, Luo, Maasai and Somali. The model retains the base model’s transformer-based architecture but is optimized for audio transcription.

Fine-tuning was performed on the entire unified multilingual ASR dataset, comprising the mentioned six languages, to encourage cross-lingual generalization. During fine-tuning, only the audio-specific components: audio embedding module, audio encoder, and audio projection layers, were unfrozen and set as trainable, while the rest of the model parameters remained frozen to preserve pretrained language capabilities. Dropout was applied to both the audio encoder and projection layers to regularize training. The model leverages a multimodal processor that handles text tokenization and audio feature extraction, allowing seamless integration of audio inputs into the transformer architecture.

Alignment approach#

Click to view details

Traditional alignment measures are not the focus for this model, the fine tuning for this model is focused on transcription of speech to text. In this context, alignment is best approximated by accuracy—the degree to which the transcription reflects the original spoken input.

The model’s alignment strategy focused on producing accurate and reliable transcriptions of speech. Post-training alignment was performed using supervised fine-tuning on speech-text pairs in the target language. Datasets included multi-domain recordings and publicly available speech corpora, without additional filtering for content. Techniques such as instruction tuning and selective unfreezing of audio-related model components were applied to encourage consistent and precise outputs. The model’s performance and alignment were evaluated using standard ASR metrics, including word error rate (WER) and character error rate (CER). Users should note that, while the model is optimized for the mentioned low-resource languages, transcription, it may still produce errors.

For safety considerations, refer to the Responsible AI section below. Additional performance metrics and evaluation results are provided in the Evaluation section.

Usage#

Click to view details

Primary use cases#

This model is primarily fine-tuned for automatic speech recognition (ASR) of Swahili, Kalenjin, Kikuyu, Luo, Maasai and Somali in a research setting, providing accurate transcription of spoken audio across multiple domains, including conversational, instructional, and broadcast speech. In addition to ASR, the model retains the capabilities of Phi-4-multimodal-instruct base, allowing it to perform text generation and image understanding tasks. It is expected to perform as well as the base model on non-ASR tasks, though the fine-tuned model was not evaluated for non-ASR capabilities as part of this project.

This model is being shared with the research community to facilitate reproduction of our results and foster further research in this area.

Out-of-scope use cases#

This model is not intended for generating or altering audio content, automated decision-making, or any use cases that require understanding beyond transcription, and care should be taken to avoid applications where misinterpretation of speech could have safety or legal consequences.

This model is not specifically designed or evaluated for all downstream purposes and has not been evaluated on any other tasks besides speech recognition in the mentioned six languages.

Developers should consider common limitations of language models and multimodal models, as well as performance difference across languages, as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios.

Developers should be aware of and adhere to applicable laws or regulations (including but not limited to privacy, trade compliance laws, etc.) that are relevant to their use case.

We do not recommend using this model in commercial or real-world applications without further testing and development. It is being released for research purposes.

Data Overview#

Training Data#

The model was finetuned on the Africa Next Voices Kenya, DigiGreen Kikuyu, a proprietary Kikuyu dataset and the Swahili split of the Mozilla Common Voice dataset.

Audio samples longer than 30 seconds were excluded, following the recommendations in the input formats documentation.

Data distribution by language#

Image: alt text Figure 1: Data distribution by language

Training Procedure#

Click to view details

The model was finetuned using supervised learning on the speech-text pairs of the mentioned low-resource languages, in full precision (FP32). Training was conducted on 4×A100 GPUs (80GB). A streaming data pipeline was used, and a custom trainer cycled through batches from different datasets, enabling language-mixed training (e.g., one batch Swahili, the next Kalenjin).

A weighted random sampler was applied within the dataset generator to maintain balance across languages. Multi-GPU training was orchestrated using accelerate.

Training Hyperparameters#

Click to view details

HyperparameterValue
Precisionfp32
OptimizerAdamW_torch
Learning Rate1e-4
LR SchedulerLinearLR
Warmup Ratio0.2
Weight Decay0.005
Gradient Clipping1.0
Training Batch Size8
Gradient Accumulation Steps2
Effective Global Batch Size16
Number of Training Steps145,000
Eval Batch Size8
Adam Beta10.9
Adam Beta20.99
Adam Epsilon1e-7

Quality and performance evaluation#

These are the results from the test splits of all the datasets mentioned in the data distribution chart as of December 08, 2025. Because the training data is imbalanced across languages (see the data distribution chart), gains correlate with data volume.

The fine-tuned model demonstrates significant improvements in both Word Error Rate (WER) and Character Error Rate (CER) across multiple languages compared to the base model. Overall, the fine-tuned model consistently outperforms the base across languages, with variance reflecting the underlying language distribution.

Note: The Kikuyu evaluation results are computed using the test splits of all Kikuyu datasets listed above, including the proprietary dataset.

Character Error Rate Comparison Across languages#

Image: alt text Figure 2: Character Error Rate (CER) comparison across the six languages for the base model versus the finetuned model. Lower CER indicates better transcription performance.

Word Error Rate Comparison Across languages#

Image: alt text Figure 3: Word Error Rate (WER) comparison across the six languages for the base model versus the finetuned model. Lower WER indicates better transcription performance.

Comparison Across SOTA models#

We benchmarked our fine-tuned models against 3 state-of-the-art models - Meta’s facebook/omniASR-LLM-7B, facebook/mms-1b-all and OpenAI's openai/whisper-large-v3-turbo. This set provides a balanced comparison across large‑scale multi-lingual, low‑resource, and leading ASR models

Image: alt text Figure 4: Character Error Rate (CER) comparison across the Kenyan languages for several state‑of‑the‑art ASR models including the Paza models. Lower CER indicates better transcription performance.

Image: alt text Figure 5: Word Error Rate (WER) comparison across the Kenyan languages for several state‑of‑the‑art ASR models including the Paza models. Lower WER indicates better transcription performance.

Technical requirements and integration guidance#

Click to view details

Requirements#

Phi-4 family has been integrated in the 4.48.2 version of transformers. The current transformers version can be verified with: pip list | grep transformers. We suggest to run with Python 3.10. Examples of required packages:

flash_attn==2.7.4.post1
torch==2.6.0
transformers==4.48.2
accelerate==1.3.0
soundfile==0.13.1
pillow==11.1.0
scipy==1.15.2
torchvision==0.21.0
backoff==2.2.1
peft==0.13.2
Tokenizer#

Phi-4-multimodal-instruct supports a vocabulary size of up to 200064 tokens. The tokenizer files already provide placeholder tokens that can be used for downstream fine-tuning, but they can also be extended up to the model's vocabulary size.

Input Formats#

The model accepts audio clips together with a short text instruction in English describing the task to perform. For speech recognition, the instruction specifies that the audio should be transcribed and, where applicable, the target language. The model processes the instruction and the audio jointly and produces a text output. Given the nature of its training data, the model is best used with a chat-style prompt format, as shown below.

Speech-Language Format#

This format is used for various speech and audio tasks:

<|user|><|audio_1|>{task prompt}<|end|><|assistant|>

The task prompt can vary for different task. Automatic Speech Recognition:

<|user|><|audio_1|>Transcribe the the audio to {lang}.<|end|><|assistant|>

Example:

Instruction: “Transcribe the Kikuyu audio clip.”

Audio: The actual speech recording in a standard audio format (like a waveform).

Any audio format that can be loaded by soundfile package should be supported.

To keep the satisfactory performance, maximum audio length is suggested to be 40 seconds.

Loading the model locally#

After obtaining the model checkpoints, users can use this sample code for inference.

import requests
import torch
import os
import io
from PIL import Image
import soundfile as sf
from transformers import AutoModelForCausalLM, AutoProcessor, GenerationConfig
from urllib.request import urlopen
# Define model path
model_path = "microsoft/paza-Phi-4-multimodal-instruct"

# Load model and processor
processor = AutoProcessor.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_path, 
    device_map="cuda", 
    torch_dtype="auto", 
    trust_remote_code=True,
    # if you do not use Ampere or later GPUs, change attention to "eager"
    _attn_implementation='flash_attention_2',
).cuda()
# Load generation config
generation_config = GenerationConfig.from_pretrained(model_path)
# Define prompt structure
user_prompt = '<|user|>'
assistant_prompt = '<|assistant|>'
prompt_suffix = '<|end|>'

# Part 2: Audio Processing
print("\n--- AUDIO PROCESSING ---")
audio = "sample_audio.wav"
speech_prompt = "Transcribe the audio to Swahili."
prompt = f'{user_prompt}<|audio_1|>{speech_prompt}{prompt_suffix}{assistant_prompt}'
print(f'>>> Prompt\n{prompt}')

# Process with the model
inputs = processor(text=prompt, audios=[(audio, samplerate)], return_tensors='pt').to('cuda:0')
generate_ids = model.generate(
    **inputs,
    max_new_tokens=64,
    generation_config=generation_config,
)
generate_ids = generate_ids[:, inputs['input_ids'].shape[1]:]
response = processor.batch_decode(
    generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False
)[0]
print(f'>>> Response\n{response}')

More inference examples can be found here.

Responsible AI considerations#

Click to view details

As indicated in the microsoft/Phi-4-multimodal-instruct, this model is not specifically designed or evaluated for all downstream purposes.

Developers should consider common limitations of language models and multimodal models, as well as performance difference across languages, as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios.

Developers should be aware of and adhere to applicable laws or regulations (including but not limited to privacy, trade compliance laws, etc.) that are relevant to their use case.

Users are responsible for sourcing their audio inputs legally. This could include securing appropriate rights, ensuring consent for use of audio, and/or the anonymization of data prior to use in research.

Long Context#

Click to view details

Phi-4-multimodal-instruct supports an extended context window of 128K tokens, enabling efficient handling of long text and multimodal sequences. This fine-tuned ASR model retains the base model’s original architecture and positional encoding without changes.

No additional training was done on long-context datasets, so performance for very long inputs has not been optimized or evaluated. Users should refer to the base model's documentation for detailed expectations and validate performance for tasks requiring extended sequences.

Safety evaluation and red-teaming#

Click to view details

This model is a fine-tuned variant of Phi-4-multimodal-instruct, optimized exclusively for automatic speech recognition (ASR) in the mentioned six African languages. While the fine-tuning introduces domain-specific improvements for transcription accuracy, it does not alter the underlying generative capabilities of the base model. As such:

Underlying Capabilities Remain#

The base model retains its original functionality beyond ASR. However, the fine-tuning process was limited to ASR tasks and did not expand or modify generative behaviors. Therefore, the safety posture of the model is expected to remain consistent with that of the original base model and additional safety testing was not performed on generative capabilities for this fine-tuned version of the model.

Limited Impact of Fine-Tuning on Safety Risks#

Fine-tuning for ASR does not introduce new pathways for prompt-based exploitation or unsafe completions. The model’s generative features are unchanged, and the ASR-specific layers do not create novel content.

Risk Considerations#

Any harmful or biased language in transcriptions originates from the source audio, not from the ASR functionality. Mitigation of such risks should occur through downstream content moderation systems.

For generative capabilities inherited from the base model, refer to the base model’s safety evaluation for applicable risks and mitigations.

Contact#

Requests for additional information may be directed to

Authorized representative: Microsoft Ireland Operations Limited 70 Sir John Rogerson’s Quay, Dublin 2, D02 R296, Ireland 

MSFTAIActRequest@microsoft.com

Files

27 files · 22.3 GBWeights 22.3 GB (safetensors). Sizes and sha256 from the signed manifest.
Show all 27 files with their sha256
FileSizesha256
.gitattributes1.85 KBc1b3cbc4faab3772b378ce4a8488f01deb43c9d42031bfe91c7b83eb0088c5cc
README.md16.8 KBef9b099589f3fdf6c7309e58a8d870f2d65dc48e75369dc2d56330476fbc1372
added_tokens.json249 Bd4f2aceb0f20b71dd1f4bcc7e052e4412946bf281840b8f83d39f259571af486
config.json4.66 KB6a990ce53f1005017380901afd820870b36f31b74c7da8c8db771eaa9f778b85
configuration_phi4mm.py11.0 KBbd9609bd47ba0c87788011e5158a8bd3e1e93165a82a9b764eb7cb048006c949
figures/language_distribution.png89.7 KB715e50348055ad4aa68be1e74f7b855c3eea26efdabbc0cd2fc7f2a98992a857
figures/overall_cer_grouped_sorted.png230 KB6798fb58832f6a01cbb234a230b57426861e9b38efe76e887093047331e73d42
figures/overall_wer_grouped_sorted.png261 KB389fcd5d4b6951e955a96d3d97be441f87ead09fe46219d00e3401a3dbf1b59f
figures/phi_cer_comparison.png182 KB7afbf0e77798d7c8418a0e52af0332456c637dcde576cd08ed4db540282b7dd8
figures/phi_wer_comparison.png166 KB321b0b32647a3f8258f3da47659016fd3dd9f83fccd9a066a0488771d57c3583
generation_config.json169 B43ba725f7be495b98e55ed8433ca0b8cd264e1029f58f4d0d5e601341ada00f3
merges.txt2.42 MB856ce61180bb689282eed6b3a6838bb1f438399be23aefe9d20eb379791fb4ad
model-00001-of-00005.safetensors4.99 GB3e8fe9b411bbbaed255e0e68d2e3c1c0d8f215bd96c59a57d5876cbf613a3044
model-00002-of-00005.safetensors4.99 GB78f6ea6d6c800a44610629487d57de5310952d32e8b02ebb0f380bd552904ea7
model-00003-of-00005.safetensors4.86 GBd097cfa29a67960cabb11a9ea466a4e103baf9545d164626e89341b5e5fdc9cb
model-00004-of-00005.safetensors4.98 GB19f037cc5d5711c298e839f2a199869c4348ff69ee9304fa695e8bc3cdf6f55b
model-00005-of-00005.safetensors2.48 GB4ea55da7162fb82cb9de71fa7fd98e7415e673899e8d5d539391a05f3b1b59a2
model.safetensors.index.json240 KB889e84051bc5b40091b4aaf67e9a7658d51a9752abf4e395ba013309c0ed2df0
modeling_phi4mm.py116 KBe2b44eb7a66d6cc54524cee1ff9ba92d0658d435ea8900329ea0dbdb85c6439d
preprocessor_config.json252 KBeab87a1ca76c2d28c358d1530cc03573d12be3f8eefdaf2741b2fd7806a1f00c
processing_phi4mm.py32.8 KB84914d3e12256b4e2186e040c9830c11408468b6774f42afe85e6f8de2626d50
special_tokens_map.json587 Baff38493227d813e29fcf8406e8e90062f1f031aa47d589325e9c31d89ac7cc3
speech_conformer_encoder.py111 KB3742827e945732cc5deea4a95e14004da037044431a94e3f3fac26239e614e3a
tokenizer.json15.5 MB4c1b9f641d4f8b7247b8d5007dd3b6a9f6a87cb5123134fe0d326f14d10c0585
tokenizer_config.json3.31 KBb3e4d50946ff1813e77c69f6c8baadba0ebe0d44dfbe902095ab654ba1282361
vision_siglip_navit.py78.2 KB7d5c053341ee9c099126fe675d5dcdc0ed5c0246f92fffdec78a1ab2f804e28d
vocab.json3.91 MB6cb65a857824fa6615bb1782d95d882617a8bbce1da0317118586b36f39e98bd
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
1e78f4f84f pinned now2026-11-15 03:24 UTC27 files · 22.3 GB

Use it

$ fw get microsoft/paza-Phi-4-multimodal-instruct
# manifest sha256 093411f524b3… · 22.3 GB · 27 files
$ fw verify ./paza-Phi-4-multimodal-instruct microsoft/paza-Phi-4-multimodal-instruct
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/paza-Phi-4-multimodal-instruct.json --dir ./paza-Phi-4-multimodal-instruct $ python3 fw.py verify ./paza-Phi-4-multimodal-instruct ./microsoft__paza-Phi-4-multimodal-instruct.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/paza-Phi-4-multimodal-instruct --revision 1e78f4f84fd8a92f132295a32e5cb71b5321dcab --local-dir ./paza-Phi-4-multimodal-instruct
transformersSpeech recognition with the transformers pipeline.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import pipeline asr = pipeline("automatic-speech-recognition", model="microsoft/paza-Phi-4-multimodal-instruct", revision="1e78f4f84fd8a92f132295a32e5cb71b5321dcab") print(asr("audio.wav")["text"])

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
ef9b099589f3fdf6c7309e58a8d870f2d65dc48e75369dc2d56330476fbc1372
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.phiSubject: paza-Phi-4-multimodal-instructDate: 2026-11-15Commit: 1e78f4fSigned: 2DC28CC7B26A283B ✓
Upstream
microsoft/paza-Phi-4-multimodal-instruct
Pinned commit
1e78f4f84fd8a92f132295a32e5cb71b5321dcab
Manifest
paza-Phi-4-multimodal-instruct.json · .minisig
Manifest sha256
093411f524b363ad74cfa1117ad230f80aecfa4e462e31626371ac9474460969
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:24 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/paza-Phi-4-multimodal-instruct.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/paza-Phi-4-multimodal-instruct.json.minisig $ minisign -Vm paza-Phi-4-multimodal-instruct.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

microsoft/Phi-4-multimodal-instruct · this model is a finetune of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/paza-Phi-4-multimodal-instruct
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. paza-Phi-4-multimodal-instruct.json. Provenance. Takedown history: none.
From: BAAI <huggingface.co/BAAI>Subject: bunny-phi-2-siglip-lora
From: microsoft <huggingface.co/microsoft>Subject: MediPhi
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Clinical
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Guidelines
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-Instruct
From: microsoft <huggingface.co/microsoft>Subject: MediPhi-MedCode