quaterion.train.xbm.xbm_buffer module

class XbmBuffer(config: XbmConfig, embedding_size: int)[source]

Bases: object

A buffer implementation to hold recent N embeddings and target values.

Inspired by

  • config – Config class to configure XBM settings.

  • embedding_size – Output dimension of EncoderHead configured for this model.

get() Tuple[Tensor, LongTensor][source]
queue(embeddings: Tensor, targets: LongTensor) None[source]

Queue batch embeddings and targets in the buffer.

  • embeddings – Output embeddings in the batch.

  • targets – Target values in the batch.

property is_full: bool


Learn more about Qdrant vector search project and ecosystem

Discover Qdrant

Similarity Learning

Explore practical problem solving with Similarity Learning

Learn Similarity Learning


Find people dealing with similar problems and get answers to your questions

Join Community