← Walkthrough

src/speech_decoding/models/v14_converged_v3/masking.py

Selected training excerpt · lines 729–737 · source SHA-256 c61bd3660017

729        vpos = valid.reshape(-1).nonzero(as_tuple=True)[0]  # (N,) valid grid positions730        vcontact = geom.gather_idx.reshape(-1)[vpos]  # (N,) permutation of 0..N−1731        unit_of_contact = torch.zeros(n, dtype=torch.long, device=dev)732        unit_of_contact[vcontact] = vpos // c733        slow_m, mid_m, hga_m = _sample_global_iid_band_time(734            n, (t // SLOW_STRIDE, t // MID_STRIDE, t),735            frac=cfg.iid_mask_frac, n_rows=r, unit_of_contact=unit_of_contact,736            generator=generator, device=dev,737        )