AI

AI

Write for Towards Data Science | Towards Data Science

Quick Links: Why become a contributor? We are looking for writers to propose up-to-date content focused on data science, machine learning, artificial intelligence and programming. If you love to write about these topics, read on! Reach a broader audience with your articles. We are one of the most popular data science sites in the world. TDS started as a publication on Medium, amassing more than 700k followers and becoming the most-read publication on the site.

Read More »
AI

Debugging the Dreaded NaN | Towards Data Science

You are training your latest AI model, anxiously watching as the loss steadily decreases when suddenly — boom! Your logs are flooded with NaNs (Not a Number) — your model is irreparably corrupted and you’re left staring at your screen in despair. To make matters worse, the NaNs don’t appear consistently. Sometimes your model trains just fine; other times, it fails inexplicably. Sometimes it will crash immediately, sometimes after many days of training. NaNs in

Read More »
AI

How LLMs Work: Reinforcement Learning, RLHF, DeepSeek R1, OpenAI o1, AlphaGo | Towards Data Science

Welcome to part 2 of my LLM deep dive. If you’ve not read Part 1, I highly encourage you to check it out first.  Previously, we covered the first two major stages of training an LLM: Pre-training — Learning from massive datasets to form a base model. Supervised fine-tuning (SFT) — Refining the model with curated examples to make it useful. Now, we’re diving into the next major stage: Reinforcement Learning (RL). While pre-training and SFT are well-established, RL

Read More »
AI

The Dangers of Deceptive Data–Confusing Charts and Misleading Headlines | Towards Data Science

“You don’t have to be an expert to deceive someone, though you might need some expertise to reliably recognize when you are being deceived.” When my co-instructor and I start our quarterly lesson on deceptive visualizations for the data visualization course we teach at the University of Washington, he emphasizes the point above to our students. With the advent of modern technology, developing pretty and convincing claims about data is easier than ever. Anyone can

Read More »
AI

Nine Rules for SIMD Acceleration of Your Rust Code (Part 1) | Towards Data Science

Thanks to Ben Lichtman (B3NNY) at the Seattle Rust Meetup for pointing me in the right direction on SIMD. SIMD (Single Instruction, Multiple Data) operations have been a feature of Intel/AMD and ARM CPUs since the early 2000s. These operations enable you to, for example, add an array of eight i32 to another array of eight i32 with just one CPU operation on a single core. Using SIMD operations greatly speeds up certain tasks. If you’re not using SIMD, you may

Read More »
AI

LLaDA: The Diffusion Model That Could Redefine Language Generation | Towards Data Science

Introduction What if we could make language models think more like humans? Instead of writing one word at a time, what if they could sketch out their thoughts first, and gradually refine them? This is exactly what Large Language Diffusion Models (LLaDA) introduces: a different approach to current text generation used in Large Language Models (LLMs). Unlike traditional autoregressive models (ARMs), which predict text sequentially, left to right, LLaDA leverages a diffusion-like process to generate text. Instead of

Read More »
AI

When Optimal is the Enemy of Good: High-Budget Differential Privacy for Medical AI | Towards Data Science

Imagine you’re building your dream home. Just about everything is ready. All that’s left to do is pick out a front door. Since the neighborhood has a low crime rate, you decide you want a door with a standard lock — nothing too fancy, but probably enough to deter 99.9% of would-be burglars. Unfortunately, the local homeowners’ association (HOA) has a rule stating that all front doors in the neighborhood must be bank vault doors. Their reasoning?

Read More »
AI

Is Python Set to Surpass Its Competitors? | Towards Data Science

A soufflé is a baked egg dish that originated in France in the 18th century. The process of making an elegant and delicious French soufflé is complex, and in the past, it was typically only prepared by professional French pastry chefs. However, with pre-made soufflé mixes now widely available in supermarkets, this classic French dish has found its way into the kitchens of countless households.  Python is like the pre-made soufflé mixes in programming. Many

Read More »
AI

Efficient Data Handling in Python with Arrow | Towards Data Science

1. Introduction We’re all used to work with CSVs, JSON files… With the traditional libraries and for large datasets, these can be extremely slow to read, write and operate on, leading to performance bottlenecks (been there). It’s precisely with big amounts of data that being efficient handling the data is crucial for our data science/analytics workflow, and this is exactly where Apache Arrow comes into play.  Why? The main reason resides in how the data

Read More »
AI

Breaking the Bottleneck: GPU-Optimised Video Processing for Deep Learning | Towards Data Science

Deep Learning (DL) applications often require processing video data for tasks such as object detection, classification, and segmentation. However, conventional video processing pipelines are typically inefficient for deep learning inference, leading to performance bottlenecks. In this post will leverage PyTorch and FFmpeg with NVIDIA hardware acceleration to achieve this optimisation. The inefficiency comes from how video frames are typically decoded and transferred between CPU and GPU. The standard workflow that we may find in the

Read More »