Comments (3)
Try this:
Save:
torch.save(model.state_dict(), '/content/model.pth')
checkpoint = {'state_dict': model.state_dict(),'optimizer' :optim.state_dict()}
torch.save(checkpoint, '/content/model_sd_opt.pth')
Load:
torch.load('/content/model_sd_opt.pth')
Although loading maybe tricky due to many reasons. So try to read the docs/try a few things.
Hope this is helpful.
from performer-pytorch.
Hi thanks so much for your help! I end up using deepspeed
and the following commands
model_engine.save('checkpoint_dir', f'{epoch}_{step}')
model_engine.load('checkpoint_dir')
from performer-pytorch.
@ylhsieh You are welcome. I am glad you found a working solution. Yes, deepspeed is a good way to go too, so whatever works :)
from performer-pytorch.
Related Issues (20)
- hyperbolic cosine based estimator
- torch.max(data_dash) bug HOT 2
- Residual Connection HOT 3
- way to make two elements invisible?
- torch_tensorrt compilation fails
- Rotary Position Embedding
- Output inconsistent for autoregressive performer HOT 2
- How to test the performer architecture for training new models? HOT 1
- Performer Plain
- Attention map HOT 2
- Huge model state dict size?
- Using Performer with GNNs
- Question: Is Performer order equivariant? (can it transform an unordered set of tensors)
- Question about masking HOT 2
- I want to use Peroformer on MAE
- Using replicating nn.MultiHeadAttention with multiple performer SelfAttention modules
- Performer Pytorch Slower than Expected and Please Help with Understanding Parameter Count HOT 1
- Pretrained example
- Cross-attention with arbitrary causal mask
- Modify the transformer tutorial based on performer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from performer-pytorch.