Skip to content

GenerateEmbeddings

Generate embeddings using the last hidden state of an LLM.

Generate embeddings for a text input using the last hidden state of an LLM, as described in the paper 'What Makes Good Data for Alignment? A Comprehensive Study of Automatic Data Selection in Instruction Tuning'.

Attributes

  • llm: The LLM to use to generate the embeddings.

Input & Output Columns

Inputs

  • text (str, List[Dict[str, str]]): The input text or conversation to generate embeddings for.

Outputs

  • embedding (List[float]): The embedding of the input text or conversation.

  • model_name (str): The model name used to generate the embeddings.

References