XPU is a device abstraction for Intel heterogeneous computation architectures, which can be mapped to CPU, GPU, FPGA, and accelerator.
In order to integrate a new accelerator you need 2 things:
HW support: read about XPU in the official intel XPU webpage.
SW support: see this open Feature Request to include this kind of architecture to the pytorch pool of ...
A very simple approach can be:
Calculate tf-idf vector for sentence 1 and 2.
Calculate vector similarity (Cosine similarity) of these 2 vectors.
This is a general approach and works for any representational vector.
For a more complex one, check semantic similarity with BERT post from Keras blog.
From the theoretical foundations one can look into the Chapter 20: Deep Generative Models of the classic DL book by Goodfellow, Bengio https://amzn.to/2MmZNbH. Not the most recent reference, but written by the professionals in simple and accessible way.
There is a nice book Generative Deep Learning by D.Foster with some simple heuristics and probability ...