Foundation Models

Foundation Models (FMs) are large deep learning neural networks that are trained on large amounts of data. They are also know as “general purpose ai” or “GPAI” since they are designed to be general-purpose and serve as the starting point for future AI development. Foundation vs Traditional Models Common forms of foundation models include large language models (LLMs) or generative AI models. FMs differ from traditional ML models or “Narrow AI models” in that they are pretrained on a wide range of tasks and data, allowing them to perform a variety of tasks unlike the specialized models of the past....

July 12, 2024 · 2 min · 293 words · Xavier Loera Flores

Request Response Communication Pattern

The request-response model is a communication pattern used in computing where a client sends a request to a server, and the server responds to the request. This model is used in various communication protocols and APIs to exchange data between clients and servers widely used in web development, networking, and distributed systems. Examples of this request response pattern can be seen in following use cases: Protocols HTTP DNS SSH RPC TCP APIS...

July 3, 2024 · 7 min · 1417 words · Xavier Loera Flores

Retrieval-Augmented Generation

Retrieval-Augmented Generation (RAG) is a process that optimizes the output of LLMs do that it utilizes and references a specific knowledge or domain base that may not have been included in the LLM’s training data. RAG can be seen as a cost-efficient extension of the LLM’s abilities using an organization’s knowledge base while improving the outputs so that it remains relevant, accurate, and useful in various contexts without needing to retrain the LLMs....

July 2, 2024 · 3 min · 612 words · Xavier Loera Flores

Arrays in Memory

Arrays are a data structure used to store a collection of elements of the same type. They are stored in memory continuously. This means that all the elements of the array can be found sequentially in memory. Arrays in RAM Array elements are stored sequentially in memory. The memory address of the first element of the array is used to access the entire array. The size of the data between each element in the array is determined by the size of the data type of the elements....

July 1, 2024 · 2 min · 280 words · Xavier Loera Flores

Two Sum

Problem https://leetcode.com/problems/two-sum/ Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You may assume that each input would have exactly one solution, and you may not use the same element twice. You can return the answer in any order. Examples Example 1: Input: nums = [2,7,11,15], target = 9 Output: [0,1] Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]....

June 8, 2024 · 3 min · 532 words · Xavier Loera Flores

In Place Algorithms

In Place Algorithms In place algorithms are algorithms that are executed without needing extra memory. They will modify the input data directly and work within the same memory space. In place algorithms can use a amount of extra memory and still be considered in place. As long as the output is stored in the same memory space as the input, the algorithm is considered in place. Algorithms that don’t modify the input data directly and require extra memory are considered out of place or not in place....

June 8, 2024 · 2 min · 321 words · Xavier Loera Flores

Stable Sorting Algorithms

Stable Sorting Algorithms Stable sorting algorithms are algorithms that maintain the relative order of equally valued elements in its sorted output. This means that if two elements are equal in value, the element that appears first in the original list will appear first in the sorted list. Use Case One use case when sorting a list of objects by multiple keys. If the list is sorted by one key and then sorted by another key, the relative order of the first key will be maintained in the second sort....

June 4, 2024 · 2 min · 227 words · Xavier Loera Flores