Instructions to use m-a-p/MERT-v1-330M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use m-a-p/MERT-v1-330M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("audio-classification", model="m-a-p/MERT-v1-330M", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("m-a-p/MERT-v1-330M", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update configuration_MERT.py
Browse files- configuration_MERT.py +3 -0
configuration_MERT.py
CHANGED
|
@@ -133,6 +133,9 @@ class MERTConfig(PretrainedConfig):
|
|
| 133 |
|
| 134 |
self.attention_relax = attention_relax
|
| 135 |
|
|
|
|
|
|
|
|
|
|
| 136 |
@property
|
| 137 |
def inputs_to_logits_ratio(self):
|
| 138 |
return functools.reduce(operator.mul, self.conv_stride, 1)
|
|
|
|
| 133 |
|
| 134 |
self.attention_relax = attention_relax
|
| 135 |
|
| 136 |
+
# fix bug with hf > 4.42
|
| 137 |
+
self.conv_pos_batch_norm = False
|
| 138 |
+
|
| 139 |
@property
|
| 140 |
def inputs_to_logits_ratio(self):
|
| 141 |
return functools.reduce(operator.mul, self.conv_stride, 1)
|