add initial files and update readme
#1
by mlobdell-synaptics - opened
- .gitattributes +2 -0
- README.md +58 -0
- adapter_pos_emb.npy +3 -0
- config.json +71 -0
- decoder.vmfb +3 -0
- decoder_token_embeddings.npy +3 -0
- encoder.vmfb +3 -0
- streaming_config.json +10 -0
- tokenizer.json +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
decoder.vmfb filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
encoder.vmfb filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,61 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
license: mit
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
library_name: torq
|
| 3 |
+
tags:
|
| 4 |
+
- Automatic Speech Recognition
|
| 5 |
+
- Astra SL
|
| 6 |
+
- SL2600
|
| 7 |
+
- MPU
|
| 8 |
license: mit
|
| 9 |
+
base_model:
|
| 10 |
+
- UsefulSensors/moonshine-streaming-tiny
|
| 11 |
+
base_model_relation: quantized
|
| 12 |
---
|
| 13 |
+
|
| 14 |
+
# Moonshine Streaming Tiny
|
| 15 |
+
|
| 16 |
+
## Model Overview
|
| 17 |
+
|
| 18 |
+
Moonshine is a high-efficiency automatic speech recognition (ASR) model designed specifically for real-time speech recognition. Unlike Whisper, which processes audio in fixed 30-second chunks, Moonshine uses a variable-length architecture that only computes the actual duration of the speech received.
|
| 19 |
+
|
| 20 |
+
Useful Sensors developed Moonshine and released the English model as open-source. There are 2 models of different sizes and capabilities - base and tiny. The tiny version utilizes 27M parameters.
|
| 21 |
+
|
| 22 |
+
Moonshine Streaming Tiny is based on Moonshine V2, released in 2026, introduced sliding window attention in the encoder part of the model. This means we no longer need to wait for the full-length of speech to start emitting the first token, reducing the time-to-first-token (TTFT) as the encoder can now "stream" the encoding frames to the decoder.
|
| 23 |
+
|
| 24 |
+
## Model Features
|
| 25 |
+
- **Model Type:** Automatic Speech Recognition
|
| 26 |
+
- **Input:** Raw waveform (1D array of floats) 16kHz mono audio up to 30 seconds
|
| 27 |
+
- **Output:** Sequence of token IDs (integers)
|
| 28 |
+
- **Quantization**: None
|
| 29 |
+
|
| 30 |
+
## Recommended Platforms
|
| 31 |
+
|
| 32 |
+
- Synaptics Astra™ SL2600-Series with Torq
|
| 33 |
+
|
| 34 |
+
## Metrics
|
| 35 |
+
|
| 36 |
+
| Platform | Model / Stage | Environment | Inference Time | Infer / s |
|
| 37 |
+
| --------- | --------- | --------- | --------- | --------- |
|
| 38 |
+
| SL2610 | Moonshine Tiny Decoder | Torq v2.0.0 | TBD | TBD |
|
| 39 |
+
| SL2610 | Moonshine Tiny Encoder (5 sec audio) | Torq v2.0.0 | TBD | TBD
|
| 40 |
+
|
| 41 |
+
## Deployment
|
| 42 |
+
|
| 43 |
+
### Compiled Models
|
| 44 |
+
Torq compiled model files are provided in this repository. To recompile the models, see the [Torq Documentation](https://synaptics-torq.github.io/torq-compiler/v/latest/).
|
| 45 |
+
|
| 46 |
+
### Source Models
|
| 47 |
+
The source model files are available at TBD.
|
| 48 |
+
|
| 49 |
+
### Usage Tutorials / Example Apps
|
| 50 |
+
|
| 51 |
+
Example App GitHub Repositories
|
| 52 |
+
- Moonshine Streaming Example (moonshine_streaming) in [Torq Examples](https://github.com/synaptics-torq/torq-examples): Basic model usage examples for Torq
|
| 53 |
+
|
| 54 |
+
## License
|
| 55 |
+
|
| 56 |
+
Both the source model and the compiled model for on-device deployment are licensed under [MIT License](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md).
|
| 57 |
+
|
| 58 |
+
## Learn More
|
| 59 |
+
|
| 60 |
+
- [Synaptics AI Developer Zone](https://developer.synaptics.com?utm_source=hf): Get started with documentation, tutorials and resources for your Edge AI journey.
|
| 61 |
+
- [Astra Support Portal](https://synacsm.atlassian.net/servicedesk/customer/portal/543?utm_source=hf): Connect with our engineering team and community.
|
adapter_pos_emb.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b065aa32f2ac0d0bf918368d6cb8bdc87b694541adc7597d696e015416f5765
|
| 3 |
+
size 5243008
|
config.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"attention_bias": false,
|
| 3 |
+
"attention_dropout": 0.0,
|
| 4 |
+
"bos_token_id": 1,
|
| 5 |
+
"decoder_start_token_id": 1,
|
| 6 |
+
"encoder_config": {
|
| 7 |
+
"attention_bias": false,
|
| 8 |
+
"attention_dropout": 0.0,
|
| 9 |
+
"frame_ms": 5.0,
|
| 10 |
+
"head_dim": 40,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_size": 320,
|
| 13 |
+
"intermediate_size": 1280,
|
| 14 |
+
"max_position_embeddings": 4096,
|
| 15 |
+
"model_type": "moonshine_streaming_encoder",
|
| 16 |
+
"num_attention_heads": 8,
|
| 17 |
+
"num_hidden_layers": 6,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"sample_rate": 16000,
|
| 20 |
+
"sliding_windows": [
|
| 21 |
+
[
|
| 22 |
+
16,
|
| 23 |
+
4
|
| 24 |
+
],
|
| 25 |
+
[
|
| 26 |
+
16,
|
| 27 |
+
4
|
| 28 |
+
],
|
| 29 |
+
[
|
| 30 |
+
16,
|
| 31 |
+
0
|
| 32 |
+
],
|
| 33 |
+
[
|
| 34 |
+
16,
|
| 35 |
+
0
|
| 36 |
+
],
|
| 37 |
+
[
|
| 38 |
+
16,
|
| 39 |
+
4
|
| 40 |
+
],
|
| 41 |
+
[
|
| 42 |
+
16,
|
| 43 |
+
4
|
| 44 |
+
]
|
| 45 |
+
]
|
| 46 |
+
},
|
| 47 |
+
"encoder_hidden_size": 320,
|
| 48 |
+
"eos_token_id": 2,
|
| 49 |
+
"ffn_mult": 4,
|
| 50 |
+
"head_dim": 40,
|
| 51 |
+
"hidden_act": "silu",
|
| 52 |
+
"hidden_size": 320,
|
| 53 |
+
"intermediate_size": 1280,
|
| 54 |
+
"is_encoder_decoder": true,
|
| 55 |
+
"max_position_embeddings": 4096,
|
| 56 |
+
"model_type": "moonshine_streaming",
|
| 57 |
+
"num_attention_heads": 8,
|
| 58 |
+
"num_hidden_layers": 6,
|
| 59 |
+
"num_key_value_heads": 8,
|
| 60 |
+
"pad_head_dim_to_multiple_of": null,
|
| 61 |
+
"pad_token_id": 0,
|
| 62 |
+
"rope_parameters": {
|
| 63 |
+
"partial_rotary_factor": 0.8,
|
| 64 |
+
"rope_theta": 10000.0,
|
| 65 |
+
"rope_type": "default"
|
| 66 |
+
},
|
| 67 |
+
"tie_word_embeddings": false,
|
| 68 |
+
"transformers_version": "5.0.0.dev0",
|
| 69 |
+
"use_cache": true,
|
| 70 |
+
"vocab_size": 32768
|
| 71 |
+
}
|
decoder.vmfb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43a6cd3000798be1807e641a68f21fc4054ba374fd33d6a93c4669fab33faffd
|
| 3 |
+
size 44586553
|
decoder_token_embeddings.npy
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d73af8fe95a5d0b74222dc8e9af1242da2f1c134646fb491d61ec8c8292b7547
|
| 3 |
+
size 41943168
|
encoder.vmfb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17160a7f82b71453ecdf86467186db4851f7d066b65b4e24c8d702c613572ff6
|
| 3 |
+
size 22444593
|
streaming_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"chunk_len": 1280,
|
| 3 |
+
"feature_stride": 4,
|
| 4 |
+
"total_lookahead": 16,
|
| 5 |
+
"warmup_chunks": 4,
|
| 6 |
+
"max_tokens": 48,
|
| 7 |
+
"max_memory_len": 400,
|
| 8 |
+
"extract_embeddings": true,
|
| 9 |
+
"export_attention": true
|
| 10 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|