FareedKhan-dev / Building-llama3-from-scratch

LLaMA 3 is one of the most promising open-source model after Mistral, we will recreate it's architecture in a simpler manner.
https://levelup.gitconnected.com/building-llama-3-from-scratch-with-python-e0cf4dbbc306
99 stars 29 forks source link

juypter kernel crashes on google collab and locally #1

Open pascal-maker opened 4 months ago

pascal-maker commented 4 months ago

Hey everytime I try to load the pytorch model my jupyter kernel crashes and even locally on my machine in vscode any explanation for this ? In google collab it says ran out of RAM which is impossible because I have google collab pro and on my machine locally my laptop freezes and everytime I need to reset my laptop manually. The following code block causes the crash: the import torch

Loading a PyTorch model of LLaMA-3-8B

model = torch.load("C:/Users/pasca/OneDrive/Documenten/brain-tumor/llama-3-8B/original/consolidated.00.pth")

Printing first 11 layers of the architecture

print(list(model.keys())[:11])

FareedKhan-dev commented 4 months ago

It is working correctly on Kaggle for me. Please try again and monitor how much RAM it is using in Colab Pro.