Update README.md
Browse files
README.md
CHANGED
|
@@ -53,20 +53,9 @@ This phase covers **60 languages** plus code, with an inverse temperature sampli
|
|
| 53 |
For pre-training, see the ModernBERT repo: https://github.com/AnswerDotAI/ModernBERT
|
| 54 |
|
| 55 |
### Direct Access
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
# Load the streaming dataset
|
| 60 |
-
dataset = StreamingDataset(
|
| 61 |
-
remote='https://huggingface.co/datasets/jhu-clsp/mmbert-pretrain-p1-fineweb2-langs',
|
| 62 |
-
local='/tmp/mmbert-pretraining-data',
|
| 63 |
-
shuffle=True
|
| 64 |
-
)
|
| 65 |
-
|
| 66 |
-
# Access samples
|
| 67 |
-
for sample in dataset:
|
| 68 |
-
text = sample['text']
|
| 69 |
-
# Process your data...
|
| 70 |
```
|
| 71 |
|
| 72 |
|
|
|
|
| 53 |
For pre-training, see the ModernBERT repo: https://github.com/AnswerDotAI/ModernBERT
|
| 54 |
|
| 55 |
### Direct Access
|
| 56 |
+
Use the script at [this link](https://github.com/JHU-CLSP/mmBERT/blob/main/data/online_streaming.py) to load any section of the dataset on the fly. This will fail if you try to access too many samples though, due to HF rate-limiting. To download the full dataset, use HF Hub's [Snapshot Download](https://huggingface.co/docs/huggingface_hub/v1.0.0.rc6/en/package_reference/file_download#huggingface_hub.snapshot_download).
|
| 57 |
+
|
| 58 |
+
# Process your data...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
```
|
| 60 |
|
| 61 |
|