You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature score eviction backend and frontend support (#3287)
Summary:
Pull Request resolved: #3287
X-link: pytorch/FBGEMM#4681
X-link: facebookresearch/FBGEMM#1707
## Context
We need a new eviction policy for large embedding which has high id growth rate. The feature score eviction is based on engagement rate of id instead of only time or counter. This will help model to keep all relatively important ids during eviction.
## Detail
* New Eviction Strategy: BY_FEATURE_SCORE
Added a new eviction trigger strategy BY_FEATURE_SCORE in the eviction config and logic.
This strategy uses feature scores derived from engagement rates to decide which IDs to evict.
* FeatureScoreBasedEvict Class
Implements the feature score based eviction logic.
Maintains buckets of feature scores per shard and table to compute eviction thresholds.
* Supports a dry-run mode to calculate thresholds before actual eviction.
Eviction decisions are based on thresholds computed from feature score distributions.
Supports decay of feature score statistics over time.
* Async Metadata Update API
Added set_kv_zch_eviction_metadata_async method to update feature score metadata asynchronously in the KV store.
This method shards the input indices and engagement rates and updates the feature score statistics in parallel.
* Dry Run Eviction Mode
Introduced a dry run mode to simulate eviction rounds to compute thresholds without actually evicting.
Dry run results are used to finalize thresholds for real eviction rounds.
Reviewed By: emlin
Differential Revision: D78138679
fbshipit-source-id: 6196c3676abf94b690f1ac776ca8f5c739cae1ea
0 commit comments