πPaper link: Attention Is All You Need -> arXiv:1706.03762
π This Repo Includes
β
Encoder implementation in PyTorch with explanations of critical concepts.
ποΈ A dataset on which a recommendation program was built.
π€ An apartment recommendation program using a custom Encoder built from scratch in PyTorch.
π§ Encoder Implementation in PyTorch Key components covered:
β¨ Residual Connections
π Positional Encoding
π§ Self-Attention and Multi-Head Attention
π Why dot product of query and key vectors can get large and how to scale them properly
π Dataset and Recommendation Program
-
The dataset consists of apartment listings with various columns.
-
For building the recommendation system, I primarily used the TopFacilities and PropertyName columns.
-
The model leverages the Attention Mechanism to capture relationships between facilities, creating a vector representation for each apartment by averaging the
embeddings of its facilities. -
I used cosine similarity to find the most similar apartments and torch.topk() to retrieve the top-k most similar listings to the apartment a user is viewing.