Compression Algorithms for Efficient Inference and Adaptation of Foundation Models