AI Agents - Introduction to LLM and AI Terminologies
LLM LLM is a model, which means an equation. Example: y = mx + c y = m1x^3 + m2x^2 + m3x + m4 A model is actually made up of weights . In any model, e.g., ChatGPT model or Gemini model, they would have used a large amount of input to train the model. Input means a large amount of text/image data that is available on the internet. The input would have been fed into the Transformer architecture to…
LLM stands for Language Model, which is essentially an equation that uses weights to predict the next word in a sentence. These weights are derived from training the model on vast amounts of text or image data sourced from the internet. The Transformer architecture plays a crucial role in generating this output.
Models with a higher parameter count, such as 10B or 100B, contain more weights and require significant storage and computational power to run locally. To overcome this limitation, tools like Llama.cpp, Ollama, and LM Studio can be utilized.
Open-weight models share their weights but keep the training data and methodology private, while open-source models provide all components including weights, training code, and data. The primary purpose of LLMs is to predict the next word in a sequence, often predicting the most probable word based on its frequency in the training data.
LLMs operate using three main parameters: Temperature, Top K, and Top P. Temperature ranges from 0 to 1 and influences the randomness of the model's output. A lower temperature (closer to 0) yields more likely words, while a higher temperature (closer to 1) encourages less probable words, which is beneficial for creative writing.
Top K restricts the model to consider only the top K most probable possibilities, while Top P employs a sampling method that adds up possibility scores until they reach a defined value, also in conjunction with Temperature.
Tokens are smaller fragments of words that the model processes. These tokens are generated through an operation known as tokenization, which can result in fragments that are not complete words. For instance, the word "kens" could be tokenized into "to" and "kens." A tokenizer, like those employed by OpenAI and GPT, facilitates this process. Each token is assigned a number, which is subsequently converted into an embedding—a numerical representation used by the model to understand the meaning of the token.
The context window is a critical aspect of LLMs, representing the maximum number of tokens that the model can attend to at any given moment. This window can be either short or long, affecting the model's ability to understand and generate contextually relevant responses.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.