Allow training the normalizing flow on a different JAX device
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start by locating with_transform_adapt and tracing how flow training and per-gradient evaluation choose their JAX devices. The issue gives the expected call shape and reports a 1.6x per-epoch speedup in one prototype; compare behavior with and without train_device and check that training uses the requested device while gradient evaluation stays on the CPU.
Written by the indexing model from the issue text.
Description
with_transform_adapt should take a device for training the flow, so training can run on a GPU while the per-gradient flow evaluation stays on the CPU next to the compiled logp. Gradient evaluations are single-point calls, and training works on batches of draws. A prototype that trains on an Apple GPU through jax-graft was 1.6x faster per epoch at 200 dimensions with an 8-layer flow.
compiled = compiled.with_transform_adapt(train_device=jax.devices("mtl")[0])
- Dominant language
- Python
- Stars
- 214
- Forks
- 31
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pymc-devs/nutpie
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
-
with_data fails with a list on the jax backendPossibly taken @RaphaelFakhri claimed this 22 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
All issues in pymc-devs/nutpie
Similar issues
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
kornia/kornia-rs#1416 · 1 comment ·
Maintainers usually reply within 2 days
-
ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
PolicyEngine/ai-inequality#64 ·
Maintainers usually reply within 1 day
-
LinearGaussianStateSpace.dist splits states and observations wrongly when the transition varies over timePossibly taken @PabloRoque claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
pymc-devs/pymc-extras#839 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day