Feature Extraction
Transformers
Safetensors
moss-audio-tokenizer
audio
audio-tokenizer
neural-codec
moss-tts-family
MOSS Audio Tokenizer Nano
speech-tokenizer
trust-remote-code
custom_code
Instructions to use OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("OpenMOSS-Team/MOSS-Audio-Tokenizer-Nano", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update configuration_moss_audio_tokenizer.py
#1
by fablevi - opened
configuration_moss_audio_tokenizer.py
CHANGED
|
@@ -86,17 +86,17 @@ class MossAudioTokenizerConfig(PreTrainedConfig):
|
|
| 86 |
# Backward-compatible alias used by some checkpoints.
|
| 87 |
attribute_map = {"sample_rate": "sampling_rate"}
|
| 88 |
|
| 89 |
-
sampling_rate: int
|
| 90 |
-
downsample_rate: int
|
| 91 |
-
causal_transformer_context_duration: float
|
| 92 |
-
encoder_kwargs: list
|
| 93 |
-
decoder_kwargs: list
|
| 94 |
-
number_channels: int
|
| 95 |
-
enable_channel_interleave: bool
|
| 96 |
-
attention_implementation: str
|
| 97 |
-
compute_dtype: str
|
| 98 |
-
quantizer_type: str
|
| 99 |
-
quantizer_kwargs: dict
|
| 100 |
|
| 101 |
def __init__(
|
| 102 |
self,
|
|
|
|
| 86 |
# Backward-compatible alias used by some checkpoints.
|
| 87 |
attribute_map = {"sample_rate": "sampling_rate"}
|
| 88 |
|
| 89 |
+
sampling_rate: int = 48000
|
| 90 |
+
downsample_rate: int = 3840
|
| 91 |
+
causal_transformer_context_duration: float = 10.0
|
| 92 |
+
encoder_kwargs: list = None
|
| 93 |
+
decoder_kwargs: list = None
|
| 94 |
+
number_channels: int = 2
|
| 95 |
+
enable_channel_interleave: bool = True
|
| 96 |
+
attention_implementation: str = "sdpa"
|
| 97 |
+
compute_dtype: str = "fp32"
|
| 98 |
+
quantizer_type: str = "rlfq"
|
| 99 |
+
quantizer_kwargs: dict = None
|
| 100 |
|
| 101 |
def __init__(
|
| 102 |
self,
|