Downloads · 30 days
5
15% of all-time downloads
Jingya/wav2vec2-base-superb-sv-neuronx
wav2vec2-base-superb-sv-neuronx is a machine learning model from Jingya. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This is model is compiled explicitly for AWS Neuronx(inferentia 2 / trainium 1) with the following codes:
Downloads · 30 days
5
15% of all-time downloads
All-time downloads
34
Public
Repo size
163 MB
Likes
0
Public
Click a slice to open those files.
.neuron163 MB · 100%
From the Hugging Face model README
This is model is compiled explicitly for AWS Neuronx(inferentia 2 / trainium 1) with the following codes:
import torch
from datasets import load_dataset
from transformers import AutoProcessor, AutoFeatureExtractor
from optimum.neuron import NeuronModelForXVector, pipeline
dataset = load_dataset("hf-internal-testing/librispeech_asr_demo", "clean", split="validation")
dataset = dataset.sort("id")
sampling_rate = dataset.features["audio"].sampling_rate
model_id = "anton-l/wav2vec2-base-superb-sv"
feature_extractor = AutoFeatureExtractor.from_pretrained(model_id)
input_shapes = {"batch_size": 1, "audio_sequence_length": 100000}
compiler_args = {"auto_cast": "matmul", "auto_cast_type": "bf16"}
model = NeuronModelForXVector.from_pretrained(
model_id,
export=True,
disable_neuron_cache=True,
**input_shapes,
**compiler_args,
)
model.save_pretrained("wav2vec2_neuron")