All models

EEG reconstruction · Five profiles

ZUNA · Core ML

Five profiles, each checked against the original.

The original ZUNA reconstruction model as five enumerated Core ML profiles, from a 14-channel EPOC X layout to 64 channels.

Open on Hugging Face
Upstream
Zyphra ZUNA · 380M
Profiles
14, 16, 32, 64 channels
Precision
fp16, plus a 64-channel fp32 reference
Parity
20-step diffusion vs PyTorch
License
Apache-2.0
Updated
18 Aug 2026

Overview

ZUNA is Zyphra’s 380M-parameter masked diffusion autoencoder, trained on roughly two million channel-hours of public EEG. From a subset of channels and their positions it denoises, fills in dropped channels, and predicts new ones.

This release converts it into enumerated Core ML profiles, one fixed shape per channel count, so an app picks the profile that matches its headset.

Fig. 01 · Illustration

Fourteen electrodes, three missing

ZUNA takes the channels that were recorded, with their 3D positions, and estimates the ones that were not by iterative denoising.

5 cmTop view · t = 3.53 s

Denoising step 20/20
F3measured
F4estimated
T7estimated
P8measured
O2estimated

Seconds · synthetic, not recorded EEG

The head is the FreeSurfer fsaverage average scalp, seen from above and drawn to scale, with the real EPOC X electrode positions (MNE standard_1005). Traces and scalp field are synthetic, drawn to show the task: not recorded EEG and not model output. The field is a spherical-spline interpolation at one instant, t = 3.53 s, chosen for illustration. The green discs around T7, F4 and O2 are a drawing convention for emphasis, not the model’s region of influence.

Profiles and parity

Every published profile was run against the original PyTorch weights for a 20-step diffusion loop and gated on the relative L2 error of the final latent. Lower-channel fp16 profiles are best for quick mobile validation; the fp32 profile is a high-fidelity reference.

Fig. 02 · Parity

Every profile, gated against PyTorch

Relative L2 error of the final latent after a 20-step diffusion loop, on a log scale. Lower is better.

14ch-fp16560 tokens · [1, 560, 32]

0.011380Pass

16ch-fp16640 tokens · [1, 640, 32]

0.006580Pass

32ch-fp161,280 tokens · [1, 1280, 32]

0.005629Pass

64ch-fp162,560 tokens · [1, 2560, 32]

0.004366Pass

64ch-fp322,560 tokens · [1, 2560, 32]

0.000002Pass

Source: the ZUNA Core ML model card, Validation.
View as table
ProfileMAERelative L2GateResult
14ch-fp160.0062580.0113800.012Pass
16ch-fp160.0048430.0065800.010Pass
32ch-fp160.0041890.0056290.010Pass
64ch-fp160.0032650.0043660.010Pass
64ch-fp320.0000010.0000020.005Pass

How it works

Fig. 03 · Inference

Encode once, denoise N times

Diagram of ZUNA inference, drawn for the 14-channel EPOC X profile. A five-second EEG window of C channels at 256 Hz, 1,280 samples per channel, in which T7, O2 and F4 were not recorded, is cut into tokens of 32 samples, 40 per channel, shape [1, C·40, 32]: 560 tokens for 14 channels. Each token carries an index, tok_idx = {x, y, z, t}: its electrode position in metres and its place in time; the tokens of the missing channels are masked and keep only their positions. The ZunaEncoder Core ML package encodes the tokens once, and its encoding is reused at every step. The ZunaDecoderStep package performs one denoising step on the latent z and returns v; the host applies the Euler update z ← z − dt·v; the new z goes back into the step, N times. ZunaDecoderStepUpdate folds the step and the update into one call. The parity checks use 20 steps. The final z is turned back into a [C, 1280] signal: measured channels denoised, missing channels estimated. Traces are synthetic.

01

EEG window

[C, 1280]

C channels × 1,280 samples: five seconds at 256 Hz. Drawn for the 14-channel EPOC X profile, with T7, O2 and F4 not recorded.

Tokenizeevery 32 samples

02

Tokens

[1, C·40, 32]

Forty tokens of 32 samples per channel; 560 for 14 channels. Each carries tok_idx = {x, y, z, t}. The rows of T7, O2 and F4 are masked: position only.

AF3 · token 12 of 40

values
32 samples, 1.375–1.500 s
x, y, z · position
AF3: −0.034, 0.077, 0.021 m
t
12 of 40 in time

Tokens + tok_idx

03

Encode once, denoise N times

The encoder reads the tokens once. The decoder then denoises a latent z, one step per call. N is the host’s choice; the parity checks use 20.

ZunaDecoderStepUpdate · both in one call
Core MLZunaEncoderruns once per window
encodingreused each step
Core MLZunaDecoderStepone denoising step
v
Hostz ← z − dt·vEuler update
zlatent, refined each step
× Nsteps

ZunaDecoderStepUpdate folds the step and the update into one call.

Back to samplesz after N steps

04

Signal

[C, 1280]

z after N steps, back in samples: measured channels denoised; T7, O2 and F4 estimated from their positions.

measured, denoisedestimated

Electrode names and positions are the real EPOC X layout (MNE standard_1005). Traces are synthetic, drawn to show the task. Throughput depends strongly on N: fewer steps are faster and coarser.
PackageRole
ZunaEncoderEncodes the tokenized EEG context, once
ZunaDecoderStepOne denoising step of the diffusion loop
ZunaDecoderStepUpdateA decoder step plus the Euler update, z ← z − dt · v, for a minimal host loop

Input contract

Sampling rate
256 Hz
Window
5 seconds, 1,280 samples
Tokens
40 per channel; tok_idx = {x, y, z, t}
Positions
3D electrode coordinates are required
Normalization
data_norm = 10, as upstream

Know the boundaries

  • Throughput depends strongly on the number of diffusion steps; fewer steps are faster and coarser.
  • Reconstructed channels are estimates, not measurements.
  • Research and engineering use only; not validated for medical diagnosis, treatment, or clinical decisions.

About this page

Summarized from the public model card and its published files. Repository updated 18 Aug 2026; reviewed 26 Sep 2026. The Hugging Face card is the source of truth for licenses and current details.

Upstream: Zyphra / ZUNA