Category Archives: Uncategorized

ASUS ROG Laptops for AI Development

Say you want a laptop with decent power for local AI development. If you don’t want to spend a lot of money, and you want a portable, sleek laptop (not a clunky “portable desktop”), consider the ASUS ROG Zephyrus G14. You can get one of these from BestBuy, on a deal, for under $2000. It comes with 1TB of NVME – but for ~$200 you can upgrade this yourself to 4TB using a Samsung Pro NVME. I did the same and ended up with a 5070ti, 32GB of ram, all in a fairly sleek laptop.

Hardware out of the way here are some tips:

  • You can kick rocky 9.6
  • You should add in elrepo and upgrade the kernel using the kernel-ml repo. At the time of this article this pulled me to kernel version 6.16.4-1
  • Unfortunately X11 doesn’t work – use Wayland.
  • I’ve found a lot of python libraries are not yet built with cuda 13 support – so stick with cuda 12.9. Also it seems to matter which version your driver targets, so i found 575.64.05 work well – still supports the 5070 ti, but targets cuda 12.9
  • I was able to control the keyboard LEDs, screen brightness, and power profiles via KDE. I also tried the asusctl and supergfxctl – but ended up not needing these.
  • As for screen control, for some reason the screen got VERY dark on bootup – so i ended up writing a screenbrightness systemd script that would set screenbrightness to max on bootup. Once in KDE i could control this via KDE’s controls
  • I also found sddm works well, but could not get gdm to work – so stick with sddm/wayland
  • One downside to this platform – when not on wall power, the GPU halves the amount of power it is willing to source. In practice for AI inference tasks this only seems to make a small dent in performance.
  • Also on power modes: the Quiet mode is so pleasent – little to no fan noise, and the performance is stilll quite good. If you flip to Performance mode, the fans are so loud – you have to really need the extra performance.
  • Lastly, sddm seemed to crash on boot – so i wrote a timer based systemd script to restart it 7 seconds after boot, and this fixed that

Here’s a kickstart for rocky 96: https://github.com/carsonfenimore/kickstart

  • Be sure to disable secure boot

tts Text to Speech with Conversion

import torch
from TTS.api import TTS

# Get device
device = "cuda" if torch.cuda.is_available() else "cpu"

# List available 🐸TTS models
print(TTS().list_models())

# Init TTS
#tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to(device)

tts = TTS("tts_models/de/thorsten/tacotron2-DDC")
tts.tts_with_vc_to_file(
    "We are seeing multiple sensors with bad values, please pay attention!",
    speaker_wav="/data/apu_america.wav",
    file_path="/data/myapu3.wav"
)

Tesla Model Y After 4 Years

About 4 years ago I bought an early edition of the Tesla Model Y. I immediately loved it. I still think it is the best car available.

When I purchased the car I also paid for Full Self Driving (FSD). It was understood that FDF wasn’t actually ready – but that it would mature over the coming months… or years…

Steady progress in FSD was made – but it seemed to stall for about a year and a half. Every new release would be proclaimed as “mind blowing” – but was only a small step change. This all got old. By summer 2024 I was pretty well resigned that there was no reasonable timeframe in which one would expect real progress.

This all seems to have changed in FSD 12.5.4 – for the first time, it seems smooth, doesn’t have the nag that just annoys. Doesn’t beep at me. It just drives. It’s really nice.

I hope the Elon haters just try to let the car drive you. Congrats to the Tesla team for sticking to it!

Apple Watch Solo

Apple makes some good products… I’m not so sure the Apple watch can be counted as one of them. Reasons: the battery life isn’t stellar, and, most importantly, it is an utter pain to set one up for family member.

The setup problem is because apple requires an iphone to set up the apple watch and, to travel the royal path, said iphone should be on a plan that supports the apple watch. Since I am cheap, I am not on one of those plans.

After much pain and wasted time I found the one true way to connect the watch to cellular while keeping a cheap plan on your phone. The process is superficially easy, but unnecessarily painful. Roughly it goes like this:

  1. Call verizon. Yes. Call. In the year 2023 – you MUST call them.
    • You must connect to their “inside sales” departemnt
  2. Tell the sales associate you want to connect an apple watch to cellular in standalone mode
  3. Given them the watch IMEI
  4. Ask them to activate the watch. Then activate the watch using your iphone. Do this with them on the phone
    • If they don’t activate now, you will try endlessly to get it to work in vain. You will call them the next day and have to pick right up where you left off.

