Downloads · 30 days
22
7% of all-time downloads
majentik/Gemma-4-E4B-BF16-MERaLiON-Speech-LoRA-SG-MLX
Gemma-4-E4B-BF16-MERaLiON-Speech-LoRA-SG-MLX is a automatic speech recognition model from majentik. Use it when you need speech turned into text. It is set up for mlx. The card lists the license as other.
A composed Singapore-English ASR model that connects the MERaLiON-3 speech encoder to a BF16 Gemma-4-E4B decoder through a trained projector and rank-16 speech LoRA.
Downloads · 30 days
22
7% of all-time downloads
All-time downloads
294
Public
Repo size
16.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors16.5 GB · 100%
From the Hugging Face model README
A composed Singapore-English ASR model that connects the MERaLiON-3 speech encoder to a BF16 Gemma-4-E4B decoder through a trained projector and rank-16 speech LoRA.
This BF16 release is the recommended quality-first edition: it keeps the decoder in native bfloat16, avoids quantization artifacts, and improves the standalone MERaLiON-3 baseline by 9.69 WER points on the MNSC ASR Part 2 test set.
The development of this product/service was assisted by MERaLiON, an AI model developed by the Agency for Science Technology And Research ("A*STAR").
This model is a derivative work of Gemma 4 (Apache 2.0) and is distributed subject to the Gemma Terms of Use (ai.google.dev/gemma/terms) and the Gemma Prohibited Use Policy (see licenses/gemma-prohibited-use-policy.txt). All downstream users are bound by Gemma Section 3.2 use restrictions, the Gemma Prohibited Use Policy, the MERaLiON-3 Public Licence, and the Singapore Open Data Licence v1 for the MNSC-derived components.
Bundled local license texts include licenses/gemma-prohibited-use-policy.txt, licenses/gemma-4-apache-2.txt, licenses/gemma-terms.txt, licenses/meralion-public-license-v3.txt, and licenses/singapore-open-data-licence-v1.txt.
Important: this is a private full-bundle MLX release, not a vanilla
transformers.pipelinecheckpoint. Use the bundledruntime/(or equivalent wiring) to connectspeech_encoder/,projector/,decoder/, andlora/.Identity note: This private full-bundle package converts the SG-named adapter repo into a complete MLX bundle using the MNSC-evaluated BF16 full-bundle source. The evaluation rerun is for MNSC ASR Part 2; the SG slug is the repo identifier inherited from the prior public adapter release. No new SG-only evaluation beyond MNSC ASR Part 2 is claimed.
Evaluated on MERaLiON Multitask National Speech Corpus v1 — ASR Part 2 Test (3000 utterance-level clips).
| System | WER ↓ | Notes |
|---|---|---|
| MERaLiON-3 baseline | 25.78% | stock MERaLiON-3 encoder + native decoder |
| 8-bit Gemma-4 + MERaLiON speech LoRA | 18.86% | smaller sibling release |
| This BF16 release | 16.09% | best-quality bundle |
Currently owner-only/private. A public visibility flip is authorized only if the public-release license gate passes and the user explicitly approves the follow-up visibility change. Do not infer public status from this preparation.
These are actual model outputs from artifacts/run_3000_bf16_r16mlp/eval_predictions.jsonl, selected from the held-out MNSC ASR Part 2 test set. Each row scores 0% WER under the release normalizer (lowercase, punctuation removed, whitespace collapsed).
| # | Reference | Model output | WER |
|---|---|---|---|
| 1 | There IS A Food Court Selling Chicken Pasta behind Delmas' House | There is a food court selling Chicken Pasta behind Delma's house. | 0% |
| 2 | what is the distance to The Seletar Mall | What is the distance to The Seletar Mall? | 0% |
| 3 | Number sequence IS S seven six nine Zero four one three A and Date of birth IS thirteen September nineteen seventy seven | Number sequence is S. seven, six, nine, zero, four, one, three, A, and date of birth is thirteen, September, nineteen seventy seven. | 0% |
| 4 | six nine eight four four six eight three five three | Six, nine, eight, four, four, six, eight, three, five, three. | 0% |
| 5 | eight five six four one seven four five | Eight, five, six, four, one, seven, four, five. | 0% |
| 6 | Pita is a Traditional Local Cuisine | Pita is a traditional local cuisine. | 0% |
| 7 | it is faster to take the bus to Jalan Asas | It is faster to take the bus to Jalan Asas. | 0% |
| 8 | a new television show documented the lives of various people including Syed Sheikh Syed Ahmad Al Hadi and Lucien Wang | A new television show documented the lives of various people, including Syed Sheikh Syed Ahmad Al Hadi and Lucien Wang. | 0% |
| 9 | Hiyashi Chuka Takikomi Gohan and Fugu | Hiyashi Chuka Takikomi Gohan and Fugu. | 0% |
| 10 | where can I get cheap food in Kathmandu | Where can I get Cheap Food in Kathmandu? | 0% |
Across the full saved evaluation file, 1071 / 3000 utterances scored 0% WER, and another 857 scored ≤20% WER under the same normalizer.
| Path | Contents | Precision |
|---|---|---|
decoder/ | Gemma-4-E4B instruction decoder, MLX format | bfloat16 |
speech_encoder/ | MERaLiON-3 acoustic encoder + frame adaptor | fp16 |
projector/ | LayerNorm -> Linear(3584,3072) -> SiLU -> Linear(3072,2560) -> RMSNorm | fp32 |
lora/ | rank-16 speech-alignment LoRA adapters + lora_config.json | fp32 |
config.json | composition manifest | JSON |
runtime/ | Bundled MLX composition and inference runtime (runtime/inference.py, runtime/meralion3/) | Python |
PROVENANCE.md | chain of custody, evaluation, license notes | Markdown |
No MNSC-derived audio sample or sample metadata is bundled. For inference, bring your own 16 kHz mono PCM16 WAV.
The speech path is:
audio -> Whisper-style log-mel -> MERaLiON-3 encoder/adaptor -> 3584-d speech embeddings
-> projector -> 2560-d Gemma embedding space -> Gemma-4-E4B BF16 + speech LoRA -> text
Download or locate the private full bundle. Bring your own 16 kHz mono PCM16 WAV; no MNSC-derived recording is packaged. Then use the bundled runtime from this repository root:
from pathlib import Path
import sys
from huggingface_hub import snapshot_download
bundle = Path(snapshot_download("majentik/Gemma-4-E4B-BF16-MERaLiON-Speech-LoRA-SG-MLX"))
sys.path.insert(0, str(bundle))
from runtime.inference import load_pipeline, transcribe_with_pipeline
pipeline = load_pipeline(
meralion_dir=str(bundle / "speech_encoder"),
gemma_id=str(bundle / "decoder"),
projector_path=str(bundle / "projector"),
lora_path=str(bundle / "lora"),
lora_rank=16,
lora_target_names=(
"q_proj", "k_proj", "v_proj", "o_proj",
"gate_proj", "up_proj", "down_proj",
),
)
text = transcribe_with_pipeline(pipeline, "your_audio.wav", max_tokens=128)
print(text)
Runtime notes:
lora_path should point to the directory containing adapters.safetensors (lora/), not to the file itself.q/k/v/o/gate/up/down across all 42 decoder layers.Transcribe the following audio: unless you intentionally fine-tune/evaluate a different prompt contract.0.0 for plain text generation.Good fits:
Not intended for:
elderwise runtime.q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projGemma-4's per-layer embedding side channel is handled in the runtime by supplying explicit per-layer inputs for speech positions instead of forcing speech embeddings through token nearest-neighbor recovery.
See PROVENANCE.md for the full chain of custody. Summary:
google/gemma-4-E4B-it, converted to MLX bfloat16; Gemma Terms, Gemma 4 Apache 2.0 text, and the Gemma Prohibited Use Policy apply.MERaLiON/MERaLiON-3-10B; MERaLiON-3 Public Licence applies.MERaLiON/Multitask-National-Speech-Corpus-v1, derived from IMDA National Speech Corpus / MNSC v1; Singapore Open Data Licence v1 applies to MNSC-derived training/evaluation components and requires attribution without implying official endorsement.Required Gemma notice: Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms.
MERaLiON acknowledgment: The development of this product/service was assisted by MERaLiON, an AI model developed by the Agency for Science Technology And Research ("A*STAR").
This model is a derivative work of Gemma 4 (Apache 2.0) and is distributed subject to the Gemma Terms of Use (ai.google.dev/gemma/terms) and the Gemma Prohibited Use Policy (see licenses/gemma-prohibited-use-policy.txt). All downstream users are bound by Gemma Section 3.2 use restrictions, the Gemma Prohibited Use Policy, the MERaLiON-3 Public Licence, and the Singapore Open Data Licence v1 for the MNSC-derived components.
License archives are bundled in licenses/, and the root NOTICE records the required notices. No MNSC-derived audio sample is redistributed in this public-release-prep bundle.
The repository remains private until the user explicitly approves a follow-up visibility change after the public-release license gate.
The following files were modified from upstream/source staging and are called out for Gemma/Apache/MERaLiON notice compliance:
config.json — T6.5 stale repository slug corrected to the full-bundle repo name.speech_encoder/composite_config.json — T6.5 upstream-inherited absolute training paths redacted.speech_encoder/encoder_config.json — T6.5 upstream-inherited absolute training path redacted.README.md — T11 public-release compliance text added, including MERaLiON acknowledgment, Gemma Section 3.2 binding language, license archive links, and no-packaged-audio-sample notice.NOTICE — T11 Gemma, MERaLiON, MNSC, Apache 2.0, and Prohibited Use Policy notices expanded.PROVENANCE.md — T11 modification log and evaluation/sample provenance updated.@misc{gemma4_meralion_bf16_speech_lora_mlx_2026,
title = {Gemma-4-E4B-BF16 + MERaLiON Speech LoRA for Singapore English (MLX)},
author = {majentik},
year = {2026},
url = {https://huggingface.co/majentik/Gemma-4-E4B-BF16-MERaLiON-Speech-LoRA-SG-MLX}
}
majentik/Gemma-4-E4B-MERaLiON-Speech-LoRA-MNSC-MLX — smaller, 18.86% WER.