Conversation
Learning
- XPM Configxpmir.conversation.learning.DatasetConversationEntrySampler(*, datasets)[source]
Bases:
BaseSampler,DatasetConversationBaseSubmit type:
xpmir.conversation.learning.DatasetConversationEntrySamplerUses a conversation dataset and topic records entries
- datasets: List[datamaestro_text.data.conversation.base.ConversationDataset]
The conversation datasets
- XPM Configxpmir.conversation.learning.reformulation.ConversationRepresentationEncoder[source]
Bases:
TextEncoderBase[List[Record],RepresentationOutput],ABCSubmit type:
xpmir.conversation.learning.reformulation.ConversationRepresentationEncoder
- XPM Configxpmir.conversation.learning.reformulation.DecontextualizedQueryConverter[source]
Bases:
Converter[Record,str]Submit type:
xpmir.conversation.learning.reformulation.DecontextualizedQueryConverter
- XPM Configxpmir.conversation.learning.DatasetConversationBase(*, datasets)[source]
Bases:
ConfigSubmit type:
xpmir.conversation.learning.DatasetConversationBase- datasets: List[datamaestro_text.data.conversation.base.ConversationDataset]
The conversation datasets
- XPM Configxpmir.conversation.learning.DatasetConversationIterator(*, datasets)[source]
Bases:
SampleIterator,DatasetConversationBaseSubmit type:
xpmir.conversation.learning.DatasetConversationIterator- datasets: List[datamaestro_text.data.conversation.base.ConversationDataset]
The conversation datasets
CoSPLADE
- XPM Configxpmir.conversation.models.cosplade.AsymetricMSEContextualizedRepresentationLoss(*, weight)[source]
Bases:
AlignmentLoss[CoSPLADEOutput,TextsRepresentationOutput]Submit type:
xpmir.conversation.models.cosplade.AsymetricMSEContextualizedRepresentationLossComputes the asymetric loss for CoSPLADE
- weight: float = 1.0
Weight for this loss
- version: int = 3constant
Current version version 3: uses q_answers and not q_cosplade
- XPM Configxpmir.conversation.models.cosplade.CoSPLADE(*, history_size, queries_encoder, history_encoder, reverse_queries)[source]
Bases:
ConversationRepresentationEncoderSubmit type:
xpmir.conversation.models.cosplade.CoSPLADECoSPLADE model
- history_size: int = 0
Size of history to take into account (0 for infinite)
- queries_encoder: xpmir.neural.splade.SpladeTextEncoderV2[List[List[str]]]
Encoder for the query history (the first one being the current one)
- history_encoder: xpmir.neural.splade.SpladeTextEncoderV2[Tuple[str, str]]
Encoder for (query, answer) pairs
- version: int = 2constant
Current version
- reverse_queries: bool = False
If True, use the order q_n, q_1, …, q_{n-1}. If False, q_n, q_{n-1}, …, q_1 The original CoSPLADE uses True for this parameter