pytorch
1223e944 - [ao][sparsity] Data Sparsifier Benchmarking: Evaluating disk savings of DLRM model (#81778)

Commit
2 years ago
[ao][sparsity] Data Sparsifier Benchmarking: Evaluating disk savings of DLRM model (#81778) The objective is to sparsify the embeddings of the dlrm model and observe the disk savings. The model is sparsified and dumped to disk and then zipped. The embeddings are pruned to different sparsity levels (0.0 - 1.0), for multiple block shapes ((1,1) and (1,4)) and optimization functions (L1, L2). The user trying to reproduce the results is required to clone the dlrm repository and copy the files to dlrm directory. Then train the dlrm model as per the instructions on the github page and then run this script. **Results**: Introducing sparsity in the embeddings reduces file size after compression. The compressed model size goes down from 1.9 GB to 150 MB after 100% sparsity. Dependencies: DLRM Repository (https://github.com/facebookresearch/dlrm) After Setup, Run: `python evaluate_disk_savings.py --model_path=<path_to_model_checkpoint> --sparsified_model_dump_path=<path_to_dump_sparsified_models>` Test Plan: None Pull Request resolved: https://github.com/pytorch/pytorch/pull/81778 Approved by: https://github.com/z-a-f
Author
Committer
Parents
Loading