Lib2Vec is a self-supervised framework for learning vector representations of library cells.The framework includes regularity tests, self-supervised learning, and an attention-based model architecture.Experimental results show that Lib2Vec captures functional and electrical similarities.Lib2Vec improves circuit learning applications, especially with limited labeled data.