# What's the correct way to pass the results of \`init\_nuts\` to \`sample\`?

**URL:** <https://discourse.pymc.io/t/whats-the-correct-way-to-pass-the-results-of-init-nuts-to-sample/13099>\
**Category:** v5\
**Tags:** modeling\
**Created:** [October 14, 2023, 6:31am UTC](https://discourse.pymc.io/t/whats-the-correct-way-to-pass-the-results-of-init-nuts-to-sample/13099 "2023-10-14T06:31:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonsedar](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/jonsedar/32/2590_2.png) [@jonsedar](https://discourse.pymc.io/u/jonsedar)\
**Post date:** [October 14, 2023, 6:31am UTC](https://discourse.pymc.io/t/whats-the-correct-way-to-pass-the-results-of-init-nuts-to-sample/13099/1 "2023-10-14T06:31:06Z")

</div>

Just a quick one to help me decouple initialization from sampling, because `pm.sample()` does everything all in one

Is it as simple as this? (which seems to work, but I want to confirm)

```python
with mdl:
    initial_points, step = pm.init_nuts(init='auto', chains=4)
    idata = pm.sample(step=step)

```

There’a a clue in [GLM: Mini-batch ADVI on hierarchical regression model — PyMC example gallery](https://www.pymc.io/projects/examples/en/latest/variational_inference/GLM-hierarchical-advi-minibatch.html) and this earlier question [Starting NUTS at specific value in pymc 5](https://discourse.pymc.io/t/starting-nuts-at-specific-value-in-pymc-5/11940), but mine is a different use-case. All I want to do is decouple the call so I can debug…
