Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,90 @@
|
|
1 |
---
|
2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: apache-2.0
|
3 |
+
task_categories:
|
4 |
+
- image-to-text
|
5 |
+
- visual-question-answering
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
tags:
|
9 |
+
- data-juicer
|
10 |
+
- pretraining
|
11 |
+
- multimodal
|
12 |
+
size_categories:
|
13 |
+
- 100K<n<1M
|
14 |
---
|
15 |
+
|
16 |
+
# LLaVA pretrain -- LCS-558k (refined by Data-Juicer)
|
17 |
+
|
18 |
+
A refined version of LLaVA pretrain dataset (LCS-558k) by [Data-Juicer](https://github.com/alibaba/data-juicer). Removing some "bad" samples from the original dataset to make it higher-quality.
|
19 |
+
|
20 |
+
This dataset is usually used to pretrain a Multimodal Large Language Model.
|
21 |
+
|
22 |
+
**Notice**: Here is a small subset for previewing. The whole dataset is available [here](https://dail-wlcb.oss-cn-wulanchabu.aliyuncs.com/MM_data/our_refined_data/LLaVA-1.5/public/llava-pretrain-refine-result.json) (About 115MB).
|
23 |
+
|
24 |
+
## Dataset Information
|
25 |
+
|
26 |
+
- Number of samples: 500,380 (Keep ~89.65% from the original dataset)
|
27 |
+
|
28 |
+
## Refining Recipe
|
29 |
+
```yaml
|
30 |
+
project_name: 'llava-1.5-pretrain-dataset-refine-recipe'
|
31 |
+
dataset_path: 'blip_laion_cc_sbu_558k_dj_fmt_only_caption.jsonl' # converted LLaVA pretrain dataset in Data-Juicer format with only_keep_caption is True. See tools/multimodal/source_format_to_data_juicer_format/llava_to_dj.py
|
32 |
+
export_path: 'blip_laion_cc_sbu_558k_dj_fmt_only_caption_refined.jsonl'
|
33 |
+
|
34 |
+
np: 42 # number of subprocess to process your dataset
|
35 |
+
text_keys: 'text' # the key name of field where the sample texts to be processed, e.g., `text`, `instruction`, `output`, ...
|
36 |
+
|
37 |
+
# for multimodal data processing
|
38 |
+
image_key: 'images' # Key name of field to store the list of sample image paths.
|
39 |
+
image_special_token: '<image>' # The special token that represents an image in the text. For LLaVA, it's "<image>". Should be aligned with the args when running conversion tools.
|
40 |
+
eoc_special_token: '<|__dj__eoc|>' # The special token that represents the end of a chunk in the text. In default, it's "<|__dj__eoc|>". You can specify your own special token according to your input dataset. Should be aligned with the args when running conversion tools.
|
41 |
+
|
42 |
+
open_tracer: true
|
43 |
+
|
44 |
+
# process schedule: a list of several process operators with their arguments
|
45 |
+
process:
|
46 |
+
- fix_unicode_mapper: # fix unicode errors in text.
|
47 |
+
- punctuation_normalization_mapper: # normalize unicode punctuations to English punctuations.
|
48 |
+
|
49 |
+
# 558128
|
50 |
+
# Filter ops
|
51 |
+
- alphanumeric_filter: #558087 # filter text with alphabet/numeric ratio out of specific range.
|
52 |
+
tokenization: false # Whether to count the ratio of alphanumeric to the total number of tokens.
|
53 |
+
min_ratio: 0.60 # the min ratio of filter range
|
54 |
+
- character_repetition_filter: #546105 # filter text with the character repetition ratio out of specific range
|
55 |
+
rep_len: 10 # repetition length for char-level n-gram
|
56 |
+
max_ratio: 0.09373663 # the max ratio of filter range
|
57 |
+
- flagged_words_filter: #543960 # filter text with the flagged-word ratio larger than a specific max value
|
58 |
+
lang: en # consider flagged words in what language
|
59 |
+
tokenization: false # whether to use model to tokenize documents
|
60 |
+
max_ratio: 0.0 # the max ratio to filter text
|
61 |
+
- perplexity_filter: #532029 # filter text with perplexity score out of specific range
|
62 |
+
lang: en # compute perplexity in what language
|
63 |
+
max_ppl: 14435.5806 # the max perplexity score to filter text
|
64 |
+
- special_characters_filter: #531968 # filter text with special-char ratio out of specific range
|
65 |
+
min_ratio: 0.16534802 # the min ratio of filter range
|
66 |
+
max_ratio: 0.42023757 # the max ratio of filter range
|
67 |
+
- word_repetition_filter: # 530773 # filter text with the word repetition ratio out of specific range
|
68 |
+
lang: en # sample in which language
|
69 |
+
tokenization: false # whether to use model to tokenize documents
|
70 |
+
rep_len: 10 # repetition length for word-level n-gram
|
71 |
+
max_ratio: 0.03085751 # the max ratio of filter range
|
72 |
+
|
73 |
+
- image_aspect_ratio_filter: #542389 # filter samples according to the aspect ratios of images (a fraction of width by height, r=w/h) in them
|
74 |
+
min_ratio: 0.333 # the min aspect ratio of filter range
|
75 |
+
max_ratio: 3.0 # the max aspect ratio of filter range
|
76 |
+
any_or_all: any # keep this sample when any/all images meet the filter condition
|
77 |
+
- image_shape_filter: #533966 # filter samples according to the widths and heights of images in them
|
78 |
+
max_width: 727.8798422276 # the max width of width filter range
|
79 |
+
max_height: 606.2421072264 # the max height of height filter range
|
80 |
+
any_or_all: any # keep this sample when any/all images meet the filter condition
|
81 |
+
- image_size_filter: # 533966 # filter samples according to the size of images (in bytes) within them
|
82 |
+
max_size: "124KB" # the max size of filter range
|
83 |
+
any_or_all: any # keep this sample when any/all images meet the filter condition
|
84 |
+
- image_text_similarity_filter: #544202 # filter samples according to the similarity between text and images.
|
85 |
+
hf_clip: openai/clip-vit-base-patch32 # name of used Hugging Face clip
|
86 |
+
min_score: 0.20315419 # the min similarity of filter range
|
87 |
+
- image_text_matching_filter: # filter samples according to the matching score between image and text.
|
88 |
+
hf_blip: Salesforce/blip-itm-base-coco # name of used Hugging Face blip
|
89 |
+
min_score: 0.44930778 # the min matching score of filter range
|
90 |
+
```
|