Uses of Class
ai.beestream.jitnn.io.StateDict
Packages that use StateDict
Package
Description
Checkpoints: named tensors and values (
StateDict) saved and loaded in
Hugging Face's safetensors format (SafeTensors).Neural-network modules after PyTorch's
torch.nn: Module and
Sequential, linear and convolution layers, pooling, normalisation,
attention, embeddings, recurrent layers (LSTM, GRU), graph convolution, activations, and data-parallel
training (DataParallel).Optimisers with PyTorch's semantics (SGD, Adam and AdamW, AdaGrad, RMSProp, AdaDelta, AdaMax,
NAdam, LAMB, LARS), learning-rate schedules (
LRScheduler) and dynamic
loss scaling for FP16 training (GradScaler).-
Uses of StateDict in ai.beestream.jitnn.io
Methods in ai.beestream.jitnn.io that return StateDictModifier and TypeMethodDescriptionstatic StateDictOpens a safetensors file; tensors are read when copied in.Adds a float value (stored as its decimal string).Adds an integer value (stored as its decimal string).Adds every entry ofpartunderprefix..Adds a tensor; its contents are read when the dictionary is saved.Adds a value.The entries underprefix., with the prefix removed.Methods in ai.beestream.jitnn.io with parameters of type StateDict -
Uses of StateDict in ai.beestream.jitnn.nn
Methods in ai.beestream.jitnn.nn that return StateDictModifier and TypeMethodDescriptionModule.stateDict()The parameters (parameters.<i>) and buffers (buffers.<i>) in registration order, referring to the live tensors: save it withStateDict.save(Path).Methods in ai.beestream.jitnn.nn with parameters of type StateDictModifier and TypeMethodDescriptionvoidModule.loadStateDict(StateDict d) Overwrites the parameters and buffers with those ofd, in place, so compiled plans keep using them. -
Uses of StateDict in ai.beestream.jitnn.nn.optim
Methods in ai.beestream.jitnn.nn.optim that return StateDictModifier and TypeMethodDescriptionGradScaler.stateDict()The scale and the count of clean steps since it last changed, for checkpoints.LRScheduler.stateDict()The epoch (or step) count, for checkpoints; the rate itself is restored with the optimiser.Optimizer.stateDict()The optimiser's state for a checkpoint: its type, learning rate, step count and per-parameter state (state.<slot>.<parameter index>), which refers to the live tensors.Methods in ai.beestream.jitnn.nn.optim with parameters of type StateDictModifier and TypeMethodDescriptionprotected voidNAdam.loadScalars(StateDict d) protected voidOptimizer.loadScalars(StateDict d) Restores whatOptimizer.saveScalars(StateDict)saved.voidGradScaler.loadStateDict(StateDict d) Restores the scale and step count saved byGradScaler.stateDict().voidLRScheduler.loadStateDict(StateDict d) Restores the count saved byLRScheduler.stateDict().voidOptimizer.loadStateDict(StateDict d) RestoresOptimizer.stateDict()into this optimiser, in place; type and state shapes must match.protected voidNAdam.saveScalars(StateDict d) protected voidOptimizer.saveScalars(StateDict d) Scalar state beyond the step count and learning rate, for checkpoints.