Tinkex.Types.LoadWeightsRequest (Tinkex v0.3.4)
View SourceRequest to load model weights from a checkpoint.
Mirrors Python tinker.types.LoadWeightsRequest.
Fields
model_id- The model/training run IDpath- Tinker URI for model weights (e.g., "tinker://run-id/weights/checkpoint-001")seq_id- Sequence ID for request ordering (optional)optimizer- Whether to also load optimizer state (default: false)type- Request type, always "load_weights"
Load Optimizer State
When optimizer is true, the optimizer state (Adam moments, etc.) will be
restored along with the model weights. This is useful when resuming training from a
checkpoint to maintain training continuity.
Wire Format
{
"model_id": "run-123",
"path": "tinker://run-123/weights/checkpoint-001",
"seq_id": 1,
"optimizer": true,
"type": "load_weights"
}
Summary
Functions
Create a new LoadWeightsRequest.
Types
Functions
Create a new LoadWeightsRequest.
Parameters
model_id- The model/training run IDpath- Tinker URI for model weightsopts- Optional keyword list::seq_id- Sequence ID for request ordering:optimizer- Whether to load optimizer state (default: false)
Examples
iex> LoadWeightsRequest.new("run-123", "tinker://run-123/weights/001")
%LoadWeightsRequest{model_id: "run-123", path: "tinker://run-123/weights/001", optimizer: false}
iex> LoadWeightsRequest.new("run-123", "tinker://run-123/weights/001", optimizer: true)
%LoadWeightsRequest{model_id: "run-123", path: "tinker://run-123/weights/001", optimizer: true}