Datasets:
Formats:
parquet
Languages:
English
Size:
10K - 100K
ArXiv:
Tags:
long-context
biography
factuality
hallucination-detection
uncertainty-estimation
token-level-annotations
License:
| """Minimal streaming example for Saria307/biosum-cuh activations.""" | |
| import numpy as np | |
| from datasets import load_dataset | |
| stream = load_dataset( | |
| "Saria307/biosum-cuh", | |
| "activations", | |
| split="train", | |
| streaming=True, | |
| ) | |
| row = next(iter(stream)) | |
| length = row["length"] | |
| attn_act = np.asarray(row["attn_act"], dtype=np.float32)[:length] | |
| logit_margin = np.asarray(row["logit_margin"], dtype=np.float32)[:length] | |
| logit_topk = np.asarray(row["logit_topk"], dtype=np.float32)[:length] | |
| labels = np.asarray(row["labels"], dtype=np.int64) | |
| assert attn_act.shape == (length, 4096) | |
| assert logit_margin.shape == (length, 1) | |
| assert logit_topk.shape == (length, 50) | |
| assert labels.shape == (length,) | |
| print(row["activation_id"], row["source_train_index"], length) | |