> This page is for version 0.5.0 · 26.06.
> For other versions, use one of these documentation indexes:
> - Nightly (default): https://docs.nvidia.com/nemo/automodel/nightly/llms.txt
> - Latest: https://docs.nvidia.com/nemo/automodel/latest/llms.txt
> - 0.5.0 · 26.06: https://docs.nvidia.com/nemo/automodel/v0.5/llms.txt
> - 0.4.0 · 26.04: https://docs.nvidia.com/nemo/automodel/v0.4/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/automodel/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/automodel/_mcp/server.

# nemo_automodel.components.speculative.eagle.sglang_target

SGLang adapter for the EAGLE-3 target backend.

A thin engine adapter on top of the engine-agnostic contract in
`nemo_automodel.components.speculative.eagle.target_runner`: it builds a
SGLang runner and wraps it in `RunnerEagle3TargetModel`. SGLang is the
fastest serving path for mainstream architectures, so a remote target server
(`nemo_automodel.components.speculative.serve_target`) can hold the target
on dedicated GPUs while the draft trains elsewhere.

All supervision-contract logic (shift / aux-concatenation semantics, aux-layer
defaulting, embedding access) lives in `target_runner` and is shared with any
future engine adapter (e.g. vLLM). This module owns only SGLang construction,
and the SGLang-internal forward is isolated further in
`nemo_automodel.components.speculative.eagle.sglang_runner`, imported lazily
by `SGLangEagle3TargetModel.from_pretrained` so importing this module never
pulls in SGLang.

## Module Contents

### Classes

| Name                                                                                                            | Description                                    |
| --------------------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| [`SGLangEagle3TargetModel`](#nemo_automodel-components-speculative-eagle-sglang_target-SGLangEagle3TargetModel) | EAGLE-3 target backend whose runner is SGLang. |

### API

```python
class nemo_automodel.components.speculative.eagle.sglang_target.SGLangEagle3TargetModel()
```

**Bases:** [RunnerEagle3TargetModel](/nemo-automodel/nemo_automodel/components/speculative/eagle/target_runner#nemo_automodel-components-speculative-eagle-target_runner-RunnerEagle3TargetModel)

EAGLE-3 target backend whose runner is SGLang.

Adds only SGLang construction; the supervision contract is inherited from
`RunnerEagle3TargetModel`.

```python
nemo_automodel.components.speculative.eagle.sglang_target.SGLangEagle3TargetModel.from_pretrained(
    model_path: str,
    aux_layer_ids: typing.Sequence[int] | None = None,
    dtype: torch.dtype | None = None,
    tp_size: int = 1,
    trust_remote_code: bool = False,
    sglang_kwargs = {}
) -> 'SGLangEagle3TargetModel'
```

classmethod

Build a SGLang runner for `model_path` and wrap it as a target backend.

SGLang is imported here (not at module load) so this module stays
importable in environments without SGLang; `sglang_kwargs` are passed
through to SGLang's `ServerArgs` for endpoint / parallelism tuning.