Implementing Speculative and Contrastive DecodingLarge Language models are comprised of billions of parameters (weights). For each word it generates, the model has to perform computationally expensive calculations across all of these parameters.Large Language models accept a sentence, or sequence of tokens, and generate a probability distribution of the next most likely token.Thus, typically decoding n tokens (or generating n words from the model) requires running the model n number of times. At each iteration, the new token is appended to the input sentence and passed to the model again. This can be costly.Additionally, decoding strategy can influence the quality of the generated […]
DATA SCIENCE CONSULTINGInsider consulting guide to conducting a successful 2-day executive workshopImage by author using Canva“Our industry does not respect tradition — it only respects innovation.” — Satya Nadella, CEO Microsoft, Letter to employees in 2014While not all industries are as competitive and cutthroat as the software and cloud industries, innovating and applying the latest technological developments is a fundamental theme for executives. Seasoned business leaders understand that staying up-to-date with the relevant technologies is necessary for success.As a data science consultant, some of the questions clients often ask me are: “How do we effectively integrate the right AI and machine learning tools into our business?”, and […]
Understanding AI applications in bio for machine learning engineersPhoto by Ousa Chea on UnsplashAnyone who has tried teaching a dog new tricks knows the basics of reinforcement learning. We can modify the dog’s behavior by repeatedly offering rewards for obedience and punishments for misbehavior. In reinforcement learning (RL), the dog would be an agent, exploring its environment and receiving rewards or penalties based on the available actions. This very simple concept has been formalized mathematically and extended to advance the fields of self-driving and self-driving/autonomous labs.As a New Yorker, who finds herself riddled with anxiety driving, the benefits of having a […]
And learn about LLM architecture techniques, parsed output, test design and performance measurement of your systemContinue reading on Towards Data Science »
REGRESSION ALGORITHMRoping in key features with coordinate descentLeast Squares Regression, Explained: A Visual Guide with Code Examples for BeginnersLinear regression comes in different types: Least Squares methods form the foundation, from the classic Ordinary Least Squares (OLS) to Ridge regression with its regularization to prevent overfitting. Then there’s Lasso regression, which takes a unique approach by automatically selecting important factors and ignoring others. Elastic Net combines the best of both worlds, mixing Lasso’s feature selection with Ridge’s ability to handle related features.It’s frustrating to see many articles treat these methods as if they’re basically the same thing with minor tweaks. […]
The Advent, Evolution, and Current state of “Data Translators”IntroductionWith Data being constantly glorified as the most valuable asset organizations can own, leaders and decision-makers are always looking for effective ways to put their data insights to use. Every time customers interact with digital products, millions of data points are generated and the opportunity loss of not harnessing these data points to make better products, optimize revenue generation, and improve customer footprint is simply too high to ignore. The role of “Data Translators” began to emerge in analytics and data science job boards in the 2010s to help bridge the knowledge […]
A beginner-friendly guide with example (Python) codeThis is the third article in a larger series on multimodal AI. In the previous posts, we discussed multimodal LLMs and embedding models, respectively. In this article, we will combine these ideas to enable the development of multimodal RAG systems. I’ll start by reviewing key concepts and then share example code for implementing such a system.Image from Canva.Language models like GPT, LLaMA, and Claude learn a tremendous amount of world knowledge via their pre-training. This makes them powerful tools for solving custom problems and answering complex questions.However, there is knowledge that even the most advanced language models […]
Chat with Your Images Using Llama 3.2-Vision Multimodal LLMsLearn how to build Llama 3.2-Vision locally in a chat-like mode, and explore its Multimodal skills on a Colab notebookAnnotated image by author. Original image by Pixabay.IntroductionThe integration of vision capabilities with Large Language Models (LLMs) is revolutionizing the computer vision field through multimodal LLMs (MLLM). These models combine text and visual inputs, showing impressive abilities in image understanding and reasoning. While these models were previously accessible only via APIs, recent open source options now allow for local execution, making them more appealing for production environments.In this tutorial, we will learn how to chat […]