Here’s Why GPUs Are Deep Learning’s Best Friend

If you have a curiosity about how fancy graphics cards actually work, and why they are so well-suited to AI-type applications, then take a few minutes to read [Tim Dettmers] explain why this is so. It’s not a terribly long read, but while it does get technical there are also car analogies, so there’s something for everyone!

He starts off by saying that most people know that GPUs are scarily efficient at matrix multiplication and convolution, but what really makes them most useful is their ability to work with large amounts of memory very efficiently.

Essentially, a CPU is a latency-optimized device while GPUs are bandwidth-optimized devices. If a CPU is a race car, a GPU is a cargo truck. The main job in deep learning is to fetch and move cargo (memory, actually) around. Both devices can do this job, but in different ways. A race car moves quickly, but can’t carry much. A truck is slower, but far better at moving a lot at once. Continue reading “Here’s Why GPUs Are Deep Learning’s Best Friend”

High Quality 3D Scene Generation From 2D Source, In Realtime

Here’s some fascinating work presented at SIGGRAPH 2023 of a method for radiance field rendering using a novel technique called Gaussian Splatting. What’s that mean? It means synthesizing a 3D scene from 2D images, in high quality and in real time, as the short animation shown above shows.

Neural Radiance Fields (NeRFs) are a method of leveraging machine learning to, in a way, do what photogrammetry does: synthesize complex scenes and views based on input images. But NeRFs work in a fraction of the time, and require only a fraction of the source material. There are different ways to go about this and unsurprisingly, there tends to be a clear speed vs. quality tradeoff. But as the video accompanying this new work seems to show, clever techniques mean the best of both worlds.

A short video summary is embedded just below the page break. Interested in deeper details? The research PDF is here. The amount of development this field has seen is nothing short of staggering, and certainly higher in quality than what was state-of-the-art for NeRFs only a year ago.

Continue reading “High Quality 3D Scene Generation From 2D Source, In Realtime”

Art of 3D printer in the middle of printing a Hackaday Jolly Wrencher logo

Make Better 3D Printed Molds, For Thermoforming Plastics

Thermoforming — which includes vacuum-forming — has its place in a well-rounded workshop, and Mayku (makers of desktop thermoforming machines) have a short list of tips for getting the best results when 3D printing molds on filament-based printers.

A mold is put into direct, prolonged contact with a hot sheet of semi-molten plastic. If one needs a mold to work more than once, there are a few considerations to take into account. The good news is that a few simple guidelines will help get excellent results. Here are the biggest ones:

  1. The smoother the vertical surfaces, the better. Since thermoforming sucks (or pushes) plastic onto and into a mold like a second skin, keeping layer heights between 0.1 mm and 0.2 mm will make de-molding considerably easier.
  2. Generous draft angles. Aim for a 5 degree draft angle. Draft angles of 1-2 degrees are common in injection molding, but a more aggressive one is appropriate due to layer lines giving FDM prints an inherently non-smooth surface.
  3. Thick perimeters and top layers for added strength. The outside of a mold is in contact with the most heat for the longest time. Mayku suggests walls and top layer between 3 mm to 5 mm thick. Don’t forget vent holes!
  4. Use a high infill to better resist stress. Molds need to stand up to mechanical stress as well as heat. Aim for a 50% or higher infill to make a robust part that helps resist deformation.
  5. Ensure your printer can do the job. 3D printing big pieces with high infill can sometimes lift or warp during printing. Use enclosures or draft shields as needed, depending on your printer and material.
  6. Make the mold out of the right material. Mayku recommends that production molds be printed in nylon, which stands up best to the heat and stress a thermoforming mold will be put under. That being said, other materials will work for prototyping. In my experience, even a PLA mold (which deforms readily under thermoforming heat) is good for at least one molding.

Thermoforming open doors for an enterprising hacker, and 3D printing molds is a great complement. If you’re happy being limited to small parts, small “dental” formers like the one pictured here are available from every discount overseas retailer.  And of course, thermoforming is great for costumes and props. If you want to get more unusual with your application, how about forming your very own custom-shaped mirrors by thermoforming laminated polystyrene?

Super NES Cartridge Pulls A Sneaky, Plays Minecraft

Sometimes it’s the little touches and details that make a project. That’s certainly the case with [Franklinstein]’s Super Nintendo (SNES) Cartridge Hard Drive. It might only be an enclosure for a solid-state hard drive with a USB interface, but the attention to detail is what really makes it worth checking out.

A SNES cartridge has a pretty standard clamshell-ish construction, but fitting the solid-state drive plus cable adapter turned out to be a bit of a challenge.

Since [Franklinstein] wanted the cartridge to look as original as possible, careful measuring and cutting was needed to securely fit the drive and provide an unobtrusive USB-C port tucked discreetly into the cartridge’s opening. We like the technique of using a 3D printed fixture to take up the slack on the cable by exactly the right amount, resulting in a 100% rattle-free end product. A custom Minecraft sticker label provides the finishing touch.

