Configuration for loading the model weights.
Summary
Functions
Python method LoadConfig._lowercase_load_format.
Python method LoadConfig._validate_ignore_patterns.
WARNING: Whenever a new field is added to this config,
Constructs LoadConfig.
Types
Functions
@spec _lowercase_load_format(SnakeBridge.Ref.t(), String.t(), keyword()) :: {:ok, String.t()} | {:error, Snakepit.Error.t()}
Python method LoadConfig._lowercase_load_format.
Parameters
load_format(String.t())
Returns
String.t()
@spec _validate_ignore_patterns(SnakeBridge.Ref.t(), term(), keyword()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
Python method LoadConfig._validate_ignore_patterns.
Parameters
ignore_patterns(term())
Returns
term()
@spec compute_hash( SnakeBridge.Ref.t(), keyword() ) :: {:ok, String.t()} | {:error, Snakepit.Error.t()}
WARNING: Whenever a new field is added to this config,
ensure that it is included in the factors list if it affects the computation graph.
Provide a hash that uniquely identifies all the configs that affect the structure of the computation graph from input ids/embeddings to the final hidden states, excluding anything before input ids/embeddings and after the final hidden states.
Returns
String.t()
@spec device(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec download_dir(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec ignore_patterns(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec load_format(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec model_loader_extra_config(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec new(term(), term(), term(), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
Constructs LoadConfig.
Parameters
dataclass_self__(term())args(term())kwargs(term())
@spec pt_load_map_location(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec safetensors_load_strategy(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
@spec use_tqdm_on_load(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}