Downloads · 30 days
0
bala-skv/2025121002-anlp-assignment1
2025121002-anlp-assignment1 is a machine learning model from bala-skv. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository contains the pretrained checkpoints for Advanced Natural Language Processing Assignment 1.
Downloads · 30 days
0
Access
Public
Updated Sep 3, 2026
Repo size
150 MB
Likes
1
Public
Click a slice to open those files.
.pt150 MB · 100%
From the Hugging Face model README
This repository contains the pretrained checkpoints for Advanced Natural Language Processing Assignment 1.
hf_models/
├── C1/
│ └── model.pt
├── C2/
│ └── model.pt
├── C3/
│ └── model.pt
├── C4/
│ └── model.pt
└── C5/
└── model.pt
| Configuration | Positional Encoding | Attention | Normalization | Input Processing |
|---|---|---|---|---|
| C1 | Sinusoidal | MHA | LayerNorm | Byte-BPE |
| C2 | RoPE | MHA | LayerNorm | Byte-BPE |
| C3 | Sinusoidal | GQA | LayerNorm | Byte-BPE |
| C4 | Sinusoidal | MHA | RMSNorm | Byte-BPE |
| C5 | Sinusoidal | MHA | LayerNorm | Simplified BLT |
C1–C4 use 8-bit byte grouping followed by BPE source tokenization. C5 uses a token-free byte-level pipeline based on a simplified Byte Latent Transformer (BLT).
d_model): 256d_ff): 10241e-4The final C1–C5 comparison uses 128-byte aligned dataset segmentation.
For C1–C4:
binary ciphertext
↓
group every 8 bits
↓
byte values (0–255)
↓
BPE tokenization
↓
Transformer
The ciphertext/plaintext pairs are aligned. For segmented experiments, each aligned example is divided into 128-byte segments before tokenization.
C5 operates directly on bytes rather than using BPE:
ciphertext bits
↓
8-bit bytes
↓
byte patches
↓
local byte encoder
↓
global Transformer
↓
local byte decoder
↓
predicted bytes
The current implementation uses fixed 8-byte patches. The global Transformer therefore operates on patch representations instead of individual byte positions.
Each model.pt file is a PyTorch checkpoint containing:
import torch
checkpoint = torch.load(
"model.pt",
map_location="cpu",
weights_only=False,
)
print("Configuration:", checkpoint["config"])
print("Validation loss:", checkpoint["val_loss"])
model.load_state_dict(checkpoint["model_state_dict"])
The custom model architecture from the accompanying assignment source code is required to instantiate the model before loading the state dictionary.
Training runs were logged using Weights & Biases.
W&B project:
https://wandb.ai/skv-balasubramanian-iiit-hyderabad/anlp_assignment1
Course: Advanced Natural Language Processing
Assignment: Transformers from Scratch, Architectural Variants, and Byte Latent Transformers (BLT)