File size: 1,673 Bytes
fbb0b0b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e78d06d
fbb0b0b
e78d06d
fbb0b0b
e78d06d
fbb0b0b
e78d06d
 
 
fbb0b0b
e78d06d
 
 
fbb0b0b
e78d06d
 
fbb0b0b
e78d06d
 
 
 
 
 
 
 
fbb0b0b
e78d06d
fbb0b0b
e78d06d
fbb0b0b
 
 
 
 
 
64e944a
fbb0b0b
23faace
fbb0b0b
 
23faace
 
 
fbb0b0b
 
 
 
64e944a
fbb0b0b
 
23faace
e78d06d
fbb0b0b
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# OCR-VQA Images — Download, Reassemble, and Place into LibMoE

This guide shows how to download split archives from Hugging Face, merge them into a single ZIP, extract, and place the images into the LibMoE data tree:

```
libmoe/
└── data/
    ├── image_onevision/
    ├── coco/
    │   └── train2017/
    ├── gqa/
    │   └── images/
    ├── ocr_vqa/
    │   └── images/
    ├── textvqa/
    │   └── train_images/
    └── vg/
        ├── VG_100K/
        └── VG_100K_2/
```

> Tested on Linux (bash). Requires ~100 GB free space for download + extraction room.

---


## 1) Download split parts from Hugging Face

Dataset: `DavidNguyen/ocr_vqa`, path: `ocr_vqa/images_part_*.zip.part`

###  Using `curl` directly (works anywhere)

```bash
#!/usr/bin/env bash
set -euo pipefail

DEST=./data/ocr_vqa/ocr_vqa_parts
mkdir -p "$DEST"
cd "$DEST"

# List of parts
PARTS=$(echo a{a..x})        # aa ab ac ... ax

# Download function
download_one() {
  p="$1"
  file="images_part_${p}.zip.part"
  url="https://huggingface.co/datasets/DavidNguyen/ocr_vqa/resolve/main/ocr_vqa/${file}?download=true"
  echo "[*] downloading $file"
  curl -L --fail --retry 5 --retry-delay 3 -o "$file" "$url"
}

export -f download_one

echo "$PARTS" | xargs -n1 -P8 bash -c 'download_one "$@"' _

```

---


## 2) Concatenate parts → a single ZIP

If you already downloaded to `./data/`, the one-liner below (as requested) works:

```bash
mkdir ./data/ocr_vqa
cat ./data/ocr_vqa/images_part_*.zip.part \
  > ./data/ocr_vqa/images.zip
```

---

## 3) Unzip

```bash
cd ./data/ocr_vqa
unzip -q images.zip 

```