LeNEPA encoder (balanced, encoder-only)

This repository contains an encoder-only LeNEPA checkpoint exported to safetensors for minimal inference.

What is included:

  • lenepa_encoder.safetensors โ€” encoder weights only (no projector, no training/probe state)
  • inference.py โ€” minimal end-to-end inference (no Hydra, no W&B)
  • lenepa_encoder_config.json โ€” fixed IO + architecture contract
  • provenance.json โ€” original .pt checkpoint path + W&B URL

IO contract

Inputs:

  • x_waveform: torch.float32 with shape [B, 1, 5000]
  • sampling frequency: 500 Hz
  • channels: ["I"] (so C=1)

Outputs:

  • patch_tokens: [B, 200, 192] (post-final-norm tokens)
  • embedding: [B, 192] (mean pooled over tokens)

Usage

Smoke test (loads lenepa_encoder.safetensors from the current directory and prints output shapes):

python inference.py

Programmatic usage:

from pathlib import Path

import torch

from inference import encode_lenepa, load_lenepa_encoder

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = load_lenepa_encoder(weights_path=Path("lenepa_encoder.safetensors"), device=device)
x = torch.randn(2, 1, 5000, device=device, dtype=torch.float32)  # [B, C, L]
out = encode_lenepa(model=model, x_waveform=x)
print(out.embedding.shape)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support