pszemraj commited on
Commit
a855894
1 Parent(s): 787549f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +34 -1
README.md CHANGED
@@ -23,4 +23,37 @@ dataset_info:
23
  ---
24
  # Dataset Card for "open-web-math-minhash"
25
 
26
- [More Information needed](https://github.com/huggingface/datasets/blob/main/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  ---
24
  # Dataset Card for "open-web-math-minhash"
25
 
26
+
27
+ ## making of
28
+
29
+ On a high-RAM colab TPU (40 cores)
30
+
31
+ ```python
32
+ from pathlib import Path
33
+ from tqdm.auto import tqdm
34
+
35
+ data_split = 'train'
36
+ text_column = 'text'
37
+
38
+ out_dir = Path(f"output/minhash/{ds_short_name}/{data_split}")
39
+ !mkdir -p $out_dir
40
+
41
+
42
+ ds_name = "open-web-math/open-web-math"
43
+ dataset_config = str(dataset_config)
44
+
45
+ !python -m text_dedup.minhash \
46
+ --path $ds_name \
47
+ --name $dataset_config \
48
+ --split $data_split \
49
+ --cache_dir "./cache" \
50
+ --output $out_dir \
51
+ --column $text_column \
52
+ --ngram 5 --threshold 0.5 \
53
+ --hash_func xxh3 --hash_bits 16 --num_perm 64 \
54
+ --batch_size 10000
55
+
56
+ print(f"output dir is:\n\t{out_dir}")
57
+ !ls $out_dir
58
+ ```
59
+