🔸 Issue #20: Rejection Sampling (Llama 3.1)
Plus: AI Startup Gumloop, Mirai model that detects cancer & Groq's amazing implementation of Llama 3.1
🗒️ IN TODAY’S ISSUE
🔸 “Rejection Sampling” from the paper “The Llama 3 Herd of Models”
👨🏻💻 “Gumloop” - Platform to build and host LLM powered automations
🧠 “Mirai” - Model that detects breast cancer 5 years before it develops
📱Groq with Llama 3.1
🔸 Extract #1: Rejection Sampling
from the paper “The Llama 3 Herd of Models” by Meta AI.
Llama 3 is a "herd" of 3 models with 8B, 70B, and 405B parameters. The largest one is a massive model with 405 billion parameters and can handle really long contexts of up to 128,000 tokens.

The paper presents an extensive evaluation showing that Llama 3 performs on par with or better than other leading models like GPT-4 across a wide range of tasks. It can do things like answer questions in multiple languages, write high-quality code, solve complex reasoning problems, and use tools in a zero-shot way.
The models were developed in two main stages:
Pre-training: The models were trained on a huge amount of text data (15.6 trillion tokens) to learn the structure of language and gain knowledge about the world. This used a standard Transformer architecture with some adaptations.
Post-training: After pre-training, the models went through several rounds of finetuning and optimization to get them to follow instructions, align with human preferences, and improve specific capabilities. This used techniques like supervised finetuning, rejection sampling, and direct preference optimization.
What is Rejection Sampling?
Rejection sampling was invented by the statistician David H. Rubinstein in the 1950s. This technique is a method for generating random samples from a probability distribution by using samples from a different, easier-to-sample distribution.
The core idea is to sample from a proposal distribution and then accept or reject these samples based on a criterion that relates to the target distribution.
Rubinstein's work laid the foundation for various applications of rejection sampling in statistics and computational methods, particularly in scenarios where direct sampling from the target distribution is challenging.
The basic idea is to sample from a simpler distribution and then accept or reject these samples based on a criterion related to the desired distribution. In the AI world, rejection sampling helps refine the outputs generated by the model to ensure they meet certain quality and relevance standards.
In the case of the Llama 3 models, rejection sampling is specifically used during the post-training phase to filter out undesirable outputs.
After the model generates potential responses, rejection sampling evaluates these responses against a set of criteria derived from human feedback. Only those responses that meet the predefined quality thresholds are accepted, while others are discarded.
This process enhances the model's performance by ensuring that the final outputs are more aligned with user expectations and safety guidelines.
Benefits of Rejection Sampling
Quality Control: By filtering out less desirable outputs, rejection sampling helps maintain a high standard of quality in the model's responses.
Alignment with Human Preferences: This technique allows the model to better align with human preferences, improving user satisfaction and trust in the AI's capabilities.
Stability and Scalability: Compared to more complex reinforcement learning methods, rejection sampling provides a more stable and scalable approach to model tuning, making it easier to implement and manage during the training process.
👨🏻💻 AI Startup
Automating tasks beyond basic inquiries with ChatGPT typically necessitates coding expertise or assistance from a programmer. Engineers skilled in AI implementation are often preoccupied, disconnected from specific challenges, and expensive, which restricts businesses' ability to leverage AI effectively and limits their potential.
Gumloop, created by Max Brodeur-Urbas and Rahul Behal, is an innovative automation platform that enables users to construct workflows effortlessly through a drag-and-drop interface, eliminating the need for coding skills. Users can develop robust AI-driven automation, referred to as 'flows,' which link various tasks together like LEGO blocks.
These flows can streamline operations, such as managing outbound processes or executing intricate business workflows, while seamlessly integrating with existing data.
🧠 Article
Mammograms are widely used for assessing breast cancer risk, but they are not perfect. In the U.S., breast cancer screening guidelines incorporate cancer risk assessments to guide clinical decisions.
A notable advancement in this area is the development of a machine-learning model named "Mirai" by Yala et al. This model predicts breast cancer risk using traditional mammogram data and has shown superior performance compared to existing models, such as Tyrer-Cuzick and earlier deep-learning approaches.
It effectively identifies both five-year breast cancer risk and high-risk patients across diverse international populations. One of the significant benefits of the Mirai model is its consistent performance across different racial and ethnic groups.
This suggests that it could enhance patient care universally, addressing disparities in breast cancer outcomes. The integration of machine learning into risk assessment represents a promising step forward in early detection and personalized treatment strategies for breast cancer.
📱 Social
Jonathan Ross, the founder of Groq explains the power of Llama 3.1 on their platform.
Until next week,
Nino.