# Lower Memory Usage for TF GPT-J

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flower-memory-usage-for-tf-gpt-j%2F18058%3E%5C
**Category:** 🤗Transformers\
**Created:** [May 17, 2022, 2:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flower-memory-usage-for-tf-gpt-j%2F18058 "2022-05-17T14:54:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tyyim](https://avatars.discourse-cdn.com/v4/letter/t/ed8c4c/32.png) [@tyyim](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ftyyim)%5C
**Post date:** [May 17, 2022, 2:54pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flower-memory-usage-for-tf-gpt-j%2F18058%2F1 "2022-05-17T14:54:38Z")

</div>

We can use this way of lowering the memory usage for PT but how about Tensorflow?

```auto
from transformers import GPTJForCausalLM
import torch

model = GPTJForCausalLM.from_pretrained(
    "EleutherAI/gpt-j-6B", revision="float16", torch_dtype=torch.float16, low_cpu_mem_usage=True
)

```

Seems like both the “revision” and the “low\_cpu\_mem\_usage” parameters do not exist in TF.

May I know whether there is any technique I can use to lower the memory usage for TF as my 3090 cannot load the GPT-J-6B model?

---

<div class="post-metadata">

**Author:** ![LeoLee92](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@LeoLee92](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FLeoLee92)%5C
**Post date:** [May 7, 2024, 5:07am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flower-memory-usage-for-tf-gpt-j%2F18058%2F2 "2024-05-07T05:07:36Z")

</div>

Did you get to know how to use “low\_mem\_usage” in Tensorflow?
