An analogue memory built from a two-dimensional material with antimony contacts enables very high, energy-efficient in-memory searches and k-nearest-neighbour classification, offering a scalable, low-power hardware platform for real-time edge artificial intelligence applications.