# `Vllm.ModelExecutor.BasevLLMParameter`
[🔗](https://github.com/nshkrdotcom/vllm/blob/v0.3.0/lib/snakebridge_generated/vllm/model_executor/basev_llm_parameter.ex#L7)

Base parameter for vLLM linear layers. Extends the torch.nn.parameter

by taking in a linear weight loader. Will copy the loaded weight
into the parameter when the provided weight loader is called.

# `t`

```elixir
@opaque t()
```

# `_assert_and_load`

```elixir
@spec _assert_and_load(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter._assert_and_load`.

## Parameters

- `loaded_weight` (term())

## Returns

- `term()`

# `_is_1d_and_scalar`

```elixir
@spec _is_1d_and_scalar(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter._is_1d_and_scalar`.

## Parameters

- `loaded_weight` (term())

## Returns

- `term()`

# `_shard_id_as_int`

```elixir
@spec _shard_id_as_int(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, integer()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter._shard_id_as_int`.

## Parameters

- `shard_id` (term())

## Returns

- `integer()`

# `data`

```elixir
@spec data(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `device`

```elixir
@spec device(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `dtype`

```elixir
@spec dtype(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `grad`

```elixir
@spec grad(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `grad_fn`

```elixir
@spec grad_fn(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `h`

```elixir
@spec h(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `imag`

```elixir
@spec imag(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_cpu`

```elixir
@spec is_cpu(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_cuda`

```elixir
@spec is_cuda(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_ipu`

```elixir
@spec is_ipu(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_leaf`

```elixir
@spec is_leaf(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_maia`

```elixir
@spec is_maia(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_meta`

```elixir
@spec is_meta(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_mkldnn`

```elixir
@spec is_mkldnn(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_mps`

```elixir
@spec is_mps(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_mtia`

```elixir
@spec is_mtia(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_nested`

```elixir
@spec is_nested(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_quantized`

```elixir
@spec is_quantized(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_sparse`

```elixir
@spec is_sparse(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_sparse_csr`

```elixir
@spec is_sparse_csr(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_vulkan`

```elixir
@spec is_vulkan(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_xla`

```elixir
@spec is_xla(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `is_xpu`

```elixir
@spec is_xpu(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `itemsize`

```elixir
@spec itemsize(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `layout`

```elixir
@spec layout(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `load_column_parallel_weight`

```elixir
@spec load_column_parallel_weight(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter.load_column_parallel_weight`.

## Parameters

- `loaded_weight` (term())

## Returns

- `term()`

# `load_merged_column_weight`

```elixir
@spec load_merged_column_weight(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter.load_merged_column_weight`.

## Parameters

- `loaded_weight` (term())
- `kwargs` (term())

## Returns

- `term()`

# `load_qkv_weight`

```elixir
@spec load_qkv_weight(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter.load_qkv_weight`.

## Parameters

- `loaded_weight` (term())
- `kwargs` (term())

## Returns

- `term()`

# `load_row_parallel_weight`

```elixir
@spec load_row_parallel_weight(SnakeBridge.Ref.t(), term(), keyword()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

Python method `BasevLLMParameter.load_row_parallel_weight`.

## Parameters

- `loaded_weight` (term())

## Returns

- `term()`

# `m_h`

```elixir
@spec m_h(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `m_t`

```elixir
@spec m_t(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `name`

```elixir
@spec name(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `names`

```elixir
@spec names(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `nbytes`

```elixir
@spec nbytes(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `ndim`

```elixir
@spec ndim(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `new`

```elixir
@spec new(term(), term(), keyword()) ::
  {:ok, SnakeBridge.Ref.t()} | {:error, Snakepit.Error.t()}
```

Initialize the BasevLLMParameter

## Parameters

- `data` - torch tensor with the parameter data
- `weight_loader` - weight loader callable

## Returns

 a torch.nn.parameter

# `output_nr`

```elixir
@spec output_nr(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `real`

```elixir
@spec real(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `requires_grad`

```elixir
@spec requires_grad(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `retains_grad`

```elixir
@spec retains_grad(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `shape`

```elixir
@spec shape(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `t`

```elixir
@spec t(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `volatile`

```elixir
@spec volatile(SnakeBridge.Ref.t()) :: {:ok, term()} | {:error, Snakepit.Error.t()}
```

# `weight_loader`

```elixir
@spec weight_loader(SnakeBridge.Ref.t()) ::
  {:ok, term()} | {:error, Snakepit.Error.t()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
