{"id":16599949,"url":"https://github.com/dirmeier/dmvi","last_synced_at":"2025-10-07T11:58:08.118Z","repository":{"id":205134347,"uuid":"690081798","full_name":"dirmeier/dmvi","owner":"dirmeier","description":"Diffusion model variational inference","archived":false,"fork":false,"pushed_at":"2023-11-24T18:06:09.000Z","size":1189,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-13T17:02:21.873Z","etag":null,"topics":["diffusion-models","jax","probabilistic-models","probabilistic-programming","variational-inference"],"latest_commit_sha":null,"homepage":"https://arxiv.org/abs/2311.00474","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dirmeier.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}},"created_at":"2023-09-11T13:50:34.000Z","updated_at":"2025-05-28T18:12:56.000Z","dependencies_parsed_at":"2023-11-24T19:34:13.213Z","dependency_job_id":null,"html_url":"https://github.com/dirmeier/dmvi","commit_stats":null,"previous_names":["dirmeier/dmvi"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/dirmeier/dmvi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdmvi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdmvi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdmvi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdmvi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dirmeier","download_url":"https://codeload.github.com/dirmeier/dmvi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dirmeier%2Fdmvi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278770723,"owners_count":26042828,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["diffusion-models","jax","probabilistic-models","probabilistic-programming","variational-inference"],"created_at":"2024-10-12T00:13:05.437Z","updated_at":"2025-10-07T11:58:08.073Z","avatar_url":"https://github.com/dirmeier.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Diffusion models for probabilistic programming\n\n[![status](http://www.repostatus.org/badges/latest/concept.svg)](http://www.repostatus.org/#concept)\n[![arXiv](https://img.shields.io/badge/arXiv-2311.00474-b31b1b.svg)](https://arxiv.org/abs/2311.00474)\n\n## About\n\nThis repository contains the Python code for reproducing the results in the paper\n\n\u003e Simon Dirmeier and Fernando Perez-Cruz. *Diffusion models for probabilistic programming*. NeurIPS Workshop on Diffusion models, 2023.\n\u003e [[arXiv]](https://arxiv.org/abs/2311.00474)\n\nThe folder structure is as following:\n\n- `configs` contains configuration files for the different inferential algorithms,\n- `data_and_models` contains generative experimental models used for validating the inferential algorithms,\n- `dmvi` contains the source code of the developed method and baseline implementations,\n- `experiments` contains source code with the logic to run the experiments,\n- `.*py` files are entry point scripts that execute the experiments.\n\n## Installation\n\nTo run the experiments, we make use of venv for dependency management and Snakemake as workflow manager.\nTo install all requires dependencies and setup an environment via\n\n```bash\npython -m venv \u003cenvname\u003e\n\u003cpath/to/envname\u003e/bin/activate {envname}\npip install -r requirements.txt\n```\n\n## Usage\n\nYou can either run experiments manually or use Snakemake to run everything in an automated fashion.\n\n### Manual execution (not recommended)\n\nIf you want to run jobs manually, call either of\n\n```bash\n# runs flow/advi/nuts\npython 01-main.py  \\\n  --outdir=results/mean_model \\\n  --config=configs/{flow/advi/nuts/slice}.py \\\n  --data_config=data_and_models/{mean_model/mixture_model/...}.py \\\n  --config.rng_seq_key=3 \\\n  --data_config.data.n_dim=100 \\\n  --data_config.data.n_samples=100\n\n\n # runs ddpm\npython 01-main.py  \\\n  --outdir=results/mean_model \\\n  --config=configs/ddpm.py \\\n  --data_config=data_and_models/mean_model.py \\\n  --config.rng_seq_key=3 \\\n  --data_config.data.n_dim=100 \\\n  --data_config.data.n_samples=100 \\\n  --config.model.diffusion_model.n_diffusions=100 \\\n  --config.model.diffusion_model.solver_n_steps=20 \\\n  --config.model.diffusion_model.solver_order=1\n```\n\n### Automatic execution (recommended)\n\nIf you want to run all experiments from the manuscript and the appendix you can do it automatically using Snakemake.\n\nOn a HPC cluster you can use\n\n```bash\nsnakemake --cluster {sbatch/qsub/bsub} --jobs N_JOBS  --configfile=snake_config.yaml\n```\n\nwhere `--cluster {sbatch/qsub/bsub}` specifies the command your cluster uses for job management and `--jobs N_JOBS` sets the number of jobs submitted at the same time.\nFor instance, to run on a SLURM cluster:\n\n```bash\nsnakemake \\\n  --cluster \"sbatch --mem-per-cpu=4096 --time=4:00:00\" \\\n  --jobs 100  \\\n  --configfile=snake_config.yaml\n```\n\nIn the above scenario, Snakemake would run 100 jobs with 4Gb memory and a time limit of 4h each and resubmit jobs once less than 100 jobs are queued/running.\nWe ran all experiments using these resources.\n\nOn a single desktop computer, run all experiments sequentially via\n\n```bash\nsnakemake --configfile=snake_config.yaml\n```\n\n## Citation\n\nIf you find our work relevant to your research, please consider citing:\n\n```\n@inproceedings{dirmeier2023diffusion,\n    title={Diffusion models for probabilistic programming},\n    author={Simon Dirmeier and Fernando Perez-Cruz},\n    booktitle={NeurIPS 2023 Workshop on Diffusion Models},\n    year={2023},\n    url={https://openreview.net/forum?id=q5lwpayIrJ}\n}\n```\n\n## Author\n\nSimon Dirmeier \u003ca href=\"mailto:sfyrbnd @ pm me\"\u003esfyrbnd @ pm me\u003c/a\u003e\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirmeier%2Fdmvi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdirmeier%2Fdmvi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdirmeier%2Fdmvi/lists"}