alt.freeweights.embed / encodec_48khz
From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.embedSubject:

encodec_48khz

Date: 2026-11-15Commit: c3def8eSigned: 2DC28CC7B26A283B ✓

Feature extraction model with 19M parameters. Safetensors weights, 153 MB in all. Published by facebook under MIT.

19M params153MBencodec_48khzsafetensorspermissive
FactsParams19MSize153 MBFormatssafetensorsTaskfeature extractionLicenseMITFrom sourcepermissive
$ fw get facebook/encodec_48khz
# manifest sha256 1f94d7a88210… · 153 MB · 6 files
$ fw verify ./encodec_48khz facebook/encodec_48khz
From sourceHosted (signed)facebook/encodec_48khzLast check: 2026-11-15 03:21 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Works with

Evaluate with

Overview

Size
153 MB
Weights
76.3 MB (safetensors)
Parameters
19M
Formats
safetensors
Task
feature extraction
License
MIT (permissive)
Files
6, each with a sha256
Publisher
facebook
Added
2026-11-15
Section
alt.freeweights.embed
Lineage

Original release from the publisher.

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 03:21 UTCpassed

Model card

From the publisher at commit c3def8e. Shown as plain text with links; images open at the publisher.

Image: encodec image

Model Card for EnCodec#

This model card provides details and information about EnCodec, a state-of-the-art real-time audio codec developed by Meta AI.

Model Details#

Model Description#

EnCodec is a high-fidelity audio codec leveraging neural networks. It introduces a streaming encoder-decoder architecture with quantized latent space, trained in an end-to-end fashion. The model simplifies and speeds up training using a single multiscale spectrogram adversary that efficiently reduces artifacts and produces high-quality samples. It also includes a novel loss balancer mechanism that stabilizes training by decoupling the choice of hyperparameters from the typical scale of the loss. Additionally, lightweight Transformer models are used to further compress the obtained representation while maintaining real-time performance.

  • Developed by: Meta AI
  • Model type: Audio Codec
Model Sources#

Uses#

Direct Use#

EnCodec can be used directly as an audio codec for real-time compression and decompression of audio signals. It provides high-quality audio compression and efficient decoding. The model was trained on various bandwiths, which can be specified when encoding (compressing) and decoding (decompressing). Two different setup exist for EnCodec:

  • Non-streamable: the input audio is split into chunks of 1 seconds, with an overlap of 10 ms, which are then encoded.
  • Streamable: weight normalizationis used on the convolution layers, and the input is not split into chunks but rather padded on the left.
Downstream Use#

EnCodec can be fine-tuned for specific audio tasks or integrated into larger audio processing pipelines for applications such as speech generation, music generation, or text to speech tasks.

[More Information Needed]

How to Get Started with the Model#

Use the following code to get started with the EnCodec model using a dummy example from the LibriSpeech dataset (~9MB). First, install the required Python packages:

pip install --upgrade pip
pip install --upgrade datasets[audio]
pip install git+https://github.com/huggingface/transformers.git@main

Then load an audio sample, and run a forward pass of the model:

from datasets import load_dataset, Audio
from transformers import EncodecModel, AutoProcessor


# load a demonstration datasets
librispeech_dummy = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")

# load the model + processor (for pre-processing the audio)
model = EncodecModel.from_pretrained("facebook/encodec_48khz")
processor = AutoProcessor.from_pretrained("facebook/encodec_48khz")

# cast the audio data to the correct sampling rate for the model
librispeech_dummy = librispeech_dummy.cast_column("audio", Audio(sampling_rate=processor.sampling_rate))
audio_sample = librispeech_dummy[0]["audio"]["array"]

# pre-process the inputs
inputs = processor(raw_audio=audio_sample, sampling_rate=processor.sampling_rate, return_tensors="pt")

# explicitly encode then decode the audio inputs
encoder_outputs = model.encode(inputs["input_values"], inputs["padding_mask"])
audio_values = model.decode(encoder_outputs.audio_codes, encoder_outputs.audio_scales, inputs["padding_mask"])[0]

# or the equivalent with a forward pass
audio_values = model(inputs["input_values"], inputs["padding_mask"]).audio_values

Training Details#

The model was trained for 300 epochs, with one epoch being 2,000 updates with the Adam optimizer with a batch size of 64 examples of 1 second each, a learning rate of 3 · 10−4 , β1 = 0.5, and β2 = 0.9. All the models are traind using 8 A100 GPUs.

Training Data#

They used four different training strategies to sample for these datasets:

  • (s1) sample a single source from Jamendo with probability 0.32;
  • (s2) sample a single source from the other datasets with the same probability;
  • (s3) mix two sources from all datasets with a probability of 0.24;
  • (s4) mix three sources from all datasets except music with a probability of 0.12.

The audio is normalized by file and a random gain between -10 and 6 dB id applied.

Evaluation#

Subjectif metric for restoration:#

This models was evalutated using the MUSHRA protocol (Series, 2014), using both a hidden reference and a low anchor. Annotators were recruited using a crowd-sourcing platform, in which they were asked to rate the perceptual quality of the provided samples in a range between 1 to 100. They randomly select 50 samples of 5 seconds from each category of the the test set and force at least 10 annotations per samples. To filter noisy annotations and outliers we remove annotators who rate the reference recordings less then 90 in at least 20% of the cases, or rate the low-anchor recording above 80 more than 50% of the time.

