> This page is for version Nightly (default).
> 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.7.0 · 26.10: https://docs.nvidia.com/nemo/automodel/v0.7/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.models.flint.packing

Flint text-token ownership across TE context and pipeline parallelism.

## Module Contents

### Functions

| Name                                                                                               | Description                                                            |
| -------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [`_prepare_inputs_for_cp`](#nemo_automodel-components-models-flint-packing-_prepare_inputs_for_cp) | Choose a shared text sharder while preserving PP's global-id boundary. |

### API

```python
nemo_automodel.components.models.flint.packing._prepare_inputs_for_cp(
    model: nemo_automodel.components.models.flint.model.FlintForCausalLM,
    batch: dict[str, typing.Any],
    num_chunks: int
) -> dict[str, typing.Any]
```

Choose a shared text sharder while preserving PP's global-id boundary.

**Parameters:**

**`model`** `FlintForCausalLM`

Native model, possibly one pipeline stage, with optional CP mesh.

---

**`batch`** `dict[str, Any]`

Global token tensors \[B,S] and optional document lengths \[B,N].

---

**`num_chunks`** `int`

Number of independent pipeline microbatch token spaces.

---

**Returns:** `dict[str, Any]`

A model-owned sharder and padding metadata. Packed local indices have