Disneyworld sucks

It’s not magical – no matter how many times they say it is. It is as magical as having a pickpocket empty your wallet everyday and giving you back only lost days of your life and a sunburn.

I hope someone starts a new theme park that is actually based on some new ideas and real entertainment, not hackneyed recycled flufff from yesteryear. Walt would be so ashamed.

GPU + TPU parallelism

I use my RTX for heavier ML workflows, like training and high-quality inference (say, centernet). Additionally my security system has edge-based (coral TPU) cameras (one TPU per camera) that perform their own inference workloads. Thus all my compute resources are busy burning any solar power I get, and then some.

This poses a problem as it means i have no spare compute to handle any remaining workloads. For example, during regression testing of new models I need to re-run inference against old data. Neither the camera TPUs nor the RTX is available. Thankfully, one can just add extra TPUs to the main workhorse server to gain additional inference capacity. Each of these TPUs is capable of 90ish inferences a second of a mobilenetv2-based net. All this on the same server performing inference and training using the RTX without impacting performance.

Each TPU operates independently. Currently I have two TPUs in addition to my RTX. CPU utilization sits around 25% while the TPU and GPU resources are pegged. A busy box is a happy box.

For reference, a good docker container for running coral: https://github.com/pklinker/coral-container.git – the scripts provided for objdet are good – just remember you can pass “@:0” or “@:1” to reference your 1st, 2nd, etcth TPU.

Putin is a Sad Bad Banana

How sad that a grown man – a single sorrowful, pitiful human being – could dash the hope and optimism of the world by plunging it into a stupid war. We all make dumb mistakes – but very few of have the distinction to make a mistake that causes the following:

  • Young children, who should be in school and playing on playgrounds, are being killed, scared to death, and left fatherless. Instead their schools are bombed and they are living in a hell zone.
  • Mothers who should be receiving the best of care to bring up their children are dying – some in maternity hospitals. This because in war there is no real safety and everyone is potential “collateral damage.”
  • Young people, in Ukraine and Russia, who should be stretching their minds and talents to the benefit of society, are wasting their lives in a pointless war of one man’s doing
  • The world, instead of solving great problems, like traveling to infinity and beyond, and helping the poor and the sick, have had their hopes reset with the realization that a modern-day madman can bring the storms of war to everyone’s doorstep.

These are the things that fall squarely on Mr. Putin. As such Putin earns, with ignominy, the “sad banana” award – he’s just a gross, rotten banana that nobody wants. How very sad.

Putin Has Lost His Ukranian War

Putin has lost the war for one simple reason: he never had a cause to start it in the first place – and everyone knows it.

What he is doing might have worked 50 years ago – when the skies weren’t monitored by non-military GPS. When we didn’t have social media showing us the people we already knew and loved in Ukraine being murdered. We can plainly see what he is doing.

We knew he was coming weeks in advance. The US took away any shred of surprise he might have had – if he indeed had any, as he parked 100k+ troops right on Ukraines doorstep for a month. We saw the Ukrainians good-faith destroyed.

What Putin needs is help thinking as his brain seems rotten. Here’s some help I offer:

  • “We have to de-nazify Ukraine.” The Nazis were those who decided they didn’t like a group of people, invaded their country, and killed them. That is what the Russians are doing. The Jews were the people that, sadly, took the abuse from the Nazis. The Ukrainians are the Jews. Nobody is buying what Putin is saying here because it doesn’t square with what he is doing. He is killing Ukranians. He is being the Nazi. What Putin should be saying here is: “Russia has long desired to emulate the Nazis and will now do so by invading Ukraine.” Very faithfully said, Mr. Putin.
  • “The Ukranian soldiers are using their people as human shields.” Since Putin is attacking Ukraine, EVERY UKRAINIAN is a defender – not just the army. No human shields exist – just the men, women, and children of Ukraine he is killing. Ukraine is justified in defending. Russia is not justified in attacking any individual in Ukraine. Here is what Putin meant: “Russia will kill innocent Ukranians indiscriminately.” I give Putin a 10/10 for this honest statement.
  • “Any foreigner who joins the Ukrainians will meet consequences they have never seen.” Here Putin wants to deter any decent human being from helping defend the victim he is trying to murder. He is threatening nuclear war to any who might want to help. This is further proof he has no cause – if we needed further proof – for in a real cause to declare war, someone would hope for allies to stand at your side in doing what is right. Putin has no right to what he is doing. He knows it. He also knows he has a slim chance to defeating Ukraine – because nobody in Ukraine wants Russia (except a narrow strip of Russians in the east – which were already somewhat separate). He will only “win” if he basically beats the Ukrainians into submission over a long stretch of time. Anyone helping would totally frustrate his plans. Sadly, the West appears to be listening to Putin. What the world needs is to not be afraid. Putin can’t progress in a war that the world opposes. He can only progress if people are scared to oppose him. So really all he meant to say was “Russia would rather destroy the entire world than lose a war they unjustly started.”