Being able to plug it into a computer and actually play Minecraft is a neat gimmick, but it really shows that some careful construction and assembly can be what makes something look like a clean build instead of a hack job. Take a look at additional build detail and pictures, and check out the video of the build, embedded below.

Hey, if sneaky cartridge mod tricks intrigue you, then you’ll absolutely want to check out how it was possible to play DOOM on a NES from a cartridge. Maybe that’s the next evolution for a cartridge with a Minecraft label on it?

Continue reading “Super NES Cartridge Pulls A Sneaky, Plays Minecraft

A Hacker-Friendly Software Package For Your Next AI Project

If you’re interested in using Large Language Models (LLM) in a project, but aren’t plugged directly into the fast-developing world of artificial intelligence (AI), knowing what tool or software to use can be daunting. Luckily, [Max Woolf] created simpleaichat, which is complete with examples and documentation and minimal code complexity.

As [Max] puts it, the main motivations behind the project are to provide useful tools while making it easier for non-engineers to peer through the breathless hyperbole and see just how AI-based apps actually work. This project was directly inspired by [Max]’s own real-world software experiences in this area, particularly his frustrations with popular and much-hyped frameworks in which “Hello World” feels a lot more like Hell World.

simpleaichat is a Python package that provides easy and powerful ways to interface with the OpenAI API, makers of ChatGPT. Now, it is true that OpenAI’s models are not open source and access is not free, but they are easily one of the most capable and cost-effective services of their kind.

Prefer something a little more open, and a lot more private? There’s always the option to run an LLM locally on your own machine, possibly with the help of a tool like text-generation-webui or gpt4all. Running an LLM locally will not have the quality of OpenAI’s offerings, but it can still do the job. It’s also possible to give these local LLMs an interface that mimics OpenAI’s API, so there are loads of possibilities.

Are you getting ideas yet? Share them in the comments, or keep them to yourselves and submit a tip once your project is off the ground!

Checking Belt Tension Gets Easier For (Some) Prusa 3D Printers

Belts on a 3D printer should be tight enough, but not too tight. That can be an iffy thing to get right for someone who lacks familiarity with CNC platforms. Prusa Research aims to make it a bit easier with a web app that can measure tension via your mobile phone’s microphone and diagnose belt tightness, at least for their MK4 and XL printers.

Using different tools to analyze belt tightness (including belt acoustics) have been tried in the past with mixed results, but this is a pretty focused approach that aims to give exact guidance for specific printer models. It’s pretty useful to provide someone with a reliable go/no-go number, after all.

What happens to a printer if a belt’s tension is not right? Well, there’s actually a pretty forgiving range within which the printer will mostly work fine, but not as well as it could be. Loose belts can have novices chasing other problems, and overly-tightened belts definitely put extra strain on parts. It’s one of those things that’s worth a little extra work to get right.

3D printable tension meter is a different option for Prusa MK3 and Mini printers, if one has some Prusament PETG to print it in.

Everything about belt tension for Prusa printers is covered in their documentation, but did you know there’s also neat 3D printable tension meter for Prusa MK3 and Mini printers? It’s meant to be printed in Prusament PETG (printing in other materials may have different results) but it’s a pretty neat idea for a tool.

If you have a Prusa MK4 or XL and want to try their new method, go here and allow access to your device’s microphone. Then select a printer model and an axis to test. Gently strum the upper part of the belt (avoid touching the bottom belt in the process) and watch live results telling you whether the belt is too tight, too loose, or just right. Prusa have a video demonstrating the process, also embedded below.

Continue reading “Checking Belt Tension Gets Easier For (Some) Prusa 3D Printers”

Text Compression Gets Weirdly Efficient With LLMs

It used to be that memory and storage space were so precious and so limited of a resource that handling nontrivial amounts of text was a serious problem. Text compression was a highly practical application of computing power.

Today it might be a solved problem, but that doesn’t mean it doesn’t attract new or unusual solutions. [Fabrice Bellard] released ts_zip which uses Large Language Models (LLM) to attain text compression ratios higher than any other tool can offer.

LLMs are the technology behind natural language AIs, and applying them in this way seems effective. The tradeoff? Unlike typical compression tools, the lossless decompression part isn’t exactly guaranteed when an LLM is involved. Lossy compression methods are in fact quite useful. JPEG compression, for example, is a good example of discarding data that isn’t readily perceived by humans to make a smaller file, but that isn’t usually applied to text. If you absolutely require lossless compression, [Fabrice] has that covered with NNCP, a neural-network powered lossless data compressor.

Do neural networks and LLMs sound far too serious and complicated for your text compression needs? As long as you don’t mind a mild amount of definitely noticeable data loss, check out [Greg Kennedy]’s Lossy Text Compression which simply, brilliantly, and amusingly uses a thesaurus instead of some fancy algorithms. Yep, it just swaps longer words for shorter ones. Perhaps not the best solution for every need, but between that and [Fabrice]’s brilliant work we’re confident there’s something for everyone who craves some novelty with their text compression.

[Photo by Matthew Henry from Burst]