Skip to content

Conversation

@EddyLXJ
Copy link
Contributor

@EddyLXJ EddyLXJ commented Nov 11, 2025

Summary:
X-link: https://github.com/facebookresearch/FBGEMM/pull/2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 11, 2025
@meta-codesync
Copy link
Contributor

meta-codesync bot commented Nov 11, 2025

@EddyLXJ has exported this pull request. If you are a Meta employee, you can view the originating Diff in D85830053.

EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 11, 2025
Summary:
X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 13, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 13, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 13, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 13, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 13, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 13, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 14, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 14, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 14, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 14, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 14, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/torchrec that referenced this pull request Nov 14, 2025
Summary:
X-link: pytorch/FBGEMM#5116


X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
EddyLXJ added a commit to EddyLXJ/FBGEMM-1 that referenced this pull request Nov 14, 2025
Summary:

X-link: meta-pytorch/torchrec#3538

X-link: facebookresearch/FBGEMM#2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053
@meta-codesync meta-codesync bot closed this in 22baa4f Nov 15, 2025
meta-codesync bot pushed a commit to pytorch/FBGEMM that referenced this pull request Nov 15, 2025
Summary:
Pull Request resolved: #5116

X-link: meta-pytorch/torchrec#3538

X-link: https://github.com/facebookresearch/FBGEMM/pull/2122

For silvertorch publish, we don't want to load opt into backend due to limited cpu memory in publish host.
So we need to load the whole row into state dict which loading the checkpoint in st publish, then only save weight into backend, after that backend will only have metaheader + weight.
For the first loading, we need to set dim with metaheader_dim + emb_dim + optimizer_state_dim, otherwise the checkpoint loadding will throw size mismatch error. after the first loading, we only need to get metaheader+weight from backend for state dict, so we can set dim with metaheader_dim + emb

Reviewed By: emlin

Differential Revision: D85830053

fbshipit-source-id: 0eddbe9e69ea8271e8c77dc0147e87a08f0b3934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant