Latest Posts

  • ExLlamaV2 The Fastest Library to Run LLMs

    ·

    ExLlamaV2 The Fastest Library to Run LLMs

    Quantizing Large Language Models (LLMs) is the most popular approach to reduce the size of these models and speed up inference. Among these techniques, GPTQ delivers amazing performance on GPUs. Compared to unquantized models, this method uses almost 3 times less VRAM while providing a similar level of accuracy and faster generation. It became so…

  • Decoding Strategies in Large Language Models

    ·

    Decoding Strategies in Large Language Models

    In the fascinating world of large language models (LLMs), much attention is given to model architectures, data processing, and optimization. However, decoding strategies like beam search, which play a crucial role in text generation, are often overlooked. In this article, we will explore how LLMs generate text by delving into the mechanics of greedy search…

  • Quantize Llama models with GGUF and llama.cpp

    ·

    Quantize Llama models with GGUF and llama.cpp

    Due to the massive size of Large Language Models (LLMs), quantization has become an essential technique to run them efficiently. By reducing the precision of their weights, you can save memory and speed up inference while preserving most of the model’s performance. Recently, 8-bit and 4-bit quantization unlocked the possibility of running LLMs on consumer…

  • 4-bit LLM Quantization with GPTQ

    ·

    4-bit LLM Quantization with GPTQ

    Recent advancements in weight quantization allow us to run massive large language models on consumer hardware, like a LLaMA-30B model on an RTX 3090 GPU. This is possible thanks to novel 4-bit quantization techniques with minimal performance degradation, like GPTQ, GGML, and NF4. 🧠 Optimal Brain Quantization For every layer \( \ell \) in the…

  • Introduction to Weight Quantization

    ·

    Introduction to Weight Quantization

    Large Language Models (LLMs) are known for their extensive computational requirements. Typically, the size of a model is calculated by multiplying the number of parameters ( size ) by the precision of these values ( data type ). However, to save memory, weights can be stored using lower-precision data types through a process known as…

  • Step-by-step guide to supervised fine-tune Llama 2 in Google Colab.

    ·

    Step-by-step guide to supervised fine-tune Llama 2 in Google Colab.

    With the release of LLaMA v1, we saw a Cambrian explosion of fine-tuned models, including Alpaca, Vicuna, WizardLM, among others. This trend encouraged different businesses to launch their own base models with licenses suitable for commercial use, such as OpenLLaMA, Falcon, XGen, etc. The release of Llama 2 now combines the best elements from both…

  • ·

    End-to-end guide to the state-of-the-art tool for fine-tuning.

    The growing interest in Large Language Models (LLMs) has led to a surge in tools and wrappers designed to streamline their training process. Popular options include FastChat from LMSYS (used to train Vicuna) and Hugging Face’s transformers/trl libraries (used in my previous article). In addition, each big LLM project, like WizardLM, tends to have its…

  • Boost the performance of supervised fine-tuned models with DPO.

    ·

    Boost the performance of supervised fine-tuned models with DPO.

    Pre-trained Large Language Models (LLMs) can only perform next-token prediction, making them unable to answer questions. This is why these base models are then fine-tuned on pairs of instructions and answers to act as helpful assistants. However, this process can still be flawed: fine-tuned LLMs can be biased, toxic, harmful, etc. This is where Reinforcement…

  • Fine-tune Llama 3 with ORPO

    ·

    Fine-tune Llama 3 with ORPO

    ORPO is a new exciting fine-tuning technique that combines the traditional supervised fine-tuning and preference alignment stages into a single process. This reduces the computational resources and time required for training. Moreover, empirical results demonstrate that ORPO outperforms other alignment methods on various model sizes and benchmarks. In this article, we will fine-tune the new…