Skip to content

Conversation

@emlin
Copy link
Contributor

@emlin emlin commented Oct 20, 2025

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

Enable feature score auto collection for EBC in the similar way of EC. The configuration has no difference in embedding table config:

          virtual_table_eviction_policy=FeatureScoreBasedEvictionPolicy(
              training_id_eviction_trigger_count=260_000_000,  # 260M
              training_id_keep_count=160_000_000,  # 160M
              enable_auto_feature_score_collection=True,
              feature_score_mapping={
                  "sparse_public_original_content_creator": 1.0,
              },
              feature_score_default_value=0.5,
          ),

Differential Revision: D85017179

@meta-codesync
Copy link
Contributor

meta-codesync bot commented Oct 20, 2025

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

@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 Oct 20, 2025
emlin added a commit to emlin/FBGEMM that referenced this pull request Oct 20, 2025
Summary:
X-link: meta-pytorch/torchrec#3475

X-link: facebookresearch/FBGEMM#2044

Enable feature score auto collection for EBC in the similar way of EC. The configuration has no difference in embedding table config:

              virtual_table_eviction_policy=FeatureScoreBasedEvictionPolicy(
                  training_id_eviction_trigger_count=260_000_000,  # 260M
                  training_id_keep_count=160_000_000,  # 160M
                  enable_auto_feature_score_collection=True,
                  feature_score_mapping={
                      "sparse_public_original_content_creator": 1.0,
                  },
                  feature_score_default_value=0.5,
              ),

Differential Revision: D85017179
emlin added 2 commits October 20, 2025 21:07
Summary:
X-link: pytorch/FBGEMM#5030


X-link: facebookresearch/FBGEMM#2043

Enable feature score auto collection in ShardedEmbeddingCollection based on static feature to score mapping.
If user needs custom score for specific id, they can disable auto collection and then change model code explicitly to collect score for each id.

Here is the sample eviction policy config in embedding_table config to enable auto score collection:
                virtual_table_eviction_policy=FeatureScoreBasedEvictionPolicy(
                    training_id_eviction_trigger_count=260_000_000,  # 260M
                    training_id_keep_count=160_000_000,  # 160M
                    enable_auto_feature_score_collection=True,
                    feature_score_mapping={
                        "sparse_public_original_content_creator": 1.0,
                    },
                    feature_score_default_value=0.5,
                ),

Additionally the counter collected previously during EC dedup is not used by kvzch backend, so this diff removed that counter and allow KJT to transfer a single float32 weight tensor to backend. This allows feature score collection for EBC since there could have another float weight for EBC pooling already.

Reviewed By: EddyLXJ

Differential Revision: D83945722
Summary:
X-link: pytorch/FBGEMM#5031


X-link: facebookresearch/FBGEMM#2044

Enable feature score auto collection for EBC in the similar way of EC. The configuration has no difference in embedding table config:

              virtual_table_eviction_policy=FeatureScoreBasedEvictionPolicy(
                  training_id_eviction_trigger_count=260_000_000,  # 260M
                  training_id_keep_count=160_000_000,  # 160M
                  enable_auto_feature_score_collection=True,
                  feature_score_mapping={
                      "sparse_public_original_content_creator": 1.0,
                  },
                  feature_score_default_value=0.5,
              ),

Differential Revision: D85017179
emlin added a commit to emlin/FBGEMM that referenced this pull request Oct 21, 2025
Summary:

X-link: meta-pytorch/torchrec#3475

X-link: facebookresearch/FBGEMM#2044

Enable feature score auto collection for EBC in the similar way of EC. The configuration has no difference in embedding table config:

              virtual_table_eviction_policy=FeatureScoreBasedEvictionPolicy(
                  training_id_eviction_trigger_count=260_000_000,  # 260M
                  training_id_keep_count=160_000_000,  # 160M
                  enable_auto_feature_score_collection=True,
                  feature_score_mapping={
                      "sparse_public_original_content_creator": 1.0,
                  },
                  feature_score_default_value=0.5,
              ),

Differential Revision: D85017179
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