ghdtjr / A-LLMRec

69 stars 9 forks source link

cuda out of memory #3

Closed Ansa-Saeed closed 3 months ago

Ansa-Saeed commented 3 months ago

when i run the code at 48 gpu so face the error out of memory. i run the stage 1 only 1 epochs its run at 48 gpu. BUt now when i run the stage 2 so face the issue Cuda out of memory. image image image kindly suggest me how to avoid the error

haorongchen1015 commented 3 months ago

Hi Ansa,

I hope this message finds you well. I’m reaching out because I encountered an issue while setting up the environment this project. Specifically, I’m seeing the following error in the requirements.txt file: """ ERROR: Invalid requirement: '_libgcc_mutex=0.1=main' (from line 4 of requirements.txt) Hint: = is not a valid operator. Did you mean == ? """ Have you encountered this issue before? If so, could you please share how you resolved it? Any advice or guidance would be greatly appreciated.

Thank you in advance for your help!

Best regards, Haorong

Ansa-Saeed commented 3 months ago

Try using _libgcc_mutex==0.1, but in my case, it didn't work. I am installing only specific libraries separately, like:

transformers==4.32.1
sentencetransformers==2.2.2
accelerate==0.25.0
pytz
torch==2.1.2

Please see the requirements.txt file. Not all libraries were installed, so I am installing only the specific ones and running the code on Jupyter Notebook.

haorongchen1015 commented 3 months ago

I see. Many thanks

ghdtjr commented 3 months ago

Which dataset are you planning to use for learning the model?

The length of each item title directly impacts memory usage. Therefore, based on the specific dataset you might decrease the batch size or limit the item title length.

Ansa-Saeed commented 3 months ago

Can you please tell me about num of user and no of item which version of amazon dataset you used *?

In your paper you used 2014 version of amazon dataset i run the code on beauty dataset but when i run the preprocess file so i got user num and item num 82331 70286 with threshold 4 [cid:fd827280-02dd-4bff-8836-24f331ce1d99] But in your paper beauty result other how its possible kindly guide me Thanks ![cid:193f6983-306e-4575-87f7-f7edb8aa7e65]


From: Khs0311 @.> Sent: Sunday, July 28, 2024 05:10 To: ghdtjr/A-LLMRec @.> Cc: Ansa Saeed @.>; Author @.> Subject: Re: [ghdtjr/A-LLMRec] cuda out of memory (Issue #3)

Which dataset are you planning to use for learning the model?

The length of each item title directly impacts memory usage. Therefore, based on the specific dataset you might decrease the batch size or limit the item title length.

— Reply to this email directly, view it on GitHubhttps://github.com/ghdtjr/A-LLMRec/issues/3#issuecomment-2254496286, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV6YGYON6KEPCYL6YBNASLLZOTNTTAVCNFSM6AAAAABLR2ZIP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJUGQ4TMMRYGY. You are receiving this because you authored the thread.

ghdtjr commented 3 months ago

We used the 2018 Amazon dataset the number of users and items after the preprocessing are described in our paper.

Not only the threshold with the number of interactions, we preprocessed the raw data with the rating. If you considered only the interaction threshold, there might be some differences with our experiment result.

However, I suggest running the code with batch size 1 if you still face an out-of-memory issue.