Download config/textclassifier_bad_pdfs.yaml from mlfoundations-dev/textclassifier_bad_pdfs: direct link, hf CLI and curl.
- Browser
- Download file 2.14 kB
-
https://huggingface.co/datasets/mlfoundations-dev/textclassifier_bad_pdfs/resolve/main/config/textclassifier_bad_pdfs.yaml
- Command line
-
hf download hf://datasets/mlfoundations-dev/textclassifier_bad_pdfs/config/textclassifier_bad_pdfs.yaml
-
curl -L -o textclassifier_bad_pdfs.yaml https://huggingface.co/datasets/mlfoundations-dev/textclassifier_bad_pdfs/resolve/main/config/textclassifier_bad_pdfs.yaml
2.14 kB
| operators: | |
| - id: create_urls | |
| config: | |
| type: function | |
| function: data_strategies.32b_exploit.seed_pdf_parser.utils.download_digital_corpora | |
| function_config: | |
| urls: | |
| - "https://digitalcorpora.s3.amazonaws.com/corpora/files/CC-MAIN-2021-31-PDF-UNTRUNCATED/zipfiles/0000-0999/0000.zip" | |
| - id: reduce_to_sample_pages_for_annotation | |
| config: | |
| type: function | |
| function: data_strategies.32b_exploit.seed_pdf_parser.utils.sub_sample_page_per_url | |
| input_ids: | |
| - create_urls | |
| - id: filter_qa_pdfs | |
| config: | |
| type: completions | |
| model: gpt-4o-mini | |
| map: binary_classifier | |
| map_config: | |
| user_message: | | |
| Yes or No, given the sample of pages from the pdf below, will the PDF include questions involving Math, Science, or Code? Specifically we are interested in if this pdf is a textbook, solutions manual, competition exam, test, study guide, etc. such that questions like the example given may be found in the full PDF. | |
| Example question: | |
| Find the integrals: (a) ∫ sinh² x cosh² x dx; (b) ∫ dx sinh x cosh x. Find the integral ∫ sinh² x cosh² x dx. | |
| The example is math, but we are interested in science, math, and coding questions. | |
| Sampled PDF text: | |
| {{sampled_pdf_text}} | |
| output_column: contains_math_sci_code_content | |
| temperature: 0.0 # From stage 1 | |
| top_p: 1.0 | |
| presence_penalty: 0.0 | |
| input_ids: | |
| - reduce_to_sample_pages_for_annotation | |
| - id: filter_out_good_pdfs | |
| config: | |
| type: function | |
| function: data_strategies.commons.select_rows | |
| function_config: | |
| conditions: | |
| contains_math_sci_code_content: False | |
| input_ids: | |
| - filter_qa_pdfs | |
| - id: filter_original_pages | |
| config: | |
| type: function | |
| function: data_strategies.32b_exploit.seed_pdf_parser.utils.filter_pdfs_by_page_classification | |
| input_dataset_map: | |
| dataset_with_pages: create_urls | |
| dataset_of_filtered_pdfs: filter_out_good_pdfs | |
| input_ids: | |
| - create_urls | |
| - filter_out_good_pdfs |