anlp-a3-mamba

mamba decoder-only sequence model trained for ANLP Monsoon 2026 Assignment 3 (Part A), implemented from scratch in PyTorch (no mamba-ssm / fla).

architecture mamba
parameters 3,964,416
d_model / layers 256 / 9
max sequence length 256
analytic FLOPs / 256-token sequence 2,115,764,224
best validation token accuracy 0.8364
learning rate 0.001
cipher conditioning real

Trained as a prefix LM on [BOS] ciphertext [SEP] plaintext [EOS] with the loss on the plaintext span only.

Trained on the revised dataset (data_new, released 2026-11-11), pairs with len(cipher) + len(plain) <= 253, 200k pairs for 2 epochs.

Note on the task. Deleting the 18 punctuation null symbols aligns ciphertext to plaintext 1:1, and the cipher is a deterministic stream cipher keyed by the plaintext prefix. These ~4M-parameter models decode the first characters of a sequence almost perfectly, but on the test set they recover exactly only plaintexts that also occur in the training set; none decrypts an unseen plaintext in full. See the report for the analysis.

Use

from huggingface_hub import snapshot_download
from part1.hf_utils import load_checkpoint
model, tok, meta = load_checkpoint(snapshot_download("vipenl26/anlp-a3-mamba"), device="cuda")
Downloads last month
72
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support