{"id":16368948,"url":"https://github.com/apsdehal/hm_example_mmf","last_synced_at":"2025-07-02T13:07:14.751Z","repository":{"id":153279509,"uuid":"263474889","full_name":"apsdehal/hm_example_mmf","owner":"apsdehal","description":"The Hateful Memes Challenge example code using MMF","archived":false,"fork":false,"pushed_at":"2020-08-25T22:59:16.000Z","size":6,"stargazers_count":13,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T11:47:06.509Z","etag":null,"topics":["hateful-memes","mmf","pytorch","starter-kit"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"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/apsdehal.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,"publiccode":null,"codemeta":null}},"created_at":"2020-05-12T23:22:45.000Z","updated_at":"2022-05-16T09:26:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"14cad55f-9ab1-4cb3-bf68-93739bd5532b","html_url":"https://github.com/apsdehal/hm_example_mmf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apsdehal/hm_example_mmf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsdehal%2Fhm_example_mmf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsdehal%2Fhm_example_mmf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsdehal%2Fhm_example_mmf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsdehal%2Fhm_example_mmf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apsdehal","download_url":"https://codeload.github.com/apsdehal/hm_example_mmf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apsdehal%2Fhm_example_mmf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263145841,"owners_count":23420678,"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":["hateful-memes","mmf","pytorch","starter-kit"],"created_at":"2024-10-11T02:54:15.365Z","updated_at":"2025-07-02T13:07:14.742Z","avatar_url":"https://github.com/apsdehal.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Hateful Memes Example using MMF\n\nThis repository serves as an example of how to use MMF as a library in your projects and build on top of it.\n\nThe example tries to replicate the model developed in DrivenData's [blog post](https://www.drivendata.co/blog/hateful-memes-benchmark/) on the Hateful Memes.\n\n## Installation\n\nPreferably, create your own conda environment before following the steps below:\n\n```\ngit clone https://github.com/apsdehal/hm_example_mmf\ncd hm_example_mmf\npip install -r requirements.txt\n```\n\n## Prerequisites\n\nPlease follow prerequisites for the Hateful Memes dataset at [this link](https://fb.me/hm_prerequisites).\n\n## Running\n\nRun training with the following command on the Hateful Memes dataset:\n\n```\nMMF_USER_DIR=\".\" mmf_run config=\"configs/experiments/defaults.yaml\"  model=concat_vl dataset=hateful_memes training.num_workers=0\n```\n\nWe set `training.num_workers=0` here to avoid memory leaks with fasttext.\nPlease follow [configuration](https://mmf.readthedocs.io/en/latest/notes/configuration_system.html) document to understand how to use MMF's configuration system to update parameters.\n\n## Directory Structure\n\n```\n├── configs\n│   ├── experiments\n│   │   └── defaults.yaml\n│   └── models\n│       └── concat_vl.yaml\n├── __init__.py\n├── models\n│   ├── concat_vl.py\n├── processors\n│   ├── processors.py\n├── README.md\n└── requirements.txt\n```\n\nSome notes:\n\n1. Configs have been divided into `experiments` and `models` where experiments will contain training configs while models will contain model specific config we implmented.\n2. `__init__.py` imports all of the relevant files so that MMF can find them. This is what `env.user_dir` actually looks for.\n3. `models` directory contains our model implementation, in this case specifically `concat_vl`.\n4. `processors` contains our project specific processors implementation, in this case, we implemented FastText processor for Sentence Vectors.\n\n## Issues/Feedback/Questions\n\nPlease open up issues related to this repository directly on [MMF](https://github.com/facebookresearch/mmf/issues/new/choose).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsdehal%2Fhm_example_mmf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapsdehal%2Fhm_example_mmf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapsdehal%2Fhm_example_mmf/lists"}