BiEncoderOutput
- class lightning_ir.bi_encoder.bi_encoder_model.BiEncoderOutput(scores: Tensor | None = None, query_embeddings: BiEncoderEmbedding | None = None, doc_embeddings: BiEncoderEmbedding | None = None)[source]
Bases:
LightningIROutput
Dataclass containing the output of a bi-encoder model.
- __init__(scores: Tensor | None = None, query_embeddings: BiEncoderEmbedding | None = None, doc_embeddings: BiEncoderEmbedding | None = None) None
Args:
Methods
__init__
([scores, query_embeddings, ...])Args:
Attributes
Document embeddings generated by the model.
Query embeddings generated by the model.
- doc_embeddings: BiEncoderEmbedding | None = None
Document embeddings generated by the model.
- fromkeys(value=None)
Create a new ordered dictionary with keys from iterable and values set to value.
- move_to_end(key, last=True)
Move an existing element to the end (or beginning if last is false).
Raise KeyError if the element does not exist.
- pop(key[, default]) v, remove specified key and return the corresponding value.
If the key is not found, return the default if given; otherwise, raise a KeyError.
- popitem(last=True)
Remove and return a (key, value) pair from the dictionary.
Pairs are returned in LIFO order if last is true or FIFO order if false.
- query_embeddings: BiEncoderEmbedding | None = None
Query embeddings generated by the model.
- setdefault(*args, **kwargs)
Insert key with a value of default if key is not in the dictionary.
Return the value for key if key is in the dictionary, else default.