# `Vllm.Config.AttentionConfig`
[🔗](https://github.com/nshkrdotcom/vllm/blob/v0.3.0/lib/snakebridge_generated/vllm/config/attention_config.ex#L7)

Configuration for attention mechanisms in vLLM.

# `t`

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

# `_set_from_env_if_set`

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

Set field from env var if set, with deprecation warning.

## Parameters

- `field_name` (String.t())
- `env_var_name` (String.t())

## Returns

- `nil`

# `backend`

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

# `compute_hash`

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

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()`

# `disable_flashinfer_prefill`

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

# `disable_flashinfer_q_quantization`

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

# `flash_attn_max_num_splits_for_cuda_graph`

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

# `flash_attn_version`

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

# `new`

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

Constructs `AttentionConfig`.

## Parameters

- `dataclass_self__` (term())
- `args` (term())
- `kwargs` (term())

# `use_cudnn_prefill`

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

# `use_prefill_decode_attention`

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

# `use_trtllm_attention`

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

# `use_trtllm_ragged_deepseek_prefill`

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

# `validate_backend_before`

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

Enable parsing of the `backend` enum type from string.

## Parameters

- `value` (term())

## Returns

- `term()`

---

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