{"id":19382852,"url":"https://github.com/locuslab/scaling_laws_data_filtering","last_synced_at":"2025-04-23T20:32:29.951Z","repository":{"id":232464295,"uuid":"784362325","full_name":"locuslab/scaling_laws_data_filtering","owner":"locuslab","description":null,"archived":false,"fork":false,"pushed_at":"2024-04-09T20:18:16.000Z","size":13,"stargazers_count":64,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T20:11:24.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locuslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-09T17:43:44.000Z","updated_at":"2024-10-31T08:32:53.000Z","dependencies_parsed_at":"2024-04-10T00:28:01.437Z","dependency_job_id":"20e440a9-16df-495f-b1de-ef95b92f0998","html_url":"https://github.com/locuslab/scaling_laws_data_filtering","commit_stats":null,"previous_names":["locuslab/scaling_laws_data_filtering"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fscaling_laws_data_filtering","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fscaling_laws_data_filtering/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fscaling_laws_data_filtering/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locuslab%2Fscaling_laws_data_filtering/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locuslab","download_url":"https://codeload.github.com/locuslab/scaling_laws_data_filtering/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250509865,"owners_count":21442514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T09:23:35.650Z","updated_at":"2025-04-23T20:32:29.656Z","avatar_url":"https://github.com/locuslab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Scaling Laws for Data Filtering\n\n### Registering data buckets\n\nThe buckets should be registered in the following file: `all_paths_128.py`\nThis file contains the following information:\n- `path`: The path to the data file that has the evaluation results for a model trained on that dataset.\n- `samples_per_epoch_dict`: The number of samples per epoch for the corresponding dataset.\n- `match_with_dict`: This tells us if the evaluation is done at a fixed epoch interval, or a fixed sample interval.\n- `subsample_every_dict`: In case you want to take the average of every `k` evaluations. This is usually only useful when the evaluation is done at a fixed sample interval.\n\n### Estimating data bucket parameters\n\nThis step involves estimating the scaling parameters for each bucket of interest. \n\n\n### Grid search to find the bucket scaling parameters\n\nGrid search is performed to find the best scaling parameters for each bucket. The grid search is performed using the following file: `grid_search.py`. The objective minimized in the grid search is defined in `objective.py`. We chose grid search because the of instabilities observed in scipy based optimization methods.\n\n\n### Objective Functions\n\nThis file implements scaling laws based on FADU, and also those inspired from work on Scaling Data Constrained Language Models.\n\n- `func_effective_utility`: This is the function that uses the effective utility formulation as proposed in our work. \n- `func_effective_data`: This is the function that uses the formulation of effective data from Scaling Data Constrained Language Models. \n\n```\npython process_128_grid.py --a_upper 0.02 --objective effective_utility  --d 0.1\n```\nHere `a_upper` is used to give an upper limit to the grid search for `a`, and `d` is the irreducibile loss. Refer to `ablations/finding_a.py` if you want to jointly minimize `a` across the pools.\nCopy the obtained scaling parameters to the `results/parameter_values.py` file, and give an appropriate key name.\n\n### Finding best bucket combination\n```\npython estimate_best_pool.py --key given_key_name\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fscaling_laws_data_filtering","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocuslab%2Fscaling_laws_data_filtering","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocuslab%2Fscaling_laws_data_filtering/lists"}