Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

I finally landed on a memory-optimal way to render audio waveforms in the browser. The full audio is decoded once, then chunked into 2s bins. Each bin stores peaks at 800 peaks/sec in a Uint8Array. Bins are persisted individually in IndexedDB, which keeps the data as raw Uint8 arrays...

32,463 görüntüleme • 5 ay önce •via X (Twitter)

0 Yorum

Yorum bulunmuyor

Orijinal gönderinin yorumları burada görünecek

Benzer Videolar

See that red tape line on the floor? You better not cross it before they tell you “GO!” or you’ll not only get yelled at, you’ll make about 100 people instantly dislike you. My first experience at the Goodwill bins… this operation is so much crazier than I was expecting. This sweet woman spotted me sticking out like a sore thumb. “You a first timer?” She proceeded to give me the rundown: “The college kid resellers are aggressive. See those bins along that wall? Be careful if you go there. They’ll snatch things right out of your hands.” “Every 30-45 minutes they swap out the bins. You have to stay behind the tape line.” “Don’t bring your cart on the floor. Go to the register and get a piece of paper to tape your name on the cart and leave it along the wall.” I have never seen anything like it. And of course, I snuck by the warehouse doors to peek inside what’s happening behind the scenes. Massive pallet racking FULL of clothes bales. I’m talking hundreds of thousands of pieces. Conveyer belt sorting systems with everything you can imagine. Pallets of bicycles. Filthy vacuums. And rolling bins. A bazillion rolling bins full of who knows what, but apparently some treasure. Before you get triggered by “people making money off donations that are ‘supposed’ to support people who are impoverished,” I invite you to go see an operation like this. The amount of excess materialism is astounding, and this is a microscopic fraction of it. Resellers duking it out over labels and prized goods all day everyday at places like this are playing an extremely important role in a circular economy that is making a difference in the appalling about of waste we have created as a society. You won’t find me doing this to source inventory, but of course I snagged a small stack of books because who would I be if I didn’t 😜 And I have a lot of respect for the number of young adults I saw hustling their way through this chaos, leaving with garbage bags full of items that are putting food on their tables. Wild.

Mindi

19,955 görüntüleme • 5 ay önce

Day 12/90 of Inference Engineering What is chunked prefill within vLLM? In continuation of yesterday's post on the high level architecture of vLLM, I want to dive deeper into vLLM core engine starting with the mechanics of chunked prefill. In this post, I will closely follow the original blog on the anatomy of vLLM. To start, let's define chunked prefill. It's a runtime inference optimization technique that splits a long input request so that it doesn’t monopolize the whole GPU. Keep in mind this is all within the context of vLLM. And since vLLM is an inference engine that's meant to serve a model to multiple concurrent users, having a GPU that’s fully monopolized on a single user's request means other users' requests would be in queue waiting to be processed. It isn’t too good to have the whole GPU occupied on a single request when the GPU is meant to be shared! So the key idea behind chunked prefill is to break the long request into smaller chunks, so that each chunk along with other users' requests gets processed and written into the KV cache together. Suppose we split up the long request into chunks and each chunk has 8 tokens. Now each memory block can hold 4 tokens. Therefore, 8 tokens can fit into 2 blocks of memory. After the first forward pass, 2 blocks are occupied, and after the second forward pass, 4 blocks of memory are occupied and so forth. Each forward pass handles a small chunk of the long request so that there's room in the same pass to keep serving other users' requests. Here's a small animation that I made today to fully visualize the idea behind chunked prefill when learning this topic~

max fu

28,847 görüntüleme • 5 gün önce

