{"id":13478145,"url":"https://github.com/TristanBilot/mlx-GCN","last_synced_at":"2025-03-27T07:30:48.812Z","repository":{"id":212069806,"uuid":"730139142","full_name":"TristanBilot/mlx-GCN","owner":"TristanBilot","description":"MLX implementation of GCN, with benchmark on MPS, CUDA and CPU (M1 Pro, M2 Ultra, M3 Max).","archived":false,"fork":false,"pushed_at":"2023-12-16T22:19:53.000Z","size":192,"stargazers_count":22,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-30T11:41:59.588Z","etag":null,"topics":["apple","cuda","deep-learning","gnn","mlx","pytorch"],"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/TristanBilot.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}},"created_at":"2023-12-11T09:40:09.000Z","updated_at":"2024-10-08T09:44:57.000Z","dependencies_parsed_at":"2023-12-16T23:50:41.115Z","dependency_job_id":"fa0738f2-dd91-4441-9b58-cd499d6452da","html_url":"https://github.com/TristanBilot/mlx-GCN","commit_stats":{"total_commits":12,"total_committers":2,"mean_commits":6.0,"dds":0.25,"last_synced_commit":"dd639de8905f7be8911eea1ed21b57f49a87c6b2"},"previous_names":["tristanbilot/mlx-gcn"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TristanBilot%2Fmlx-GCN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TristanBilot%2Fmlx-GCN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TristanBilot%2Fmlx-GCN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TristanBilot%2Fmlx-GCN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TristanBilot","download_url":"https://codeload.github.com/TristanBilot/mlx-GCN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245802239,"owners_count":20674616,"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":["apple","cuda","deep-learning","gnn","mlx","pytorch"],"created_at":"2024-07-31T16:01:53.103Z","updated_at":"2025-03-27T07:30:48.432Z","avatar_url":"https://github.com/TristanBilot.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Graph Convolutional Network in MLX\n\nAn example of [GCN](https://arxiv.org/pdf/1609.02907.pdf%EF%BC%89) implementation with MLX. Other examples are available \u003ca href=\"https://github.com/ml-explore/mlx-examples\"\u003ehere\u003c/a\u003e.\n\nThe actual benchmark on **M1 Pro**, **M2 Ultra**, **M3 Max** and **Tesla V100**s is explained in \u003ca href=\"https://towardsdatascience.com/mlx-vs-mps-vs-cuda-a-benchmark-c5737ca6efc9\"\u003ethis Medium article\u003c/a\u003e.\n\n### Install env and requirements\n\n```\nCONDA_SUBDIR=osx-arm64 conda create -n mlx python=3.10 numpy pytorch scipy requests -c conda-forge\n\nconda activate mlx\npip install mlx\n```\n\n### Run\nTo try the model, just run the `main.py` file. This will download the Cora dataset, run the training and testing. The actual MLX code is located in `main.py`, whereas the PyTorch equivalent is in `main_torch.py`.\n\n```\npython main.py\n```\n\n### Run benchmark\nTo run the benchmark on CUDA device, a new env needs to be set up without the `CONDA_SUBDIR=osx-arm64` prefix, to be in i386 mode and not arm. For all other experiments on arm and Apple Silicon, just use the env created previously.\n```\npython benchmark.py --experiment=[ mlx | torch_mps | torch_cpu | torch_cuda ]\n```\n\n### Process benchmark figure\nThis needs to install additional packages: `matplotlib` and `scikit-learn`.\n\n```\npython viz.py\n```\n\n\u003cimg src=\"bench.png\" width=\"80%\" alt=\"Benchmark of GCN on MLX, MPS, CPU, CUDA\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTristanBilot%2Fmlx-GCN","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTristanBilot%2Fmlx-GCN","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTristanBilot%2Fmlx-GCN/lists"}