Skip to content

Bug: esm cannot load sharded checkpoints, so ESM-2 3B and 15B are refused although their model config is supported #2045

Closed

Description

@zhenshanx-nv

Affected area: Model resolution or TensorRT engine build

TensorRT-Model-Connect version: main @ 5a2ce7e

Installation method: Development container

Model and revision: facebook/esm2_t36_3B_UR50D @ 476b639933c8baad5ad09a60ac1a87f987b656fc; facebook/esm2_t48_15B_UR50D @ 5fbca39631164edc1d402a5aa369f982f72ee282

Environment: Linux, NVIDIA B200 and B300, TensorRT 11.4.0.106.

Description

The esm checkpoint loader in families/esm/model.py looks for exactly one file, model.safetensors or pytorch_model.bin, and otherwise raises:

FileNotFoundError: missing esm checkpoint: neither <dir>/model.safetensors nor <dir>/pytorch_model.bin

The larger ESM-2 checkpoints on the Hub are published only as sharded PyTorch files with an index:

Checkpoint Files
facebook/esm2_t36_3B_UR50D pytorch_model-00001-of-00002.bin, pytorch_model-00002-of-00002.bin, pytorch_model.bin.index.json
facebook/esm2_t48_15B_UR50D pytorch_model-0000{1..7}-of-00007.bin, pytorch_model.bin.index.json

So both are refused before any build, although the family graph supports their model config: the 3B model built and ran correctly after its two shards were merged by hand into one model.safetensors with the same tensor names (used for the 3B numbers in the FP8 study of #2027).

Minimal reproducer

  1. Download facebook/esm2_t36_3B_UR50D at the revision above.
  2. Build it with the esm family build: FileNotFoundError: missing esm checkpoint: ....
  3. Merge the two .bin shards into one model.safetensors (same tensor names) and build again: the build succeeds.

Expected behavior

The loader reads sharded checkpoints through their index file (model.safetensors.index.json or pytorch_model.bin.index.json), so ESM-2 3B and 15B can be built.

Actual behavior

Sharded checkpoints are refused with FileNotFoundError.

Activity

  1. added
    bug
    on Nov 7, 2026
  2. akhil9tiet commented on Nov 7, 2026

    @akhil9tiet

    I'd like to work on this — please assign it to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions