SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2410.22587 · 2024

Toxicity of the Commons: Curating Open-Source Pre-Training Data

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 6 functions out of this paper's own repositories and ran 0 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
Pleias/toxic-commons canonical 0 of 6
FunctionStatusWhere it lives
balance_dataset_by_sum Not yet run Pleias/toxic-commons/src/4.2_resample.py
code served (permissive licence) · get_code("5387737a857872b4")
count_sum_based Not yet run Pleias/toxic-commons/src/4.2_resample.py
code served (permissive licence) · get_code("2e3482e90480b6d7")
get_response Not yet run Pleias/toxic-commons/src/2.1_create_annotations.py
code served (permissive licence) · get_code("68a1776789f90465")
parse_scores Not yet run Pleias/toxic-commons/src/2.1_create_annotations.py
code served (permissive licence) · get_code("e33db98fe5baada8")
sample_data Not yet run Pleias/toxic-commons/src/4.1_prepare_data.py
code served (permissive licence) · get_code("65351553ca1db78e")
weighted_accuracy Not yet run Pleias/toxic-commons/src/5_train.py
code served (permissive licence) · get_code("5c4545885712cc7f")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Open-source large language models are becoming increasingly available and popular among researchers and practitioners. While significant progress has been made on open-weight models, open training data is a practice yet to be adopted by the leading open-weight models creators. At the same time, there researchers are working to make language models safer. We propose a data curation pipeline to reduce harmful outputs by models trained on public domain data. There are unique challenges to working with public domain data, as these sources differ from web text in both form and content. Many sources are historical documents and are the result of Optical Character Recognition (OCR). Consequently, current state-of-the-art approaches to toxicity filtering are often infeasible or inappropriate for open data models. In this paper, we introduce a new fully open-source pipeline for open-data toxicity filtering. Our contributions are threefold. We create a custom training dataset, ToxicCommons, which is composed of texts which have been classified across five different dimensions (racial/origin-based, gender/sex-based, religious, ability-based discrimination, and violence). We use this dataset to train a custom classifier, Celadon, that can be used to detect toxic content in open data more efficiently at a larger scale. Finally, we describe the balanced approach to content filtration that optimizes safety filtering with respect to the filtered data available for training.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2410.22587")
get_code_for_paper("2410.22587")
have("2410.22587")

Connect an agent — have() is free.