{"id":16269782,"url":"https://github.com/sea-snell/grokking","last_synced_at":"2025-10-02T20:30:28.684Z","repository":{"id":77939181,"uuid":"428937397","full_name":"Sea-Snell/grokking","owner":"Sea-Snell","description":"unofficial re-implementation of \"Grokking: Generalization Beyond Overfitting on Small Algorithmic Datasets\"","archived":false,"fork":false,"pushed_at":"2022-07-04T14:18:07.000Z","size":1912,"stargazers_count":66,"open_issues_count":0,"forks_count":14,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-12T21:33:24.426Z","etag":null,"topics":["artificial-intelligence","deep-learning","grokking","neural-network","python","pytorch","transformer","transformer-models"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Sea-Snell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2021-11-17T06:45:01.000Z","updated_at":"2024-12-27T07:08:16.000Z","dependencies_parsed_at":"2023-03-03T16:15:21.760Z","dependency_job_id":null,"html_url":"https://github.com/Sea-Snell/grokking","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sea-Snell%2Fgrokking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sea-Snell%2Fgrokking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sea-Snell%2Fgrokking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sea-Snell%2Fgrokking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sea-Snell","download_url":"https://codeload.github.com/Sea-Snell/grokking/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235039170,"owners_count":18926302,"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":["artificial-intelligence","deep-learning","grokking","neural-network","python","pytorch","transformer","transformer-models"],"created_at":"2024-10-10T18:09:08.642Z","updated_at":"2025-10-02T20:30:23.315Z","avatar_url":"https://github.com/Sea-Snell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"## GROKKING: GENERALIZATION BEYOND OVERFITTING ON SMALL ALGORITHMIC DATASETS\n### unofficial re-implementation of [this paper](https://mathai-iclr.github.io/papers/papers/MATHAI_29_paper.pdf) by Power et al.\n### code written by Charlie Snell\n\npull and install:\n```\ngit clone https://github.com/Sea-Snell/grokking.git\ncd grokking/\npip install -r requirements.txt\n```\n\nTo roughly re-create Figure 1 in the paper run:\n\n```\nexport PYTHONPATH=$(pwd)/grokk_replica/\ncd scripts/\npython train_grokk.py\n```\n\n![](grokk.png)\n###### Running the above command should give curves like this.\n\nTry different operations or learning / architectural hparams by modifying configurations in the `config/` directory. I use [Hydra](https://hydra.cc/docs/intro) to handle the configs (see their documentation to learn how to change configs in the commandline etc...).\n\nTraining uses [Weights And Biases](https://wandb.ai/home) by default to generate plots in realtime. If you would not like to use wandb, just set `wandb.use_wandb=False` in `config/train_grokk.yaml` or as an argument when calling `train_grokk.py`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsea-snell%2Fgrokking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsea-snell%2Fgrokking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsea-snell%2Fgrokking/lists"}