Finishing 10 minute task in 2 hours using ChatGPT

Many of us have heard stories where one was able to complete days worth of work in minutes using AI, even being outside of one's area of expertise. Indeed, often LLM's do (almost) miracles, but today I had a different experience.

The task was almost trivial: generate look-up table (LUT) for per-channel image contrast enhancement using some S-curve function, and apply it to an image. Let's not waste any time: just fire up ChatGPT (even v3.5 should do, it's just a formula), get Python code for generic S-curve (code conveniently already had visualization through matplotlib) and tune parameters until you like it before plugging it into image processing chain. ChatGPT generated code for logistic function, which is a common choice as it is among simplest, but it cannot change curve shape from contrast enhancement to reduction simply by changing shape parameter.

The issue with generated code though was that graph was showing that it is reducing contrast instead of increasing it. When I asked ChatGPT to correct this error - it apologized and produced more and more broken code. Simply manually changing shape parameter was not possible due to math limitation - formula is not generic enough. Well, it is not the end of the world, LLM's do have limits especially on narrow-field tasks, so it's not really news. But the story does not end here.
October 22, 2023

Sirius and color twinkling

Many had noticed that bright stars do twinkle, while planets do not. Recently, when looking at Sirius at low elevation I noticed it's not just brightness but also color twinkling. I took Sigma 50-500mm lens at F8 (62mm aperture), and did 4 second exposure while allowing camera to wobble so that variation of brightness and/or color would be recorded. Results really surprised me.

Why it happens? Stars twinkle due to turbulence of the atmosphere acting as a random gradient refractive index "prism" (which is randomly shifting image & splitting colors - yes, even air has dispersion and it's visible here!) - so more/less light of different colors randomly hit lens aperture / eye. For stars air turbulence is sampled (in this case) in cylinder 62mm in diameter and ~50km in length, which makes effect very visible. Jupiter for example will average turbulence over a cone which opens up to 7.2m at 50km due to angular size of the planet, which will dramatically reduce contrast of twinkling due to averaging. Same averaging (reduction of twinkling) could happen for large telescopes (300mm+) even for stars, simply due to averaging across larger air volume.
September 25, 2023

EVE Online - it's getting crowded in space

Last few years we see more space games in the news - No Man's Sky, Starfield, long awaited Star Citizen and many more. In light of new competition it seems EVE Online also perked up and started to try to get old players back into the game. They were successful with me, so i dug up my old 13-year old account to look around (now it's easier - one don't need money any more to look around). Surely, in a decade game changed in many ways. Also, returning/new players should now get 1'000'000 SP on first login and that's the point of this post.

 
September 24, 2023

65B LLaMA on CPU


16 years ago dog ate my AI book. At the time (and way before that) common argument on «Why we still don't have AI working and it is always 10 years away» was that we can't make AI work even at 1% or 0.1% human speed, even on supercomputers of the time – therefore it's not about GFLOPS.
May 22, 2023

First tiny ASIC sent to manufacturing

5 years ago making microchip from high-level HDL with your own hands required around 300k$ worth of software licenses, process was slow and learning curve steep.

Yesterday I've submitted my first silicon for manufacturing and it was... different. In the evening wife comes as asks "How much time until deadline?". I reply: "2 hours left, but I still have to learn Verilog." (historically my digital designs were in VHDL or schematic).

All this became possible thanks to Google Skywater PDK and openlane synthesis flow - which allowed anyone to design a microchip with no paperwork to sign and licenses to buy. Then https://tinytapeout.com by Matt Venn lowered the barrier even further (idea to tapeout in ~4 hours, including learning curve).
September 4, 2022

This cake is a lie.

Stable Diffusion model that was publicly released this week is a huge step forward in making AI widely accessible.

Yes, DALL-E 2 and Midjourney are impressive, but they are a blackbox. You can play with it, but can't touch the brain.

Stable Diffusion not only can be run locally on relatively inexpensive hardware (i.e. sized perfectly for wide availability, not just bigger=better), it is also easy to modify (starting from tweaking guidance scale, pipeline and noise schedulers). Access to latent space is what I was dreaming about, and Andrej Karpathy's work on latent space interpolation https://gist.github.com/karpathy/00103b0037c5aaea32fe1da1af553355) is just the glimpse into many abilities some consider to be unnatural.

Model is perfect with food, good with humans/popular animals (which are apparently well represented in the training set), but more rare Llamas/Alpakas often give you anatomically incorrect results which are almost NSFW.

On RTX3080 fp16 model completes 50 inference iterations in 6 seconds, and barely fits into 10Gb of VRAM. Just out of curiosity I run it on CPU (5800X3D) - it took 8 minutes, which is probably too painful for anything practical.

One more reason to buy 4090... for work, I promise!
August 26, 2022

Voron V0.1 - Ferrari among 3D printers (V0.1430)


Finished assembly and tuning of my new Voron V0.1. Stationary parts are from aluminum kit, rest I printed in ASA-X. Small size allows to reach very decent speeds and accelerations: fast profile 175/306 mm/s (perimeters / infill) with acceleration of 25'000 mm/s². For high quality - 80/150 mm/s, 15'000 mm/s². Fast acceleration and direct extruder make parameters tuning for high quality comparatively easy as extrusion speed is nearly constant. Also, pressure advance + input shaper allowed to increase acceleration from 5'000 to 25'000 mm/s² with no quality degradation on the corners.

It all works on Fluidd+Klipper, SKR-PRO v1.2 + Raspberry Pi 4. When printing 306mm/s @265°C - 40W heater is no longer enough, so I had to overclock printer a little to 28V (+36% heater power). 28V is a limit for TMC2209.

Initially I was considering to participate in SpeedBenchy contest - but things there went too far in the direction of "too fast / too bad". Printing at these speeds is limited by plastic cooling - this is why achievable speeds for high quality prints for ABS/ASA are several times higher than PLA. I.e. printing above 200mm/s is all about cooling, and is a contest of fans and air-ducts.

Update: Got my serial number V0.1430 :-)
 
February 8, 2022

Walking with Alpakas

 
February 7, 2022

Milky Way @ Gurnigel, Switzerland (1593m)


30 seconds, A7III with Samyang 8mm F2.8 @ F4. Yes, this is an APS-C lens on a full frame camera - to have larger pixels / lower noise, as higher resolution here does not help. Largest challenge was Chroma noise, ether hot pixels or when star is focused into a single pixel and it's impossible to recover real color of the star. To fix that I just reset all unusually high & sharp Chroma values to neutral.

Light pollution is visible on the horizon (left side) - it's from the nearest city, Thun - 13km away.
 
August 15, 2021

C/2020 F3 (NEOWISE)

Made a photo of С/2020 F3 NEOWISE comet, making all the news now. Sigma 70mm F2.8 (@3.5), 60x2.5s (stacked).
After subtracting background - double tail became visible (dust & gas).

On mouse over - color, on click - annotation. Core is indeed slightly green
 
July 20, 2020

RSS@BarsMonster3@14.by