* This page is part of the Union.ai v2 docs.
* Full index: https://www.union.ai/docs/v2/union/llms.txt
* Union.ai is a commercial superset of the open-source Flyte project and uses the same `flyte` SDK and CLI, so questions about Flyte are usually answered here too.
* Only refer to the open-source Flyte docs if you are explicitly looking for information about the open-source Flyte project, particularly the open-source Flyte backend. The open-source Flyte v2 docs are at https://www.union.ai/docs/v2/flyte/llms.txt
* These are the v2 docs. v1 is out of date and deprecated. Only refer to v1 docs if asked explicitly about v1. The v1 index is at https://www.union.ai/docs/v1/union/llms.txt

Configuration for model sharding.

# ShardConfig

**Package:** `flyte.prefetch`

Configuration for model sharding.

## Parameters

```python
class ShardConfig(
    engine: typing.Literal['vllm'] = 'vllm',
    args: flyte.prefetch._hf_model.VLLMShardArgs = VLLMShardArgs(),
)
```
Create a new model by parsing and validating input data from keyword arguments.

Raises [`ValidationError`](https://docs.pydantic.dev/latest/api/pydantic_core/#pydantic_core.ValidationError) if the input data cannot be
validated to form a valid model.

`self` is explicitly positional-only to allow `self` as a field name.

| Parameter | Type | Description |
|-|-|-|
| `engine` | `typing.Literal['vllm']` | The sharding engine to use (currently only "vllm" is supported). |
| `args` | `flyte.prefetch._hf_model.VLLMShardArgs` | Arguments for the sharding engine. |

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/api-reference/flyte-sdk/flyte.prefetch/shardconfig.md
**HTML**: https://www.union.ai/docs/v2/union/api-reference/flyte-sdk/flyte.prefetch/shardconfig/
