---
title: Collective
description: Interface for collective operations.
canonical: >-
  https://lightning.ai/docs/fabric/stable/full-api-reference/api/generated/lightning.fabric.plugins.collectives.Collective
---
# Collective {#collective}

### `class lightning.fabric.plugins.collectives.Collective` {#lightning.fabric.plugins.collectives.Collective}

Bases: [`ABC`](https://docs.python.org/3/library/abc.html#abc.ABC "(in Python v3.15)")

Interface for collective operations.

Supports communications between multiple processes and multiple nodes. A collective owns a group.

Warning

This is an [experimental](/docs/pytorch/stable/versioning#experimental-api "(in PyTorch Lightning v2.7.0.dev)") feature which is still in development.

#### `create_group(**kwargs)` {#lightning.fabric.plugins.collectives.Collective.create_group}

Create a group.

This assumes that `init_group()` has been called already by the user.

Return type:

`Self`

#### `abstract property rank: int` {#lightning.fabric.plugins.collectives.Collective.rank}

Rank.

#### `abstract property world_size: int` {#lightning.fabric.plugins.collectives.Collective.world_size}

World size.

---

**Navigation**

- Parent: [Generated](/docs/fabric/2.6.6/full-api-reference/api/generated.md)
