| | --- |
| | language: |
| | - en |
| | license: apache-2.0 |
| | task_categories: |
| | - text-classification |
| | tags: |
| | - binary-analysis |
| | - file-type-detection |
| | - mime-type |
| | - magic-bytes |
| | - cybersecurity |
| | size_categories: |
| | - 10K<n<100K |
| | --- |
| | |
| | # Magic-BERT Binary File Classification Dataset |
| |
|
| | This dataset contains tokenized binary file samples for training MIME type classification models. |
| | Each sample is a 64KB chunk from the beginning of a file, tokenized using a byte-level BPE tokenizer. |
| |
|
| | ## Dataset Description |
| |
|
| | - **Total Samples:** 46,450 |
| | - **Number of Classes:** 125 |
| | - **Sequence Length:** 999999 |
| | - **Vocabulary Size:** 32,768 |
| |
|
| | ### Splits |
| |
|
| | | Split | Samples | |
| | |-------|---------| |
| | | Train | 37,111 | |
| | | Validation | 4,591 | |
| | | Test | 4,748 | |
| |
|
| | ## Features |
| |
|
| | Each sample contains: |
| |
|
| | | Feature | Type | Description | |
| | |---------|------|-------------| |
| | | `blake2b` | string | Content hash (unique sample ID) | |
| | | `mime_type` | string | MIME type label | |
| | | `source_path` | string | Original file path | |
| | | `source_root` | string | Dataset source | |
| | | `extension` | string | File extension | |
| | | `source_size_bytes` | int64 | Original file size | |
| | | `sample_bytes` | int32 | Sample size (max 64KB) | |
| | | `tokens` | List[int32] | Tokenized input (999999 tokens) | |
| |
|
| | ## MIME Type Distribution (Top 20) |
| |
|
| | | MIME Type | Count | Percentage | |
| | |-----------|-------|------------| |
| | | application/octet-stream | 2,000 | 4.3% | |
| | | application/vnd.ms-powerpoint | 2,000 | 4.3% | |
| | | audio/flac | 2,000 | 4.3% | |
| | | text/x-c | 2,000 | 4.3% | |
| | | text/plain | 1,999 | 4.3% | |
| | | image/png | 1,964 | 4.2% | |
| | | application/gzip | 1,574 | 3.4% | |
| | | image/svg+xml | 1,486 | 3.2% | |
| | | text/html | 1,454 | 3.1% | |
| | | application/vnd.ms-excel | 1,380 | 3.0% | |
| | | application/javascript | 1,340 | 2.9% | |
| | | application/x-7z-compressed | 1,200 | 2.6% | |
| | | image/gif | 1,156 | 2.5% | |
| | | text/csv | 1,128 | 2.4% | |
| | | image/webp | 1,014 | 2.2% | |
| | | application/zlib | 987 | 2.1% | |
| | | text/x-lisp | 980 | 2.1% | |
| | | application/x-gettext-translation | 965 | 2.1% | |
| | | text/x-c++ | 800 | 1.7% | |
| | | application/zstd | 781 | 1.7% | |
| |
|
| |
|