Looks like you need about 120 GB to fine-tune the 65B model with this code at a sequence length of 512. How does the memory usage scale as the sequence length grows?
By using flash attention, you can get memory requirement down to scale linearly with sequence lengths.
That's a good question. I was under the assumption it's linearly proportional, but I can test it out I guess.