Downloads · 30 days
0
Manas206/anlp-assignment1-models
anlp-assignment1-models is a machine learning model from Manas206. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch.
This repository contains the best-validation checkpoints for five custom encoder-decoder Transformer configurations trained for encrypted binary sequence to plaintext reconstruction. The Transformer components were im…
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Repo size
497 MB
Likes
0
Public
Click a slice to open those files.
.pt497 MB · 100%
From the Hugging Face model README
This repository contains the best-validation checkpoints for five custom
encoder-decoder Transformer configurations trained for encrypted binary
sequence to plaintext reconstruction. The Transformer components were
implemented from basic PyTorch operations rather than nn.Transformer or
nn.MultiheadAttention.
├── C1/
│ ├── model.pt
│ └── config.json
├── C2/
│ ├── model.pt
│ └── config.json
├── C3/
│ ├── model.pt
│ └── config.json
├── C4/
│ ├── model.pt
│ └── config.json
├── C5/
│ ├── model.pt
│ └── config.json
└── tokenizer/
└── merge_rules.json
Each config.json contains the resolved hyperparameters, dataset statistics,
best checkpoint epoch, and final test metrics. All sequence-level test metrics
were computed using greedy decoding from the best-validation checkpoint.
| Config | Positional encoding | Attention | Normalization | Input processing |
|---|---|---|---|---|
| C1 | Sinusoidal | MHA | LayerNorm | Learned binary BPE |
| C2 | RoPE | MHA | LayerNorm | Learned binary BPE |
| C3 | Sinusoidal | GQA | LayerNorm | Learned binary BPE |
| C4 | Sinusoidal | MHA | RMSNorm | Learned binary BPE |
| C5 | Sinusoidal | MHA | LayerNorm | Raw-byte BLT |
C2 is the corrected model in which RoPE is applied independently to Q and K in encoder self-attention, decoder self-attention, and decoder cross-attention.
3e-4, then cosine decay to 1e-5| Config | Bit accuracy | Exact sequence accuracy | Mean Levenshtein | BLEU | ROUGE-1/2/L F1 |
|---|---|---|---|---|---|
| C1 | 66.9379% | 0.20% | 228.092 | 0.247765 | 0.577761 / 0.358195 / 0.566949 |
| C2 | 68.8562% | 0.40% | 143.894 | 0.413740 | 0.677726 / 0.497954 / 0.673646 |
| C3 | 61.8402% | 0.20% | 315.952 | 0.127038 | 0.481853 / 0.230759 / 0.463845 |
| C4 | 64.9490% | 0.20% | 245.870 | 0.226044 | 0.565474 / 0.339020 / 0.554313 |
| C5 | 91.6518% | 0.00% | 103.882 | N/A | N/A |
BLEU and ROUGE apply only to the learned-tokenizer configurations C1-C4.
C1-C4 use the same frozen binary BPE tokenizer stored in
tokenizer/merge_rules.json. It starts from individual binary symbols and uses
1,022 learned variable-length merges. C5 does not use this tokenizer; it uses
raw byte IDs with local BLT patch modules.
These are checkpoints for a custom PyTorch architecture, not Transformers
AutoModel packages. Instantiate the matching configuration using the
assignment source code, then load the state dictionary:
import torch
checkpoint = torch.load("C2/model.pt", map_location="cpu", weights_only=False)
config = checkpoint["config"]
# Construct the corresponding custom model using config, then:
model.load_state_dict(checkpoint["model_state_dict"])
model.eval()
The checkpoint also includes the optimizer state, selected epoch, validation metrics, and resolved configuration.