Dataset Viewer
Auto-converted to Parquet Duplicate
input_ids
listlengths
84
8.19k
attention_mask
listlengths
84
8.19k
special_tokens_mask
listlengths
84
8.19k
offset_mapping
listlengths
84
8.19k
labels
listlengths
84
8.19k
scope_mask
listlengths
15
15
book_id
stringclasses
217 values
window_index
int64
0
132
[2,235248,244146,246634,238324,109339,237831,238274,35773,238679,238277,122663,238134,245916,238034,(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[0,1],[0,1],[1,2],[2,3],[3,5],[5,6],[6,7],[7,9],[9,10],[10,11],[11,14],[14,15],[15,16],[16,17(...TRUNCATED)
[-100,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,1(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
0
[2,238277,35773,185434,237819,103158,241027,210270,238679,242386,55610,238808,35773,241027,111088,23(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[7427,7428],[7428,7430],[7430,7433],[7433,7434],[7434,7436],[7436,7437],[7437,7440],[7440,744(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
1
[2,238808,35773,237304,241796,238034,152582,237819,238808,190316,240801,238458,55610,238808,109684,2(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[14885,14886],[14886,14888],[14888,14889],[14889,14890],[14890,14891],[14891,14893],[14893,14(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
2
[2,93673,238134,242386,238034,80716,164570,93673,241027,96625,237304,243472,238627,55610,237304,2439(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[22350,22352],[22352,22353],[22353,22354],[22354,22355],[22355,22357],[22357,22360],[22360,22(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
3
[2,242837,238277,55610,103158,238451,241211,237780,49513,80716,241027,190316,237831,49513,185434,238(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[29753,29754],[29754,29755],[29755,29757],[29757,29759],[29759,29760],[29760,29761],[29761,29(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
4
[2,49513,237831,48790,238134,243259,65616,96625,237937,241796,236215,103158,238451,241850,176554,118(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[37353,37355],[37355,37356],[37356,37358],[37358,37359],[37359,37360],[37360,37362],[37362,37(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
5
[2,241501,238458,206087,109339,240801,238277,65616,109684,238134,152582,238451,219468,237304,240789,(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[44770,44771],[44771,44772],[44772,44774],[44774,44776],[44776,44777],[44777,44778],[44778,44(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
6
[2,244296,103158,238808,206087,109339,238134,152582,238451,241211,238547,65616,241317,111066,240268,(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[52295,52296],[52296,52298],[52298,52299],[52299,52301],[52301,52303],[52303,52304],[52304,52(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
7
[2,240268,49513,237831,241198,48790,238451,238277,80716,241317,55610,185434,238547,237831,239791,238(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[59857,59858],[59858,59860],[59860,59861],[59861,59862],[59862,59864],[59864,59865],[59865,59(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
8
[2,237304,240980,55610,238808,220846,238627,65616,96625,237819,238277,35773,238679,65616,152582,2382(...TRUNCATED)
[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1(...TRUNCATED)
[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0(...TRUNCATED)
[[0,0],[67402,67403],[67403,67404],[67404,67406],[67406,67407],[67407,67410],[67410,67411],[67411,67(...TRUNCATED)
[-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100,-100(...TRUNCATED)
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ]
P000012
9
End of preview. Expand in Data Studio

Tibetan Layer Detection — windowed (w8192, step 4916)

Derived data. This is not a new annotation set. It is karma689/layer_detection v1.1 tokenized with a specific mmBERT tokenizer into 8,192-token sliding windows. Regenerate it if the tokenizer, window length, or stride changes. Do not mix windows from different tokenizers or strides in the same training run.

Each row is one window over a Classical Tibetan book, with BIO labels for seven annotation layers (Quotation, Sabche, Tsawa, Yigchung, Chapter, Author, BookTitle). Books never cross split boundaries.

How to load

from datasets import load_dataset

ds = load_dataset("karma689/layer_detection_windowed_w8192_s4916")
print(ds)
# DatasetDict({
#     train: Dataset({ features: [...], num_rows: 6877 }),
#     validation: Dataset({ features: [...], num_rows: 897 }),
#     test: Dataset({ features: [...], num_rows: 1132 }),
# })

Provenance

Field Value
Source dataset karma689/layer_detection
Source revision v1.1 (the start == end clean)
Source tag commit b9576f90b675240a6c59d5d0768afc89735a4bf3
Source data commit ac507313bce467e609d83296a3bcd9243e08a170
Tokenizer files loaded from karma689/mmbert-base-layer-detection-v1.3
Upstream tokenizer (v1.3 training config) jhu-clsp/mmBERT-base
Vocab size 256,000
tokenizer.is_fast True
Combined tokenizer-file sha256 d582312d8c4ccd73ba5a5199026bd161a869503946e488c5e79deb569150469f
Window length (max_length) 8,192
HF tokenizer stride (overlap) 3,276 tokens (39.99%)
Step (max_length − stride) 4,916 (the s4916 in the repo name)
Training configs (v1 / v1.2 / v1.3) yaml stride: 5120 = step 3,072, 62.5% overlap — read from experiments/mmbert_base_v1.3/config.yaml, not assumed
Gold spans split across windows 0
Measured max span 3,095 tokens — P000151 QUOTATION [304112, 308503] (validation)
On-disk size before push 2.300 GiB

The v1.3 checkpoint does ship tokenizer.json / tokenizer_config.json; those files were used. They are not byte-identical to the upstream jhu-clsp/mmBERT-base snapshot, but they share vocab size 256,000 and produced matching encodings on a sample.

Tokenizer file hashes

File sha256
tokenizer.json 609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
tokenizer_config.json 14b147f2a4f939d9b12ab36e9633917040dd948fa78ce283b03402e4cf2c9cba

Why this window / stride

HuggingFace's tokenizer stride is overlap, not step. The call that built this set is:

tokenizer(text, truncation=True, max_length=8192, stride=3276,
          return_overflowing_tokens=True, return_offsets_mapping=True)

That yields step 8192 − 3276 = 4916. The Hub name uses the step.

A gold span appears whole in at least one window iff its length is ≤ overlap. The longest span in this corpus is 3,095 tokens, so the zero-split floor is step ≤ 8192 − 3095 = 5097. Step 4,916 clears that with margin. Do not increase the step past that floor — that starts cutting real spans.

Measured overlap on consecutive full-size windows: 3,276 tokens on 8,632 pairs, 3,277 on 8 pairs (HF overflowing at a token boundary). Never below 3,276.

Window counts

Split Books Windows
train 217 6,877
validation 25 897
test 24 1,132
total 266 8,906

Book membership and split assignment are identical to source v1.1. Seventeen books are shorter than one full window; each produced exactly one window and was not dropped. Shortest: P000052, 84 tokens.

Source spans are inclusive [start, end] (text[start:end+1]), matching layer_detection.training_utils.align_window_labels.

Schema

Each row is one window:

Column Type Description
book_id string OpenPecha book id (e.g. P000012)
window_index int 0-based window within that book
input_ids list[int] Token ids, length ≤ 8,192, not padded
attention_mask list[int] 1 on every position (no padding)
labels list[int] 15-way BIO ids; -100 on specials, empty offsets, and stride-prefix tokens already supervised in an earlier window
scope_mask list[int] Length-15 mask: which label ids this book's in_scope_layers may contribute to the softmax/loss
offset_mapping list[[start, end]] Half-open character offsets per token
special_tokens_mask list[int] 1 on CLS/SEP (and other specials)

scope_mask uses the same confirmed-scope policy as v1.3 training (apply_confirmed_scope): P000010 excludes Quotation, P000100 excludes Tsawa.

BookTitle gold is not replaced with -100 here. Training-time masked_layers remains a training concern.

Overlapped tokens are labelled -100 in every window except the first that covers them (already_covered_through in align_window_labels), so each content token contributes to the loss once.

15-label id → name (v1.3)

id label
0 O
1 B-QUOTE
2 I-QUOTE
3 B-SABCHE
4 I-SABCHE
5 B-TSAWA
6 I-TSAWA
7 B-YIGCHUNG
8 I-YIGCHUNG
9 B-CHAPTER
10 I-CHAPTER
11 B-AUTHOR
12 I-AUTHOR
13 B-BOOKTITLE
14 I-BOOKTITLE

Citation

Cite this derived set, the source book-level dataset, and OpenPecha / Tsadra as the origin of the texts and annotations:

@misc{tibetan_layer_detection_windowed_w8192_s4916,
  title  = {Tibetan Annotation Layer Detection Dataset (windowed, w8192 s4916)},
  author = {karma689},
  year   = {2026},
  url    = {https://huggingface.co/datasets/karma689/layer_detection_windowed_w8192_s4916},
  note   = {Derived from karma689/layer_detection v1.1; tokenizer karma689/mmbert-base-layer-detection-v1.3; source texts and annotations from OpenPecha / Tsadra Foundation}
}
@misc{tibetan_layer_detection,
  title  = {Tibetan Annotation Layer Detection Dataset},
  author = {karma689},
  year   = {2026},
  url    = {https://huggingface.co/datasets/karma689/layer_detection},
  note   = {Source texts and annotations from OpenPecha, built on editions curated with Tsadra Foundation}
}

License

Packaging of this windowed view is released under CC0 1.0 Universal, same as the source dataset's packaging, split, and span clean.

Underlying Tibetan texts and original annotations come from individual OpenPecha-Data repositories; per-book source licenses vary. Check those before redistribution beyond research/training.

Acknowledgements

Texts and original layer annotations were produced through OpenPecha from editions curated with Tsadra Foundation. This repository only tokenizes and windows the already-cleaned v1.1 book-level dataset.

Downloads last month
-