KB:LLM Vectors vs Embeddings

The sequence is from "Text" to "Tokens," then "Vectors," and finally "Embeddings."

In data processing and machine learning, the creation or extraction of a vector typically precedes the embedding process. Initially, data is converted into a vector form, which is a numerical representation, and then, embeddings are generated from these vectors. Embeddings are lower-dimensional representations that capture the relationships and features of the data, making it easier to use in various machine learning models. This generalized concept reflects the idea that vectors serve as the foundation upon which embeddings are built.









When a model is trained, the initial vectorized values (those random vectors assigned at the beginning) don’t exist separately after the embeddings are created. Here’s how it works:

Training Process:

  • Initial Vectors: These are the starting points, just random numbers. They exist at the beginning of the training process but are not kept in any permanent state.

  • Transformation into Embeddings: During training, the model continuously updates these vectors based on the data it processes. As the model learns, these vectors are adjusted to become more accurate representations of the words or tokens they represent.

After Training:

  • Embeddings Replace Initial Vectors: The original, random vectors effectively "disappear" in the sense that they are overwritten by the refined, meaningful embeddings. The final embeddings are what get stored and used by the model.

  • No Separate Storage: There’s no separate storage of the initial vectors versus the embeddings. The embeddings are just the evolved version of those vectors after training. The model only keeps the embeddings since they contain the meaningful, trained information.

To Sum Up:

The initial vectorized values aren’t kept around separately. They’re transformed through the training process into embeddings, which then replace the initial vectors entirely. So, from the model’s perspective, what starts as random vectors ends up as embeddings, with no need to retain the original random values.



References: 

- https://never-stop-learning.de/embedding-vector-for-azure-ai-search/

- https://www.linkedin.com/pulse/how-do-embeddings-work-large-language-model-llm-onfinanceofficial-54awc/

- https://www.qwak.com/post/utilizing-llms-with-embedding-stores


Comments

Popular posts from this blog

KB: Azure ACA Container fails to start (no User Assigned or Delegated Managed Identity found for specified ClientId)

Electron Process Execution Failure with FSLogix

KB:RMM VS DEX (Remote Monitoring Management vs Digital Employee Experience)