# Generated by SnakeBridge v0.16.0 - DO NOT EDIT MANUALLY # Regenerate with: mix compile # Library: vllm 0.14.0 # Python module: vllm.config # Python class: DeviceConfig defmodule Vllm.Config.DeviceConfig do @moduledoc """ Configuration for the device to use for vLLM execution. """ def __snakebridge_python_name__, do: "vllm.config" def __snakebridge_python_class__, do: "DeviceConfig" def __snakebridge_library__, do: "vllm" @opaque t :: SnakeBridge.Ref.t() @doc """ Constructs `DeviceConfig`. ## Parameters - `dataclass_self__` (term()) - `args` (term()) - `kwargs` (term()) """ @spec new(term(), term(), term(), keyword()) :: {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()} def new(dataclass_self__, args, kwargs, opts \\ []) do SnakeBridge.Runtime.call_class(__MODULE__, :__init__, [dataclass_self__, args, kwargs], opts) end @doc """ 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 compute_hash(SnakeBridge.Ref.t(), keyword()) :: {:ok, String.t()} | {:error, Snakepit.Error.t()} def compute_hash(ref, opts \\ []) do SnakeBridge.Runtime.call_method(ref, :compute_hash, [], opts) end @spec device(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()} def device(ref) do SnakeBridge.Runtime.get_attr(ref, :device) end end