Objective metric for restoration:#

The ViSQOL()ink) metric was used together with the Scale-Invariant Signal-to-Noise Ration (SI-SNR) (Luo & Mesgarani, 2019; Nachmani et al., 2020; Chazan et al., 2021).

Results#

The results of the evaluation demonstrate the superiority of EnCodec compared to the baselines across different bandwidths (1.5, 3, 6, and 12 kbps).

When comparing EnCodec with the baselines at the same bandwidth, EnCodec consistently outperforms them in terms of MUSHRA score. Notably, EnCodec achieves better performance, on average, at 3 kbps compared to Lyra-v2 at 6 kbps and Opus at 12 kbps. Additionally, by incorporating the language model over the codes, it is possible to achieve a bandwidth reduction of approximately 25-40%. For example, the bandwidth of the 3 kbps model can be reduced to 1.9 kbps.

Summary#

EnCodec is a state-of-the-art real-time neural audio compression model that excels in producing high-fidelity audio samples at various sample rates and bandwidths. The model's performance was evaluated across different settings, ranging from 24kHz monophonic at 1.5 kbps to 48kHz stereophonic, showcasing both subjective and objective results. Notably, EnCodec incorporates a novel spectrogram-only adversarial loss, effectively reducing artifacts and enhancing sample quality. Training stability and interpretability were further enhanced through the introduction of a gradient balancer for the loss weights. Additionally, the study demonstrated that a compact Transformer model can be employed to achieve an additional bandwidth reduction of up to 40% without compromising quality, particularly in applications where low latency is not critical (e.g., music streaming).

Citation#

BibTeX:

@misc{défossez2022high,
      title={High Fidelity Neural Audio Compression}, 
      author={Alexandre Défossez and Jade Copet and Gabriel Synnaeve and Yossi Adi},
      year={2022},
      eprint={2210.13438},
      archivePrefix={arXiv},
      primaryClass={eess.AS}
}

Files

6 files · 153 MBWeights 76.3 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 6 files with their sha256
FileSizesha256
.gitattributes1.48 KBdb7c0371f46f0840b8f25794c1e3321c9b5820a8cb6ba9694a46fc64b8fae5a6
README.md8.30 KBe9f653ec649257de80305592b9447778dcce4cf2430e2379ee5e4919bc065150
config.json803 B4a914ed15ed5a69e19932d05b0c51f2d22c68ffac70e959a757594cb0cd6e2a7
model.safetensors76.3 MB47a15ffbaf7bb76176d0833e10590de0a8988a7848748608cefc36a1c88adfdc
preprocessor_config.json231 Bdf1268bac588b486545baa1d0b6c9c32366c817efbd113158b4c2ef74f6eefeb
pytorch_model.bin76.3 MB0a6bd2506e38ec181c7aa65ef8314d7165fe8fac131c213bb1ad9b6ab4505232
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
c3def8e718 pinned now2026-11-15 03:21 UTC6 files · 153 MB

Use it

$ fw get facebook/encodec_48khz
# manifest sha256 1f94d7a88210… · 153 MB · 6 files
$ fw verify ./encodec_48khz facebook/encodec_48khz
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/facebook/encodec_48khz.json --dir ./encodec_48khz $ python3 fw.py verify ./encodec_48khz ./facebook__encodec_48khz.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/encodec_48khz --revision c3def8e7185ac8c8efdce6eb8c4a651e487a503e --local-dir ./encodec_48khz
transformersLoad the weights in Python.
import os os.environ["HF_ENDPOINT"] = "https://freeweights.allternit.com" from transformers import AutoModel, AutoTokenizer tok = AutoTokenizer.from_pretrained("facebook/encodec_48khz", revision="c3def8e7185ac8c8efdce6eb8c4a651e487a503e") model = AutoModel.from_pretrained("facebook/encodec_48khz", revision="c3def8e7185ac8c8efdce6eb8c4a651e487a503e", device_map="auto")

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
e9f653ec649257de80305592b9447778dcce4cf2430e2379ee5e4919bc065150
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: facebook <huggingface.co/facebook>Newsgroups: alt.freeweights.embedSubject: encodec_48khzDate: 2026-11-15Commit: c3def8eSigned: 2DC28CC7B26A283B ✓
Upstream
facebook/encodec_48khz
Pinned commit
c3def8e7185ac8c8efdce6eb8c4a651e487a503e
Manifest
encodec_48khz.json · .minisig
Manifest sha256
1f94d7a88210fc305324e338f7837f0994e314d034ced935ca696df3ff62d013
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:21 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/facebook/encodec_48khz.json $ curl -O https://freeweights.allternit.com/manifests/facebook/encodec_48khz.json.minisig $ minisign -Vm encodec_48khz.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

No related models in this catalog.Nothing here lists this model as its parent, and it names no parent.
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download facebook/encodec_48khz
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. encodec_48khz.json. Provenance. Takedown history: none.
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-MiniLM-L6-v1
From: unsloth <huggingface.co/unsloth>Subject: all-MiniLM-L6-v2
From: mlx-community <huggingface.co/mlx-community>Subject: all-MiniLM-L6-v2-4bit
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: all-mpnet-base-v1
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: allenai-specter
From: sentence-transformers <huggingface.co/sentence-transformers>Subject: bert-base-nli-max-tokens