BESS-KGE
BESS-KGE is a Python package for knowledge graph embedding on IPUs using PopTorch and the distributed framework BESS.
Shallow knowledge graph embedding (KGE) models are typically memory-bound, as little compute needs to be performed to score (h,r,t) triples once the embeddings of entities and relation types used in the batch have been retrieved.
BESS (Balanced Entity Sampling and Sharing) is a KGE distribution framework designed to maximize bandwidth for gathering embeddings, by
storing them in fast-access IPU on-chip memory;
minimizing communication time for sharing embeddings between workers, leveraging balanced collective operators over high-bandwidth IPU-links.
This allows BESS-KGE to achieve high throughput for both training and inference.
For an introduction to the different distribution schemes used by BESS-KGE, see BESS overview.
Note
The library is still in active development: new features can be expected to be added overtime and occasional bugs may occur. Feel free to open issues in the BESS-KGE github repo to report any problem.
- User guide
- BESS overview
- API reference
- besskge.pipeline
- besskge.dataset
- besskge.sharding
- besskge.batch_sampler
- besskge.negative_sampler
- besskge.bess
- besskge.scoring
- besskge.scoring.BaseScoreFunction
- besskge.scoring.BoxE
- besskge.scoring.ComplEx
- besskge.scoring.ConvE
- besskge.scoring.DistMult
- besskge.scoring.DistanceBasedScoreFunction
- besskge.scoring.InterHT
- besskge.scoring.MatrixDecompositionScoreFunction
- besskge.scoring.PairRE
- besskge.scoring.RotatE
- besskge.scoring.TranS
- besskge.scoring.TransE
- besskge.scoring.TripleRE
- besskge.loss
- besskge.metric
- besskge.embedding
- besskge.embedding.init_KGE_normal
- besskge.embedding.init_KGE_uniform
- besskge.embedding.init_uniform_norm
- besskge.embedding.init_uniform_rotation
- besskge.embedding.init_xavier_norm
- besskge.embedding.initialize_entity_embedding
- besskge.embedding.initialize_relation_embedding
- besskge.embedding.refactor_embedding_sharding
- besskge.utils
- Developers guide
- Bibliography