Instructions to use enactic/avista-large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use enactic/avista-large with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="enactic/avista-large", trust_remote_code=True)# Load model directly from transformers import AutoModelForSpeechSeq2Seq model = AutoModelForSpeechSeq2Seq.from_pretrained("enactic/avista-large", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update configuration_avhubert.py
Browse files
configuration_avhubert.py
CHANGED
|
@@ -51,8 +51,10 @@ class AVHubertConfig(PretrainedConfig):
|
|
| 51 |
ctc_zero_infinity: bool = False,
|
| 52 |
ctc_loss_weight: float = 0.3,
|
| 53 |
special_ids: list[int] | None = None,
|
|
|
|
| 54 |
**kwargs,
|
| 55 |
):
|
|
|
|
| 56 |
super().__init__(**kwargs)
|
| 57 |
self.label_rate = label_rate
|
| 58 |
self.encoder_layers = encoder_layers
|
|
@@ -99,6 +101,7 @@ class AVHubertConfig(PretrainedConfig):
|
|
| 99 |
self.ctc_zero_infinity = ctc_zero_infinity
|
| 100 |
self.ctc_loss_weight = ctc_loss_weight
|
| 101 |
self.special_ids = special_ids
|
|
|
|
| 102 |
|
| 103 |
@property
|
| 104 |
def encoder_config(self) -> HubertConfig:
|
|
|
|
| 51 |
ctc_zero_infinity: bool = False,
|
| 52 |
ctc_loss_weight: float = 0.3,
|
| 53 |
special_ids: list[int] | None = None,
|
| 54 |
+
use_cache: bool = True,
|
| 55 |
**kwargs,
|
| 56 |
):
|
| 57 |
+
kwargs.setdefault("is_encoder_decoder", True)
|
| 58 |
super().__init__(**kwargs)
|
| 59 |
self.label_rate = label_rate
|
| 60 |
self.encoder_layers = encoder_layers
|
|
|
|
| 101 |
self.ctc_zero_infinity = ctc_zero_infinity
|
| 102 |
self.ctc_loss_weight = ctc_loss_weight
|
| 103 |
self.special_ids = special_ids
|
| 104 |
+
self.use_cache = use_cache
|
| 105 |
|
| 106 |
@property
|
| 107 |
def encoder_config(self) -> HubertConfig:
|