Researchers made KMeans 200x faster. And the new technique also beats approaches like cuML and FAISS. Flash-KMeans is an IO-aware implementation of exact KMeans that redesigns the algorithm around modern GPU bottlenecks. By attacking the memory bottlenecks directly, Flash-KMeans achieves: - 33x speedup over cuML - 200x speedup over FAISS This speedup comes from how it moves through GPU memory. Standard KMeans runs in two steps, and both are bottlenecked by reads and writes to GPU memory: 1) The first step matches every point to its nearest centroid. Standard KMeans computes the full point-to-centroid distance matrix, writes it out to GPU memory, then reads it back to find each nearest centroid. That write-then-read round trip is the bottleneck. Flash-KMeans combines the distance calculation with the nearest-centroid step, so the result is computed on-chip and the full matrix is never written out. 2) The second step recomputes each centroid by averaging the points assigned to it. Standard KMeans has thousands of threads writing into the same centroid slots at once, so they stall waiting for their turn. Flash-KMeans sorts points by cluster first, turning scattered writes into sequential reductions that read and write memory in one efficient pass. Using these two optimizations at the million-scale, Flash-KMeans completes a standard KMeans iteration in a few milliseconds. The video below depicts this in action. Several reasons why this is important: KMeans has always been an offline primitive. Something you run once to preprocess data and move on. These speedups make the approach viable in several runtime-critical systems. ↳ Vector indices like FAISS use KMeans to build search indices. Faster KMeans means you can re-index dynamically as data changes. ↳ LLM quantization methods need KMeans to find optimal weight codebooks, per layer, repeatedly. What takes hours could now take minutes. ↳ MoE models need fast token routing at inference time. Flash-KMeans makes it viable to run this inside the inference loop, not just in preprocessing. I have shared the paper in the replies. That said, memory is the real constraint Flash-KMeans solves, and the problem is not just limited to clustering. The vectors a RAG system stores after indexing create similar bottlenecks. I wrote a detailed walkthrough recently on cutting this vector memory by 32x with binary quantization, querying 36M+ vectors in a few milliseconds. Read it below.

Avi Chawla

89,234 görüntüleme • 1 ay önce

Claude Monet painted the same stretch of cliff more than ninety times. The place is Étretat, a small fishing village on the coast of Normandy, where the chalk cliffs fall into the sea in great arches and a single spire of rock, the Aiguille, stands alone in the water. Monet had known the place since childhood. He grew up in Normandy, and these cliffs were among the first landscapes he ever saw... He returned to paint them again and again. He worked through the 1880s in front of the same rock formations, and across that time he produced more than ninety canvases of them: the cliffs at dawn, at sunset, under storm, under calm, in winter light and in the gold of a clear evening. In his letters to Alice, the woman he would later marry, he described the agony of it: the weather turning, the tide rising, the sun moving, the colour he had begun to capture vanishing before he could finish. He often worked on several canvases at once, switching between them as the conditions changed, racing each one against the hour. In a letter to his friend Frédéric Bazille he wrote: "It is beautiful here in Etretat. Every day I discover even more beautiful things. It is intoxicating me, and I want to paint it all, my head is bursting. I want to fight, scratch it off, start again, because I start to see and understand. It seems to me as if I can see nature and I can catch it all." The cliffs of Étretat had stood for millions of years and would look, to most people, the same on any given day. Monet saw that they were never the same even for two minutes. He stood on that shore and tried to hold, on canvas, something that exists only for an instant and then is gone forever. And that's exactly what those paintings really are: 90 attempts to keep a single, vanishing moment of light from disappearing. As Dylan Thomas once wrote: "Do not go gentle into that good night. Rage, rage against the dying of the light." -- -- -- If you want a deeper dive into the craft of painting, I recently wrote a piece exploring it in detail. You can read it here: And if you'd like to support my work, a paid subscription is what makes it possible:

James Lucas

57,710 görüntüleme • 1 ay önce

"PRICE IS WHAT YOU PAY. VALUE IS WHAT YOU GET." I keep buying $Kekec and I have a strong conviction. Here's Why: While the market is down, and Kekec is declining with it, there are data points that few are considering. Kekec borned in October and since then has been posting a different and original 30-second video every day, which I find extremely funny. For the past couple of months, they have also been posting daily on Instagram, and the attention on Kekec (which doesn't present itself on social media as a memecoin) is growing, moreover, it's increasing exponentially. The number of followers is increasing by about 500-1000 a day. This is largely due to the fact that they are not just focused on the main account but have several others that post reels and redirect to the main one. In short, an excellent strategy to keep growing more and more. Instagram link: Guess What? Not only are the followers increasing, but the team's workload is also growing. In fact, for a little over a month, they have also started pushing on YouTube, and the data here is promising as well. YouTube link: If we want to make a comparison, we can take Pudgy Penguins as an example, which has shown it can reach millions and millions of users without mentioning that they are a WEB3 company that owns an NFT collection. Or, if we want to be more appropriate by comparing one memecoin to another, we could take PONKE. Thanks to the use of social media and the quality of their content, they managed to achieve incredible numbers, which then translated into an increase in the coin's price. Kekec came before PONKE, but that doesn't necessarily mean it's better than PONKE. I believe PONKE is unbeatable in terms of content, but I want to make you reflect on an important point. PONKE came after KEKEC, and after PONKE's success, many coins have emerged trying to imitate it. One of KEKEC's strengths, in my opinion, is precisely the fact that it leverages social media without being a copy-paste. Instead, it is a unique meme derived from a 90's film, and it uses a unique form of content. In short, KEKEC > KEKEC and no one else. I want to conclude by suggesting you follow them on Instagram and evaluate not only the exponential growth of their followers day by day but also observe how the views of each reel increase accordingly. Pay special attention to the comments. Many of the people commenting have no idea what it is, and you can see from the comments how Kekec generates particular emotions in people—strange but still emotions. Personally, I believe that when something is unique and even very strange, it needs time to be adopted. However, once it happens, it usually explodes and spreads like never before. A few days ago, a Kekec video was posted by a very popular meme page. They probably don't know what Kekec is about but thought the video could spark interest among their followers. How many other pages will do the same? Lastly, but not least, I want to point out how Kekec maintains a good market cap despite everything that has happened in the crypto world since October 2023. As far as I know and have personally observed, everything is extremely organic. There is no cabal behind it, and the quality is not reflected in a single jpeg but in work that has been ongoing daily for months. Every day they work harder, and the quality of their videos grows as well. I have no affiliations with the team, but I believe that Kekec truly deserves more in this world where we push celebrity or cabal-backed coins to hundreds of millions in market cap. I keep buying because the numbers suggest so. Don't just evaluate the chart (price), evaluate the data (value). BÂLKÂN DWÂRF

