Feature Extraction
Transformers
PyTorch
Safetensors
Fairseq
French
pantagruel_uni
data2vec2
JEPA
speech
custom_code
Instructions to use PantagrueLLM/speech-base-1K with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PantagrueLLM/speech-base-1K with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="PantagrueLLM/speech-base-1K", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("PantagrueLLM/speech-base-1K", trust_remote_code=True, device_map="auto") - Fairseq
How to use PantagrueLLM/speech-base-1K with Fairseq:
from fairseq.checkpoint_utils import load_model_ensemble_and_task_from_hf_hub models, cfg, task = load_model_ensemble_and_task_from_hf_hub( "PantagrueLLM/speech-base-1K" ) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files
modeling_pantagruel_uni.py
CHANGED
|
@@ -1623,7 +1623,7 @@ class PantagruelUniModel(PantagruelUniPreTrainedModel):
|
|
| 1623 |
mode = "TEXT" if input_ids is not None else "AUDIO"
|
| 1624 |
|
| 1625 |
if padding_mask is None and attention_mask is not None:
|
| 1626 |
-
padding_mask = ~attention_mask # attention mask: 1 means to attend to (not masked), 0 means not to attend to (masked). padding mask: 1 means padded (not attend to), 0 means not padded (to attend to)
|
| 1627 |
|
| 1628 |
feature_extractor = self.modality_encoders[mode]
|
| 1629 |
extractor_out = feature_extractor(
|
|
|
|
| 1623 |
mode = "TEXT" if input_ids is not None else "AUDIO"
|
| 1624 |
|
| 1625 |
if padding_mask is None and attention_mask is not None:
|
| 1626 |
+
padding_mask = ~attention_mask.bool() # attention mask: 1 means to attend to (not masked), 0 means not to attend to (masked). padding mask: 1 means padded (not attend to), 0 means not padded (to attend to)
|
| 1627 |
|
| 1628 |
feature_extractor = self.modality_encoders[mode]
|
| 1629 |
extractor_out = feature_extractor(
|