> 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.dspark.config

## Module Contents

### Functions

| Name                                                                                                          | Description                                                                |
| ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [`build_draft_config`](#nemo_automodel-components-speculative-dspark-config-build_draft_config)               | -                                                                          |
| [`build_gemma4_draft_config`](#nemo_automodel-components-speculative-dspark-config-build_gemma4_draft_config) | Build a Gemma4 DSpark draft config from a Gemma4 target's text sub-config. |
| [`get_gemma4_text_config`](#nemo_automodel-components-speculative-dspark-config-get_gemma4_text_config)       | Return a deep copy of a Gemma4 target's text sub-config.                   |

### Data

[`TRAIN_ATTN_IMPLEMENTATION`](#nemo_automodel-components-speculative-dspark-config-TRAIN_ATTN_IMPLEMENTATION)

[`__all__`](#nemo_automodel-components-speculative-dspark-config-__all__)

### API

```python
nemo_automodel.components.speculative.dspark.config.build_draft_config(
    target_config,
    model_args
)
```

```python
nemo_automodel.components.speculative.dspark.config.build_gemma4_draft_config(
    target_config,
    model_args
)
```

Build a Gemma4 DSpark draft config from a Gemma4 target's text sub-config.

```python
nemo_automodel.components.speculative.dspark.config.get_gemma4_text_config(
    target_config
)
```

Return a deep copy of a Gemma4 target's text sub-config.

```python
nemo_automodel.components.speculative.dspark.config.TRAIN_ATTN_IMPLEMENTATION = 'flex_attention'
```

```python
nemo_automodel.components.speculative.dspark.config.__all__ = ['build_draft_config', 'build_gemma4_draft_config', 'get_gemma4_text_config']
```