m0ment0

133,194 görüntüleme • 2 yıl önce

The ATG School One-Pager I’m not trying to reinvent schooling. There are just a handful of things I believe in which I haven’t seen in any school I’ve been around as a student or parent. Policy #1: Each student gets to be responsible for growing some of their own food, no matter how small, and THROUGHOUT schooling (not just a quickie project here or there). Policy #2: Minimum 1:1 ratio of time NOT SITTING IN THE CLASSROOM. What you do with this is up to you. There are so many real world skills, sports, gardening, music, etc. The strict ratio in the school day is the key for me. Common sense and personal interests can take it from there. Policy #3: Daily time to read whatever you want to read about. The biggest barrier for my reading was INTEREST. Be there to ensure the book is at their level, and to help them if they don’t understand something. Other than that, LET THEM ENJOY READING, ALL THE WAY THROUGH SCHOOL, not just in early years. Policy #4: (This is the most unusual yet the biggest reason I’m in education.) High school is a 50/50 bridge to winning in real life. Mornings are for actual work, making and SAVING UP MONEY. Afternoons are for learning finances and professional skills of YOUR INTEREST. With average work, you’ll finish school with $50,000-$100,000 in the bank, more skills than the norm, and a greater chance of creating your life and work from there on out, rather than conforming to make a paycheck. Policy #5: As part of the high school 50/50 system, ensure each student learns the adult financial red tape in your state/country before you’ve got bills, kids, etc.

KneeOverToesGuy

31,525 görüntüleme • 4 ay önce

What happens when an autonomous robotaxi gets into an accident? So far, nothing. Yesterday, I rode in a Zoox robotaxi and got hit by an RTC bus in front of New York New York. The Zoox was trying to turn right into New York New York on Tropicana Avenue just after crossing Las Vegas Boulevard and the bus was trying to get over to make its stop. What I saw, was the RTC bus merging into the front left of the Zoox robotaxi and then a crunching sound followed by a grinding sound. Pretty sure it was the RTC bus at fault. Impact detected. The Zoox robotaxi stayed in place while a warning popped up on the user display. Zoox support came over the in-car speaker and asked if I was okay and then eventually had me exit the vehicle at the New York New York rideshare area. Then, it just took off. The RTC bus? It also took off. The driver never got out to check to see what happened. Loaded up some passengers and went about the day. Nobody stayed around to file a police report, so I did. The Nevada State Troopers are scratching their heads at what to do here and so am I. Now I have a lot of questions that won’t get answered probably. I am okay and not injured thankfully, just shaken up a bit. As far as riding Zoox again, I feel it is safe to ride and highly recommend trying it out if you haven’t. On a side note: The Zoox took the hit pretty well and I couldn’t see damage when I checked it out. The bus had a nice scrape on its right wheel fender. I will keep you all updated on this.

Chris Holmes

94,476 görüntüleme • 4 ay önce

