A Prime Neural Network (PNN) version of alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech, made on primeneural.net. 146 linear layers are PNN layers at 50 % density: in each layer every output reads a fixed, structured set of inputs, the same number for every output, and no index is stored. Each connection is one bit, its sign, with an FP16 scale per input and per output. Each PNN layer also reads its inputs as one bit (+1 at or above an FP16 threshold per input, -1 below): the layer is XOR and a bit count in the PNN kernel library; the file needs the PNN package V4.4.
| Original model | alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech |
| PNN layers | 146 at 50 % density |
| Agreement with the original model (top-1, held-out data) | 98.09 % |
| Distillation | 20 epochs on openslr/librispeech_asr (least-squares initialisation, hidden-state matching) |
| Model file | 46.3 MB (1-bit weights and activations; dense parts float16) |
AutoModelForAudioClassification.from_pretrained on this repository does not work: PNN layers are not a transformers layer type. pnn_load.py (in the PNN package) builds the original model from alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech, turns the listed layers into PNN layers and loads this file into it. With the PNN kernel library in the package, the PNN layers run on it as on primeneural.net's endpoints -- the weights stay as stored, on the library's CPU or GPU kernels; load(REPO, kernels="off") gives the PyTorch training layers instead (fine-tuning).
# pip install torch huggingface_hub transformers -- and the PNN package (evaluation licence: info@primeneural.net)
import sys, torch
sys.path.insert(0, "<PNN package>") # the package root, where pnn_load.py is
from pnn_load import load
REPO = "PrimeNeural/wav2vec2-large-xlsr-53-gender-recognition-librispeech-pnn-d50-w1a1-j47"
model = load(REPO) # a transformers AutoModelForAudioClassification, ready to use
# tokenizer / processor: the original's, e.g. transformers.AutoTokenizer.from_pretrained("alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech")
This repository holds the model; the loader and the PNN layers come with the PNN package. Its kernel library runs the PNN layers on CPUs and NVIDIA GPUs, and primeneural.net serves this model as an inference endpoint.
The weights are derived from alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech and are distributed under its licence, apache-2.0: see LICENSE.txt in this repository. Its terms apply to this model.
The PNN file format and the PNN package (with its loader pnn_load.py) are © PreciseStatistics GmbH; the PNN package is licensed separately (evaluation licence: info@primeneural.net).
© PreciseStatistics GmbH (Prime Neural Networks) · Patent pending (US 19/685,168).
alefiury/wav2vec2-large-xlsr-53-gender-recognition-librispeech