# HEAD requires a lot of memory causing OOM

**URL:** <https://discuss.ray.io/t/head-requires-a-lot-of-memory-causing-oom/13180>\
**Category:** Uncategorized\
**Created:** [December 16, 2023, 4:20pm UTC](https://discuss.ray.io/t/head-requires-a-lot-of-memory-causing-oom/13180 "2023-12-16T16:20:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisn](https://avatars.discourse-cdn.com/v4/letter/c/ec9cab/32.png) [@chrisn](https://discuss.ray.io/u/chrisn)\
**Post date:** [December 16, 2023, 4:20pm UTC](https://discuss.ray.io/t/head-requires-a-lot-of-memory-causing-oom/13180/1 "2023-12-16T16:20:05Z")

</div>

Hi,

I have problems with OOM using ray and the dashboard shows that Head requires large amounts of memory. What does need Head so much memory for? `object_store_memory` seems to be unrelated. Instead of sharing my complex code, I share a minimum working example from ray (MNIST), that does not run out of memory, but still requires a lot of memory.

I am using ray 2.8.1 and the MNIST example from: [Train a PyTorch model on Fashion MNIST — Ray 2.43.0](https://docs.ray.io/en/latest/train/examples/pytorch/torch_fashion_mnist_example.html#torch-fashion-mnist-ex)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/ray/original/2X/5/530cb7f04f4ffd8438c4e7a272a9d806c4fa88cd.jpeg)

How can I reduce the memory requirements by Head? I get the problems on different systems (Linux, Mac) with and without GPUs.

Thank you very much in advance.
