Sync model repo (text/metadata)
Browse files
README.md
CHANGED
|
@@ -48,6 +48,10 @@ This version is intended to demonstrate efficient inference on Arm-based platfor
|
|
| 48 |
|---|---|
|
| 49 |
| `whisper_small_vivo_executorch_optimized.pte` | Arm-optimized model for deployment |
|
| 50 |
| `whisper_preprocessor.pte` | ExecuTorch module that computes the log-mel spectrogram from raw audio; loaded by `example.py` when present, with a Python-side fallback otherwise |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 51 |
| `example.py` | Minimal inference example |
|
| 52 |
| `pyproject.toml` | Pinned runtime dependencies for `example.py`, resolved with uv |
|
| 53 |
| `uv.lock` | Locked dependency resolution for `pyproject.toml` |
|
|
|
|
| 48 |
|---|---|
|
| 49 |
| `whisper_small_vivo_executorch_optimized.pte` | Arm-optimized model for deployment |
|
| 50 |
| `whisper_preprocessor.pte` | ExecuTorch module that computes the log-mel spectrogram from raw audio; loaded by `example.py` when present, with a Python-side fallback otherwise |
|
| 51 |
+
| `tokenizer.json` | Fast Whisper tokenizer vocabulary and tokenisation rules |
|
| 52 |
+
| `tokenizer_config.json` | Whisper tokenizer configuration |
|
| 53 |
+
| `special_tokens_map.json` | Whisper special-token definitions |
|
| 54 |
+
| `pte_original/` | Original baseline model and tokenizer artefacts; not used by the optimised example |
|
| 55 |
| `example.py` | Minimal inference example |
|
| 56 |
| `pyproject.toml` | Pinned runtime dependencies for `example.py`, resolved with uv |
|
| 57 |
| `uv.lock` | Locked dependency resolution for `pyproject.toml` |
|
example.py
CHANGED
|
@@ -6,8 +6,10 @@ all Linear layers plus a manual weight-only INT8 pass on `decoder.embed_tokens`,
|
|
| 6 |
and uses separate 'encoder' and 'text_decoder' ExecuTorch methods with a
|
| 7 |
static KV cache.
|
| 8 |
|
| 9 |
-
This example resolves the tokenizer and preprocessor artifacts from the
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
|
| 12 |
Requirements:
|
| 13 |
pip install executorch torch transformers soundfile numpy
|
|
@@ -26,7 +28,6 @@ from transformers import AutoTokenizer
|
|
| 26 |
# -- Configuration -------------------------------------------------------------
|
| 27 |
AUDIO_PATH = "sample_input.flac"
|
| 28 |
PREPROCESSOR_FILENAME = "whisper_preprocessor.pte"
|
| 29 |
-
DEFAULT_LOCAL_MODEL_DIR = "pte_optimized"
|
| 30 |
MODEL_FILENAME = "whisper_small_vivo_executorch_optimized.pte"
|
| 31 |
|
| 32 |
DECODER_START_TOKEN_ID = 50258
|
|
@@ -60,7 +61,7 @@ def parse_args() -> argparse.Namespace:
|
|
| 60 |
default=None,
|
| 61 |
help=(
|
| 62 |
"Directory containing the ExecuTorch model, tokenizer files, and optionally "
|
| 63 |
-
"whisper_preprocessor.pte. Defaults to the
|
| 64 |
),
|
| 65 |
)
|
| 66 |
parser.add_argument(
|
|
@@ -75,7 +76,7 @@ def resolve_model_dir(script_dir: Path, requested_dir: str | None) -> Path:
|
|
| 75 |
candidates: list[Path] = []
|
| 76 |
if requested_dir:
|
| 77 |
candidates.append(Path(requested_dir))
|
| 78 |
-
candidates.append(script_dir
|
| 79 |
|
| 80 |
for candidate in candidates:
|
| 81 |
bundle_dir = candidate.resolve()
|
|
|
|
| 6 |
and uses separate 'encoder' and 'text_decoder' ExecuTorch methods with a
|
| 7 |
static KV cache.
|
| 8 |
|
| 9 |
+
This example resolves the model, tokenizer, and preprocessor artifacts from the
|
| 10 |
+
repository root.
|
| 11 |
+
Original baseline artifacts are retained in the pte_original directory and are
|
| 12 |
+
not used by this optimized example.
|
| 13 |
|
| 14 |
Requirements:
|
| 15 |
pip install executorch torch transformers soundfile numpy
|
|
|
|
| 28 |
# -- Configuration -------------------------------------------------------------
|
| 29 |
AUDIO_PATH = "sample_input.flac"
|
| 30 |
PREPROCESSOR_FILENAME = "whisper_preprocessor.pte"
|
|
|
|
| 31 |
MODEL_FILENAME = "whisper_small_vivo_executorch_optimized.pte"
|
| 32 |
|
| 33 |
DECODER_START_TOKEN_ID = 50258
|
|
|
|
| 61 |
default=None,
|
| 62 |
help=(
|
| 63 |
"Directory containing the ExecuTorch model, tokenizer files, and optionally "
|
| 64 |
+
"whisper_preprocessor.pte. Defaults to the directory containing example.py."
|
| 65 |
),
|
| 66 |
)
|
| 67 |
parser.add_argument(
|
|
|
|
| 76 |
candidates: list[Path] = []
|
| 77 |
if requested_dir:
|
| 78 |
candidates.append(Path(requested_dir))
|
| 79 |
+
candidates.append(script_dir)
|
| 80 |
|
| 81 |
for candidate in candidates:
|
| 82 |
bundle_dir = candidate.resolve()
|
pte_optimized/special_tokens_map.json → special_tokens_map.json
RENAMED
|
File without changes
|
pte_optimized/tokenizer.json → tokenizer.json
RENAMED
|
File without changes
|
pte_optimized/tokenizer_config.json → tokenizer_config.json
RENAMED
|
File without changes
|