The dataset viewer is not available for this dataset.
Error code: ConfigNamesError
Exception: FileNotFoundError
Message: Couldn't find any data file at /src/services/worker/Merlin041/imdb-distilbert-features. Couldn't find 'Merlin041/imdb-distilbert-features' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/Merlin041/imdb-distilbert-features@4dbe48e49b5575f3f4e6b07f3ebeade76d8a22b1/train_feat.npy' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.lance', '.tsfile', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
config_names = get_dataset_config_names(
path=dataset,
token=hf_token,
)
File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
dataset_module = dataset_module_factory(
path,
...<4 lines>...
**download_kwargs,
)
File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1213, in dataset_module_factory
raise FileNotFoundError(
...<2 lines>...
) from None
FileNotFoundError: Couldn't find any data file at /src/services/worker/Merlin041/imdb-distilbert-features. Couldn't find 'Merlin041/imdb-distilbert-features' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/Merlin041/imdb-distilbert-features@4dbe48e49b5575f3f4e6b07f3ebeade76d8a22b1/train_feat.npy' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.lance', '.tsfile', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
IMDb Movie Reviews - DistilBERT Contextual Embedding Cache
This dataset contains pre-extracted contextual embedding features of the standard IMDb Movie Reviews dataset (Sentiment Analysis). The features were extracted using a frozen DistilBERT (distilbert-base-uncased) encoder.
By caching these high-dimensional embeddings, you can train downstream classifiers (like LSTMs, GRUs, Attention heads, or custom Transformers) in seconds on a local GPU or CPU, bypassing the massive computation overhead of running transformer inference on every epoch.
π Dataset Specification
All features are saved as memory-mapped Numpy binary files (.npy), allowing them to be loaded on consumer hardware with low memory footprint via np.memmap.
| File | Shape | Dtype | Size on Disk | Description |
|---|---|---|---|---|
train_feat.npy |
(25000, 128, 768) |
float16 |
4.58 GB | Frozen DistilBERT last-hidden-state embeddings for the IMDb Train Split |
train_mask.npy |
(25000, 128) |
bool |
3.05 MB | Attention mask for the training split |
test_feat.npy |
(25000, 128, 768) |
float16 |
4.58 GB | Frozen DistilBERT last-hidden-state embeddings for the IMDb Test Split |
test_mask.npy |
(25000, 128) |
bool |
3.05 MB | Attention mask for the test split |
Extraction Details
- Base Model:
distilbert-base-uncased(frozen, Hugging Face transformers) - Tokenization: Contextual embeddings extracted from the last hidden state (768 dimensions).
- Sequence Length (
max_len): 128 tokens (truncated/padded). - Precision:
float16(RAM-safe memmap layout).
π Project Benchmarks & Leaderboard
This project involved an iterative design of multiple classification models. Below is the complete leaderboard of all runs, showing that the overall project reached a peak performance of 91.42% Accuracy (SOTA-level for custom LSTMs):
| Version | Model Architecture | Key Techniques | Trainable Params | Best Test Accuracy | Best Test F1 |
|---|---|---|---|---|---|
| v16 | 3-Layer LSTM (Pretrained) | ULMFiT-style LM Pretraining (50K Unsupervised) + Gradual Unfreeze | 8.4M | 91.42% | 91.58% |
| v18 | Bidirectional LM (Pretrained) | Forward+Backward LM pretrain + combined classifier + FGM | - | 91.15% | - |
| v9 | 3-Layer BiLSTM + Attn | Vocab=20K, embed=128, hidden=256, max_len=300 | 12.5M | 90.13% | - |
| v13 | AWD-LSTM + Multi-Head Attn | Variational Dropout + Recurrent Weight Dropout | 12.5M | 90.12% | 90.19% |
| v15 | BiLSTM + MHA + Concat Pool | Adversarial Training (FGM, epsilon=0.5) | 6.2M | 90.12% | 90.18% |
| v17 | DistilBERT (Frozen) + BiLSTM | Contextual Feature Extractor (This Cache) | 4.7M | 86.86% | 86.99% |
| v5 | BiLSTM + Attention | Single-layer LSTM + Dot-product Attention | 1.3M | 88.38% | - |
| v2 | BiLSTM + Grad Clip | Bidirectional + Gradient clipping max_norm=1.0 | 1.3M | 81.39% | 79.86% |
Why v17 (BERT Feature Cache) achieved 86.86%
The feature cache provided here (v17) uses a completely frozen DistilBERT encoder. Because the weights of the DistilBERT model are not fine-tuned on the IMDb reviews (to save GPU memory and prevent overfitting during training), it acts as a general feature extractor. Combined with a BiLSTM + Multi-Head Attention classifier head, it reaches a solid 86.86% Accuracy in less than 45 seconds of training per epoch.
To reach 91%+, language model pre-training (such as in v16 and v18) on the 50,000 unsupervised IMDb reviews, or fully fine-tuning the transformer layers, is required.
π v17 Classifier Training Curves & Confusion Matrix
π Training Curves
π― Confusion Matrix
π οΈ Usage Example
You can load these files directly into PyTorch Dataset using memory mapping, which reads pages dynamically from disk without loading the entire 9.2 GB into RAM:
import numpy as np
import torch
from torch.utils.data import Dataset
class IMDbFeatureDataset(Dataset):
def __init__(self, feat_path, mask_path, labels, seq_len=128, bert_dim=768):
self.labels = labels
self.n = len(labels)
# Load as memory-mapped array (RAM-safe)
self.features = np.memmap(feat_path, dtype=np.float16, mode='r',
shape=(self.n, seq_len, bert_dim))
self.masks = np.memmap(mask_path, dtype=np.bool_, mode='r',
shape=(self.n, seq_len))
def __len__(self):
return self.n
def __getitem__(self, idx):
x = torch.from_numpy(self.features[idx].astype(np.float32)) # Convert to fp32
mask = torch.from_numpy(self.masks[idx])
y = torch.tensor(self.labels[idx], dtype=torch.float32)
return x, mask, y
- Downloads last month
- 35

