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 contractprovenance.jsonโ original.ptcheckpoint path + W&B URL
IO contract
Inputs:
x_waveform:torch.float32with shape[B, 1, 5000]- sampling frequency:
500Hz - channels:
["I"](soC=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)
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐ Ask for provider support