Skip to content

Embeddings¤

Module: generative_models.extensions.nlp.embeddings

Source: generative_models/extensions/nlp/embeddings.py

Overview¤

Text embedding utilities for generation tasks.

This module provides text embedding and representation learning utilities for generative models working with textual data.

Classes¤

TextEmbeddings¤

class TextEmbeddings

Functions¤

call¤

def __call__()

init¤

def __init__()

compute_attention_weights¤

def compute_attention_weights()

compute_similarity¤

def compute_similarity()

create_contextual_embeddings¤

def create_contextual_embeddings()

embed¤

def embed()

extract_sentence_embedding¤

def extract_sentence_embedding()

get_embedding_statistics¤

def get_embedding_statistics()

get_token_embeddings¤

def get_token_embeddings()

interpolate_embeddings¤

def interpolate_embeddings()

project_to_vocabulary¤

def project_to_vocabulary()

Module Statistics¤

  • Classes: 1
  • Functions: 11
  • Imports: 5