# `Vllm.ForwardContext.BatchDescriptor`
[🔗](https://github.com/nshkrdotcom/vllm/blob/v0.3.0/lib/snakebridge_generated/vllm/forward_context/batch_descriptor.ex#L7)

Batch descriptor for cudagraph dispatching. We should keep the num of

items as minimal as possible to properly and uniquely describe the padded
batch for cudagraph.

# `t`

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

# `_asdict`

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

Return a new dict which maps field names to their values.

## Returns

- `term()`

# `_make`

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

Make a new BatchDescriptor object from a sequence or iterable

## Parameters

- `iterable` (term())

## Returns

- `term()`

# `_replace`

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

Return a new BatchDescriptor object replacing specified fields with new values

## Parameters

- `kwds` (term())

## Returns

- `term()`

# `count`

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

Return number of occurrences of value.

## Parameters

- `value` (term())

## Returns

- `term()`

# `has_lora`

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

# `index`

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

Return first index of value.

Raises ValueError if the value is not present.

## Parameters

- `value` (term())
- `start` (term() default: 0)
- `stop` (term() default: 9223372036854775807)

## Returns

- `term()`

# `new`

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

Initialize self.  See help(type(self)) for accurate signature.

## Parameters

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

# `num_reqs`

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

# `num_tokens`

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

# `relax_for_mixed_batch_cudagraphs`

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

Return a relaxed version of current batch descriptor that is still compatible

with PIECEWISE cudagraphs (or mixed prefill-decode FA cudagraphs).

## Returns

- `Vllm.ForwardContext.BatchDescriptor.t()`

# `uniform`

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

---

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