Day 11/90 of Inference Engineering How does vLLM work and how is it used in production? Before we discuss how vLLM works internally, it helps to understand what vLLM is. At a high level, vLLM is an inference engine that is designed to serve LLMs to thousands of concurrent users efficiently while managing scarce compute and memory. The goal for vLLM is to maximize throughput and minimize latency; optimizing for the best inference economics and experience for end users. With every request from the end user, it eventually ends up in the engine core, gets scheduled alongside other requests from other concurrent users, executes on the GPU, and updates the KV cache with the new key and value vectors, and streams the tokens back to the user. The Scheduler decides what requests should execute next while continuously batching requests together to maximize GPU utilization. Continuous batching is an inference optimization that allows new requests to join a running batch as other requests finish generating tokens. This helps with keeping the GPU utilization high instead of letting it sit idle waiting for an entire batch to complete generating. After the scheduler dispatches the selected batch to the Model Executor, the Model Executor prepares the tensors and metadata required for inference, retrieves each request’s block table from KV Cache Manager, launches the optimized transformer forward pass on the GPU, computes the logits, updates the KV cache with the new key and value vectors, and finally returns the results for sampling and streaming. The KV Cache Manager uses the PagedAttention memory layout to allocate fixed-size cache blocks on demand and maintains a Free Block Queue on the CPU that tracks which blocks in the GPU’s Paged KV Cache are currently free. When a request needs additional KV cache space, the KV Cache manager takes a free block from the queue and assigns it to that request, thus avoiding an expensive search through GPU memory for available cache blocks. All of these components form the core of vLLM’s inference engine. The Scheduler determines what requests are executed, the Model Executor determines how those requests are executed, the KV Cache Manager determines where each request’s KV cache lives using the PagedAttention Memory Layout. This architecture enables vLLM to serve thousands of concurrent requests with high throughput, low latency, and efficient GPU memory utilization. Heres a little animation that visualizes everything! - I've also completed the forward pass for my mnist.c project. I had a nice chat with shrey birmiwal, such a knowledgeable guy. Excited to learn more about vLLM and implement a tiny-vLLM one day.

max fu

69,270 görüntüleme • 6 gün önce

This guy built a visual scanner that reads 468 points on his face and 42 points on his hands from a regular webcam and turns them into a cloud of thousands of particles right between his palms. Inside, MediaPipe and TouchDesigner are linked: the first captures hands and face from the webcam with high accuracy, the second turns those coordinates into a live plane and feeds it into a POP system that instantly generates a swarm of particles in the shape of a head. No studio, no render farmer, no VR headset. Just a laptop, a webcam, and 1 TouchDesigner session. And traditional VJ studios keep teams of 5 people on a setup with lighting, custom hardware, and commercial plugins, while his expenses are only a TouchDesigner subscription and a regular USB camera. One laptop runs MediaPipe and TouchDesigner simultaneously, holds the camera stream at 60 FPS without drops, and in parallel processes 468 face points + 21 points on each hand. The camera captures frame after frame, MediaPipe in real time sends TouchDesigner the finger coordinates and face geometry, and the POP operator inside the engine translates those numbers into thousands of particle points with colors from bright pink to gold. This setup immediately defines the role of the tool and the limits of its autonomy. It knows where the fingertips are at every moment of the frame. It knows how to read the face geometry at any angle to the camera. It knows how to draw a swarm of particles between them with the right color and contour. → MediaPipe pulls 468 points from the face and 21 points from each hand, 60 times per second → TouchDesigner receives those coordinates, builds a virtual rectangle between the fingertips, and feeds it into the POP system → POP generates thousands of particle points in the shape of a head, coloring them in a gradient from bright pink to gold → The HUD layer adds green corners and a blue neon frame, styling the image like an AR interface → All layers assemble into 1 real-time frame that projects back onto the video in the camera window → The final image is recorded to a file or broadcast to a projector for a live installation And only when the guy spreads his hands wider does the plane between the palms stretch; brings them together, it narrows. Otherwise the system runs on its own. And when he moves from his home room to a concert hall, the same laptop with the same webcam launches the same TouchDesigner session in just 5 minutes, without reconfiguration, without a new team, and without a single line of new code. In his work setup there is no studio of his own and no team for assembly. On the desk sits a laptop with a webcam, on top run MediaPipe and TouchDesigner with POP operators, and the same setup through a USB camera moves to any concert without a new configuration. Out of everything I have seen this year, this is the cleanest Creative Coding setup on 1 laptop: 0 render farms, 0 studio lighting, and between them 3 libraries, thousands of particle points, and 1 webcam.

Blaze

38,242 görüntüleme • 2 ay önce