• unwind ai
  • Posts
  • Meta's Opensource PyTorch Library to Build and Train LLMs

Meta's Opensource PyTorch Library to Build and Train LLMs

PLUS: Segment Anything Model 2.1, Grok-beta API

Today’s top AI Highlights:

  1. Meta’s opensource framework for distributed LLM training and fine-tuning

  2. Train GPT-2 in just 12 minutes on 8xH100 GPUs

  3. xAI releases API for “grok-beta” model

  4. Meta releases Segment Anything Model 2.1 and SAM Developer Suite

  5. NotebookLM podcast in your own voice with visuals from your docs

& so much more!

Read time: 3 mins

AI Tutorials

Here is a smart AI agent that not only retrieves answers from PDFs but also searches the web in real time—all with minimal code.

In this tutorial, we’ll walk through how to create a Retrieval-Augmented Generation (RAG) agent that uses GPT-4o for intelligent querying. Your agent will tap into a PDF-based knowledge base and perform web searches using DuckDuckGo, providing rich insights through a sleek playground interface.

Using Phidata, a framework designed for building agent-based systems, we’ll streamline the entire setup. You’ll combine tools like LanceDB for vector-based searches, PDF knowledge embedding, and interactive browsing. The result? A powerful AI assistant ready to handle complex queries with ease.

We share hands-on tutorials like this 2-3 times a week, designed to help you stay ahead in the world of AI. If you're serious about levelling up your AI skills and staying ahead of the curve, subscribe now and be the first to access our latest tutorials.

🎁 Bonus worth $50 💵

Share this newsletter on your social channels and tag Unwind AI (X, LinkedIn, Threads, Facebook) to get an AI resource pack worth $50 for FREE. Valid for a limited time only!

Latest Developments

Meta just opensourced Meta Lingua, a new minimal and fast LLM training and inference library. It offers a modular setup using PyTorch, letting you quickly jump into experiments without fuss. With built-in support for multi-GPU setups, profiling tools, and checkpoint management, Meta Lingua focuses on making training and evaluation smooth and repeatable. If you’re working on scaling models or trying out new architectures, this tool gives you everything you need to get started fast and track performance efficiently.

Key Highlights:

  1. Modular and Customizable - Each part of the codebase—model architecture, data loaders, optimizers, and distributed training—can be easily modified or swapped. You have full flexibility to configure components to match your experimental needs, from model tuning to data pre-processing.

  2. Smooth Distributed Training - Automatically handles full-sharded data parallelism (FSDP) and activation checkpointing, helping you run models efficiently across multiple GPUs without manual tweaks.

  3. Real-Time Profiling and Metrics - Get memory usage, performance insights, and FLOP utilization during training. Lingua’s profiling tools ensure you can catch bottlenecks early and make necessary adjustments fast.

  4. Quick Start - Clone the repo, set up the environment in minutes, and run experiments using pre-configured templates or tweak them to suit your needs. Works both locally and with SLURM clusters for large-scale jobs.

  5. Seamless Workflow Across Tools - Use Meta Lingua to test new ideas, TorchTitan to scale them, and TorchTune for fine-tuning. Together, these tools help you move from prototype to production without needing multiple complex setups.

What if training a model felt as smooth as writing a bash script? Modded-NanoGPT is a leaner version of Andrej Karpathy’s llm.c. This variant achieves faster results by training a 124M GPT-2 model on fewer tokens while maintaining accuracy. What’s even more appealing is its adaptability—whether you’re running on fewer GPUs or experimenting with batch sizes, you get the same optimized performance. All this comes packed into a setup you can run in under 20 minutes on high-end GPUs.

Key Highlights:

  1. Super-Fast Training - Cut training time to just 12 minutes on 8xH100 GPUs, compared to 45 minutes with the original llm.c setup, using optimized settings.

  2. Fewer Tokens, Same Accuracy - It reduces the dataset size to 2.67B tokens (down from 10B) without affecting the validation loss (~3.277). This saves compute time and costs.

  3. Optimized Out of the Box - A lightweight setup that adjusts dynamically—whether you need fewer GPUs or smaller batch sizes, you’ll still maintain model performance.

  4. Quick Start - Try it yourself with a quick three-command setup—just install dependencies, download tokens, and run the script. You can further tweak it to compare speed and results for your own projects.

Quick Bites

Meta has released an updated checkpoint of the Segment Anything Model 2, SAM 2.1 with stronger performance. Along with this, Meta has also released SAM 2 Developer Suite, a package of opensource training code for fine-tuning SAM 2 with your own data, and the front-end and back-end code for SAM 2’s web demo.

Elon Musk's xAI has officially launched its API featuring one model "grok-beta." Priced competitively, grok-beta is available for $5 per million input tokens or $15 per million output tokens. The API is compatible with OpenAI and Anthropic SDKs, which makes integrating xAI into existing workflows simpler. You can start using it for generating chat completions, working with function calls, and connecting to external tools.

Microsoft is rolling out new agentic features for Copilot, including the ability to build autonomous agents in Copilot Studio, entering public preview next month. These agents can range from simple prompt-and-response AI assistants to fully autonomous agents that can execute and orchestrate business processes. Microsoft is also releasing 10 new autonomous agents in Dynamics 365 for sales, finance, service, and supply chain operations.

AI search engine Perplexity is in talks to raise $500 million at an $8 billion valuation, more than doubling its previous $3 billion valuation from SoftBank.

Tools of the Trade

  1. Personalized Explainers by Brainy Docs: This takes NotebookLM’s podcast feature to another level. Drop a PDF, and receive an explainer in your own voice that includes visuals, and images from the document. It will be rolled out to all users of Brainy Docs this week.

  2. Sage: Opensource tool that lets you chat directly with any codebase by indexing it and providing heavily documented answers based on the latest repository information. It can be run locally or in the cloud with minimal setup.

  3. Sambanova-gradio: A Python package that simplifies creating ML apps using Sambanova's Inference API and Gradio interfaces. It allows you to quickly deploy and customize interactive Gradio UIs for accessing Sambanova-hosted models like Meta's Llama family.

  4. Awesome LLM Apps: Build awesome LLM apps using RAG to interact with data sources like GitHub, Gmail, PDFs, and YouTube videos through simple text. These apps will let you retrieve information, engage in chat, and extract insights directly from content on these platforms.

Hot Takes

  1. Hot take🔥: I think there is a huge overinflated perception of how interested consumers are in having AI Agents do shopping / browsing tasks for them.
    People generally want agents that will do the boring parts for them, but many of those tasks tend to be higher risk... ~
    Logan Kilpatrick

  2. Google is the next Yahoo. ~
    Bojan Tunguz

Meme of the Day

That’s all for today! See you tomorrow with more such AI-filled content.

🎁 Bonus worth $50 💵 

Share this newsletter on your social channels and tag Unwind AI (X, LinkedIn, Threads, Facebook) to get AI resource pack worth $50 for FREE. Valid for a limited time only!

Unwind AI - X | LinkedIn | Threads | Facebook

PS: We curate this AI newsletter every day for FREE, your support is what keeps us going. If you find value in what you read, share it with at least one, two (or 20) of your friends 😉 

Reply

or to participate.