> ## Documentation Index
> Fetch the complete documentation index at: https://zenml.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Specifying Step Resources

> How to specify per-step resources

Some steps of your machine learning pipeline might be more resource-intensive and require special hardware to execute. In such cases, you can specify the required resources for steps as follows:

<Tabs>
  <Tab title="Functional API">
    ```py
    from zenml.steps import step, ResourceSettings

    @step(settings={"resources": ResourceSettings(cpu_count=8, gpu_count=2)})
    def training_step(...) -> ...:
        # train a model
    ```
  </Tab>

  <Tab title="Class-based API">
    ```py
    from zenml.steps import BaseStep, ResourceSettings

    class TrainingStep(BaseStep):
        ...

    step = TrainingStep(settings = {"resources": ResourceSettings(cpu_count=8, gpu_count=2)})
    ```
  </Tab>
</Tabs>

<Note>
  If you're using an orchestrator which does not support this feature or its
  underlying infrastructure doesn't cover your requirements, you can also take a
  look at [step operators](/component-gallery/step-operators) which allow you to
  execute individual steps of your pipeline in environments independent of your
  orchestrator.
</Note>
