Downloads · 30 days
1
1% of all-time downloads
Jingya/wav2vec2-large-960h-lv60-self-neuronx-ctc
wav2vec2-large-960h-lv60-self-neuronx-ctc is a automatic speech recognition model from Jingya. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as apache-2.0.
This is model is compiled explictly for AWS Neuronx(inferentia 2 / trainium 1) with following codes:
Downloads · 30 days
1
1% of all-time downloads
All-time downloads
112
Public
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.neuron513 MB · 100%
From the Hugging Face model README
This is model is compiled explictly for AWS Neuronx(inferentia 2 / trainium 1) with following codes:
from datasets import load_dataset
from transformers import AutoProcessor
from optimum.neuron import NeuronModelForCTC, 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 = "hf-internal-testing/tiny-random-Wav2Vec2Model"
model_id = "facebook/wav2vec2-large-960h-lv60-self"
processor = AutoProcessor.from_pretrained(model_id)
input_shapes = {"batch_size": 1, "audio_sequence_length": 100000}
compiler_args = {"auto_cast": "matmul", "auto_cast_type": "bf16"}
model = NeuronModelForCTC.from_pretrained(
model_id,
export=True,
disable_neuron_cache=True,
**input_shapes,
**compiler_args,
)
model.save_pretrained("wav2vec2_neuron")