Views
No views yet
safetensors for minimal inference.pretrain/CAUKER2M_L5000_LENEPA_SIGREGT2p5_L0-8_PD0_PROJ_LR2x_MSSE_PATCHNORM_D256_OPTOYTSBCBAL_s0_UCRinterp5000_CONT200K_LOCAL/chkpt_220000.pt,
continued from the base W&B-tracked run recorded in provenance.json.lenepa_encoder.safetensors - encoder weights only (no projector, no training/probe state)inference.py - minimal end-to-end inference (no Hydra, no W&B, no repo dependency)lenepa_encoder_config.json - fixed IO + architecture contractprovenance.json - original .pt checkpoint path + W&B URLx_waveform: torch.float32 with shape [B, 1, 5000]1["c0"]conv_patch_embed with patch_size=8patch_tokens: [B, 625, 256] (post-final-norm tokens)embedding: [B, 256] (mean pooled over tokens)inference.py expects x_waveform.shape == [B, 1, 5000] and does not resample internally.5000 or you just if it works better without resampling:1from pathlib import Path
2
3import torch
4
5from inference import encode_lenepa, load_lenepa_encoder
6
7device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
8model = load_lenepa_encoder(weights_path=Path("lenepa_encoder.safetensors"), device=device)
9
10x = torch.randn(2, 1, 5000, device=device, dtype=torch.float32) # [B, C, L=5000]
11out = encode_lenepa(model=model, x_waveform=x)
12print(out.patch_tokens.shape)50005000 generates noticably better classification quality:1from pathlib import Path
2
3import torch
4from torch.nn import functional as F
5
6from inference import encode_lenepa, load_lenepa_encoder
7
8device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
9model = load_lenepa_encoder(weights_path=Path("lenepa_encoder.safetensors"), device=device)
10
11x_raw = torch.randn(2, 1, 137, device=device, dtype=torch.float32) # [B, C, L_raw]
12x = F.interpolate(x_raw, size=5000, mode="linear", align_corners=False) # [B, C, 5000]
13out = encode_lenepa(model=model, x_waveform=x)
14print(out.embedding.shape)lenepa_encoder.safetensors from the current directory and prints output shapes):python inference.py1from pathlib import Path
2
3import torch
4from torch.nn import functional as F
5
6from inference import encode_lenepa, load_lenepa_encoder
7
8device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
9model = load_lenepa_encoder(weights_path=Path("lenepa_encoder.safetensors"), device=device)
10x_raw = torch.randn(2, 1, 137, device=device, dtype=torch.float32) # [B, C, L_raw]
11x = F.interpolate(x_raw, size=5000, mode="linear", align_corners=False) # [B, C, 5000]
12out = encode_lenepa(model=model, x_waveform=x)
13print(out.embedding.shape)