I have no ill will against the Russian people who were stuck with Putin when he started this war. It is their fault if they keep him around. If they do they are complicit with him. Putin can arrest 10s of thousands of people – but not millions of people. If his own people stood up to him, the could clear their own guilt. Otherwise, they are the German Nazis just like in WWII who stood by as the worst evils humankind can commit were perpetrated by their army.

The History of the Ukraine war, with respect to Putin, has been written. He’s guilty beyond measure and everyone knows it. He can shell innocent civilians only so long as his own troops are blinded from this fact. Only so long as his people sit quietly by. History has written his portion of this conflict. It is anxiously awaiting to see how the Ukranian liberation will unfold.

Good Readings for Convolution Neural Networks (CNN)s

https://brohrer.github.io/how_convolutional_neural_networks_work.html – This page did a good job of breaking down the individual operations that are common to all CNNs – ReLU, pooling, convolution, etc. After reading the article you can basically implement your own CNN – but without a lot of the advanced improvements that have made them faster and more powerful.

https://towardsdatascience.com/review-yolov3-you-only-look-once-object-detection-eab75d7a1ba6 has lots of reviews of algorithms

Dive into deep learning – a free book: http://d2l.ai

Physically Disconnecting the Speaker and Microphone on the Wyzecam V3

The Wyzecam v3 comes with some great features – namely the $20 price tag and excellent starlight sensor. It also comes with a microphone and speaker – both of which have their downsides. For those that wish to disconnect them (say, for privacy reasons) — and don’t fully trust the software “disable” — one can physically disconnect them without damaging the camera.

NOTE: if you plan to disconnect the speaker you should probably do this only AFTER setting up the camera, as it provides voice prompts during the setup.

Estimated time: This takes less than 5 minutes.

Step 1 – Use a plastic spudger such as this one for $1.99 from ifixit

Step 2 – Guide the spudger under the outside of the white rim on the front of the camera. Run it around the ENTIRE white rim to loosen the underlying adhesive. Be careful not to push it too far under the rim as it will mar the adhesive tape and thereby decrease re-assembly quality.

Note the sticky tape on the back of the white insert. You want to avoid marring this as it will affect the reassmbled product

Step 3 – Use the pointy end of the tool to carefully remove the three white inserts. This part is easy – but if you get it wrong it will be VERY hard to get the underlying screws out! Tip: push on the far side of the squishy insert to cause it to rotate, then you can carefully tweezer it out.

Step 4 – Use a small screwdriver to loosen the three phillips screws. Yes – only three; if Wyze had a fourth hole and screw the price would be much higher.

Step 5 – Carefully insert the spudger in between the white case and the black front. This is the trickiest part! You don’t want to damage the red moisture seal just underneath the black front. To avoid damaging it, do not repeatedly pry at the black front – instead get the tool just under the edge and lift.

Step 6 – Once you have carefully lifted out the black portion the electronics slide out easily. The mic and speakers are on the bottom of the assembly. You can use the tool to carefully loosen the connectors. This should allow easy reconnection if desired later.

With microphone and speaker disconnected

Step 7 – Reassmebly. Push the assembly back in the case. Insert the three screws and tighten. Carefully push the white inserts. Re-attach the white rim.

The reassembled product – you can’t even tell it was modified – which is kinda the point!