AI tips, technical tutorials, guides, and workflows for the modern AI era.

Nerdy Place
Joined February 2017
Nerd Level Tech retweeted
If litellm 1.107.0 ever ran on a machine of yours, don't start with pip install: Python runs the implant on every start, pip included. LiteLLM's own incident report says 1.107.0 was on PyPI from 11:39 to 13:23 UTC on 21 Oct, and the docker tags latest, main-latest and main-stable pointed at an infected image until 14:20 UTC. The v1.107.0 git tag is clean. The payload was built from a lookalike repo. What to check: pip show litellm litellm-1.107.0.dist-info, cook.pth and sitecustomize.py in site-packages a detached python daemon holding /tmp/remote_code_loader.lock What to do: delete the three files first, kill the daemon, then reinstall pinned to 1.106.2 (or rebuild the venv or image). Not finding a file doesn't prove you're clean. Then rotate what the host could reach: the instance role, every provider key in the proxy DB, the master and virtual keys, the DATABASE_URL password, any secret in a process environment. In CloudTrail, look for GetCallerIdentity from the instance role around install time. What the stealer reads, per SafeDep's decode: SSH keys, cloud and CI credentials, AI tool tokens and the proxy's provider keys. docs.litellm.ai/blog/securit…
2
5
230
Nerd Level Tech retweeted
Load Balancing in System Design ➀ What is Load Balancing? β†’ Definition: The process of distributing incoming network traffic across multiple servers to prevent any single server from becoming overloaded. β†’ Goal β†’ Improve performance β†’ Increase availability β†’ Distribute workloads β†’ Prevent bottlenecks β†’ Load balancers sit between clients and backend servers. β†’ Example β†’ 1,000 requests arrive β†’ Load balancer distributes them across 5 healthy servers β†’ Each server handles approximately 200 requests, assuming equal distribution. ➀ How Load Balancing Works β†’ Client sends a request β†’ Load balancer receives the request β†’ Checks server health and availability β†’ Selects an appropriate backend server β†’ Forwards the request to that server β†’ Server processes the request and returns a response β†’ If a server fails β†’ Health checks detect the failure β†’ Traffic is redirected to healthy servers. ➀ Why Load Balancing Matters β†’ Prevents individual servers from becoming overloaded β†’ Improves application responsiveness β†’ Increases availability through server redundancy β†’ Supports horizontal scaling β†’ Enables maintenance with reduced service disruption β†’ Helps applications handle traffic spikes β†’ Common use cases β†’ E-commerce β†’ Social media β†’ Streaming platforms β†’ Banking systems β†’ Cloud applications ➀ Types of Load Balancers β†’ Layer 4 Load Balancing β†’ Operates at the transport layer (TCP/UDP) β†’ Routes traffic using network information such as IP addresses and ports β†’ Offers efficient, low-overhead traffic distribution β†’ Layer 7 Load Balancing β†’ Operates at the application layer (HTTP/HTTPS) β†’ Routes requests using URLs, headers, cookies, or hostnames β†’ Supports content-based routing and application-aware decisions β†’ Hardware Load Balancers β†’ Dedicated physical appliances β†’ Common in traditional enterprise infrastructure β†’ Can provide high performance but may increase infrastructure costs β†’ Software Load Balancers β†’ Run as software on servers or virtual machines β†’ Flexible and configurable β†’ Examples β†’ NGINX β†’ HAProxy β†’ Envoy β†’ Cloud Load Balancers β†’ Managed load-balancing services offered by cloud providers β†’ Examples β†’ AWS Elastic Load Balancing β†’ Google Cloud Load Balancing β†’ Azure Load Balancer ➀ Common Load Balancing Algorithms β†’ Round Robin β†’ Sends requests to servers in a repeating sequence β†’ Best for servers with similar capacity and relatively uniform workloads β†’ Weighted Round Robin β†’ Assigns more requests to servers with higher weights β†’ Useful when backend servers have different capacities β†’ Least Connections β†’ Routes traffic to the server with the fewest active connections β†’ Useful when requests take different amounts of time to complete β†’ Weighted Least Connections β†’ Considers active connections and server capacity β†’ Helps distribute workloads across heterogeneous servers β†’ IP Hash β†’ Uses a client's IP address to select a backend server β†’ Can help maintain routing consistency, but does not guarantee session persistence in every configuration β†’ Least Response Time β†’ Selects servers based on response time and, depending on the implementation, active load β†’ Helps direct traffic toward more responsive instances ➀ Health Checks and Failover β†’ Active Health Checks β†’ Periodically send probes to backend servers β†’ Passive Health Checks β†’ Detect failures from actual traffic β†’ Unhealthy Server β†’ Stop sending new requests to that server β†’ Recovery β†’ Return the server to service after it passes health checks β†’ Failover β†’ Redirect traffic to healthy alternatives β†’ Important β†’ Health checks reduce the impact of failures, but they do not eliminate every failure scenario. ➀ Load Balancing Architecture β†’ Client Requests β†’ Load Balancer β†’ Server 1 β†’ Server 2 β†’ Server 3 β†’ Server N β†’ Shared Cache β†’ Database β†’ Read Replicas β†’ Traffic increases β†’ Add backend instances β†’ Server fails β†’ Redirect traffic to healthy instances β†’ Traffic decreases β†’ Scale down excess capacity β†’ For critical systems β†’ Deploy redundant load balancers to avoid creating a single point of failure. ➀ Challenges in Load Balancing β†’ Uneven traffic distribution β†’ Session persistence and state management β†’ Health-check configuration β†’ Backend server failures β†’ Load balancer capacity limits β†’ TLS termination and certificate management β†’ Cross-region routing and network latency β†’ Maintaining observability across multiple servers ➀ Load Balancing vs Auto Scaling β†’ Load Balancing β†’ Distributes traffic across available servers β†’ Auto Scaling β†’ Adds or removes server instances based on demand β†’ Load balancing helps distribute existing capacity β†’ Auto scaling adjusts the amount of available capacity β†’ Together β†’ Support responsive, scalable applications ➀ In System Design Interviews β†’ Estimate incoming traffic and peak requests per second β†’ Identify potential server bottlenecks β†’ Choose Layer 4 or Layer 7 load balancing β†’ Select an appropriate routing algorithm β†’ Explain health checks and failover β†’ Discuss stateless services and session management β†’ Consider multi-zone or multi-region deployment β†’ Evaluate latency, availability, cost, and operational complexity ➀ System Design Handbook β†’ A practical guide to mastering system design fundamentals and distributed architectures β†’ Covers load balancing β†’ Scalability β†’ Consistency β†’ Fault tolerance β†’ Durability β†’ Caching β†’ Databases β†’ CAP Theorem β†’ Designed for developers preparing for system design interviews and building reliable production systems Get the System Design Handbook here: codewithdhanian.gumroad.com/…
7
30
194
4,438
Nerd Level Tech retweeted
DeepSeek open-sourced DeepInfer, the inference framework behind its production services (Apache 2.0, on GitHub since 16 Oct). The README is unusually clear about scope, so here's what's in it and what isn't. In the box: - one model so far, DeepSeek-V4.1-Flash (MIT-licensed weights) - attention data parallelism, MoE expert parallelism with EPLB - "DSpark" draft-token decoding, max draft length 5 by default - batch-invariant inference: a request gets the same result whatever else shares its batch (NVIDIA only) - deterministic sampling with a fixed seq_seed (NVIDIA only) - structured outputs from a regex, a JSON schema or an EBNF grammar Not in the box: a KV cache system, prefill/decode disaggregation, and load balancing across replicas. The README calls all three required for a complete inference service. This release is offline inference. Hardware: NVIDIA SM100 GPUs or Huawei Ascend 950 NPUs. The published benchmarks ran prefill on 4 GPUs and decode on 64. It started out built mainly on vLLM, with ideas from SGLang and TensorRT-LLM, and the README credits all three. To try the model without that hardware, Ollama lists it as a cloud model only: ollama run deepseek-v4.1-flash:cloud github.com/deepseek-ai/DeepI…
3
1
8
294
Nerd Level Tech retweeted
Meet Qwen3.8-Flash-Next-FP4-Local: a quantized image-text-to-text powerhouse. FP4 precision means faster inference and lower memory, all while handling vision and language together. Built for local deployment with ModelOpt optimization. This is efficiency meets multimodal AI.
2
4
23
2,551
Nerd Level Tech retweeted
We made open models run over 2x faster than Ollama, without any new hardware Introducing Magnitude, an open source inference engine that runs open models as fast as your hardware allows. It tunes its kernels on your machine to find the fastest way to run each model Works on Apple Silicon, NVIDIA, AMD, or just a CPU On average across 11 popular local models: Mac M4 Pro vs Ollama (MLX) 1.32x faster prefill, 2.19x faster decode DGX Spark vs Ollama (llama.cpp) 1.34x faster prefill, 2.17x faster decode Ollama, LM Studio, and llama.cpp ship one-size-fits-all kernels, because tuning each model for each chip by hand would take forever Magnitude tunes them automatically. When you download a model, it spends up to a minute on your actual chip trying different ways to split up the math (how many GPU threads team up, how big a chunk each one takes, how far ahead to load data) and keeps the fastest combination that doesn't change the model's output Each model also comes paired with the best speculative decoding drafter, for even more speed One click connects Magnitude to the agent you already use (Pi, OpenCode, Hermes, Codex, and more). It's also built specifically for agents: β€’ Each agent uses about half the memory, thanks to a quantized KV cache β€’ Memory grows and shrinks with your sessions, so your computer stays usable β€’ Agents share prefix caches, so several can run at once without slowing down Next, we're working on getting even more out of your hardware: β€’ Expert streaming from RAM or disk, to run models bigger than your GPU allows β€’ Splitting one model across all your GPUs and CPU so nothing sits idle β€’ Attention pruning that skips low-impact math, for much faster prefill Ships as a desktop app on Mac, Windows, and Linux 100% free and open source Download β†’ magnitude.dev/download GitHub β†’ github.com/magnitudedev/magn…
102
187
36
2,053
101,333
Nerd Level Tech retweeted
Detects faces, extracts landmarks, and generates feature embeddings for on-premise recognition workflows. github.com/Faceplugin-ltd/Op…
3
66
1
492
22,408
Nerd Level Tech retweeted
25 SQL Queries Every Data Analyst Should Know
3
55
368
9,599
Nerd Level Tech retweeted
I struggled with Git until I learned these 19 commands: 1 git add: It lets you add changes from working directory into staging area 2 git commit: It lets you save a snapshot of currently staged changes in local repository, with a message 3 git push: It lets you upload commited changes from local repository to a remote repository 4 git fetch: It lets you download changes from a remote repository, without applying them locally 5 git pull: It lets you fetch & then merge changes from a remote repository into local branch 6 git merge: It lets you combine changes from one branch into another 7 git diff: It lets you see changes not staged or commited yet 8 git diff HEAD: It lets you see changes between current working directory & latest commit 9 git status: It shows you current state of working directory & staging area 10 git branch: It lets you see all local branches 11 git checkout: It lets you create a branch or switch between branches 12 git log: It shows you commits on current branch with extra details 13 git stash: It lets you temporarily save uncommitted changes & apply them later 14 git rebase: It lets you apply commits from one branch to another 15 git reset: It lets you undo changes in working directory & move back to a specific commit 16 git revert: It lets you undo changes by creating a new commit 17 git cherry pick: It lets you apply commits from one branch to another 18 git bisect: It lets you narrow down bugs quickly 19 git init: It lets you create an empty repository Anything else you'd add to this list? 1 RR to help others learn git. 2 If you want to become a better engineer, @systemdesignone is your guy.
10
152
7
781
29,478
Nerd Level Tech retweeted
Heartbeat for Long Tools A tool that takes 40 seconds with no signal looks identical to a dead tool. As a dev, I now require heartbeats from long tools. Heartbeat Cheatsheet: 1. Send a heartbeat every few seconds 2. Include a progress hint when the tool has one 3. Treat a missed heartbeat as a warning 4. Treat several misses as a failure 5. Log heartbeat gaps 6. Let the user see that work is still happening Core principle: Silence is not proof of life. Pro tip: A heartbeat with no progress text is still better than nothing. Which of your tools can run for more than 10 seconds without any signal? Reply below Follow @AiCamila_ for daily production AI and DevOps patterns. #Heartbeat #Tools #AgenticAI #ProductionAI #Observability
5
1
19
500
AWS networking will be easy...once you understand this
1
16
92
2,695
Nerd Level Tech retweeted
SolidCraft is a new open-source CAD app written in pure Rust (MIT or Apache-2.0), with a built-in MCP server so a coding agent such as Claude Code can model parts in it. Its README reports that 75 of 76 public reference parts match their expected volume, area and centre of mass, and calls the app early but usable for simple parts. Would you use a part an AI agent modelled without opening it yourself first? github.com/bherbruck/solidcr…
6
3
1
13
352
Nerd Level Tech retweeted
DeepSeek V4.1 Flash is now free in OpenCode
885
1,850
1,235
26,208
3,763,471
Nerd Level Tech retweeted
Anthropic stopped using git for its monorepo. The number behind it: about 2,500 merged changes a day in May, and 30,401 on 9 September. From their engineering post on Scion, the replacement: β€’ CI runs on the order of 25 million checkouts a day. Fetched naively from git, that would be over 600 PB of traffic a day β€’ at the peak they ran several hundred internal git mirrors just to keep up β€’ Scion's footprint is 200x smaller in CPU and memory than those mirrors, each cache tier holds a hit rate over 99%, and checkouts take seconds instead of minutes β€’ seven people built it, a new code review tool and the migration in five months Their own limit: Scion is "by no means a suitable replacement for git for general use". The design only makes sense for enormous monorepos, with tens of thousands of engineers or swarms of agents writing code. On prior art, the post credits Google's Piper and Meta's Sapling. Rain, who helped build Meta's open-source Mononoke server, argues that Scion's "derived data" design follows Mononoke's far too closely for the post never to name it. Rain is fine with the copying; the complaint is the missing credit. anthropic.com/engineering/re… sunshowers.io/posts/anthropi…
3
1
3
170
Nerd Level Tech retweeted
Your coding agent probably doesn't need a bigger context window. It needs a cleaner one. In September 2025, Anthropic called it likely that, for the foreseeable future, context windows of all sizes will be subject to context pollution, at least when you want the strongest agent performance. Most of its Claude Code best practices rest on one constraint: the window fills up fast, and performance degrades as it fills. One long session: Task A β†’ "investigate X" β†’ back to A β†’ correction Γ—2 β†’ same-session review Where it breaks: β€’ "investigate X", unscoped: Claude reads hundreds of files, filling the context β€’ correction Γ—2: the context is cluttered with failed approaches β€’ same-session review: Claude reviews code it just wrote β€’ the whole session: as the window fills, Claude may start "forgetting" earlier instructions What fixes it in Claude Code: 1. Send the investigation to a subagent. Subagents run in separate context windows and report back summaries. 2. After two failed corrections, /clear and write a better prompt with what you learned. A clean session with a better prompt almost always outperforms a long session with accumulated corrections. 3. Review in a fresh context, where Claude won't be biased toward code it just wrote. Same session, fixed: Task A β†’ subagent investigates X β†’ back to A β†’ correction Γ—2 β†’ /clear + better prompt β†’ fresh-context review Not just Claude: Chroma's Context Rot report (July 2025) tested 18 models, closed and open-weights, and found performance degrades as input length increases. Open-source Aider (Apache 2.0) has the same moves: /drop files "that don't need any more changes", and when it gets stuck, /clear "to discard the chat history and make a fresh start". Long sessions are fine when you're deep in one complex problem and the history is valuable. Which do you use least: a subagent, /clear or a fresh-context review? code.claude.com/docs/en/best… anthropic.com/engineering/ef… aider.chat/docs/usage/tips.h… #ClaudeCode
8
2
8
244
Nerd Level Tech retweeted
If a model running on your own machine feels slow, check where it actually loaded before you blame the model. ollama ps The PROCESSOR column tells you: β€’ 100% GPU: the whole model sits in the graphics card's memory β€’ 100% CPU: all of it is in system memory β€’ a split like 48%/52% CPU/GPU: part of it is on the GPU, the rest in system memory Models also stay loaded for a while after you use them. ollama stop <model> unloads one now, and keep_alive (or OLLAMA_KEEP_ALIVE for the whole server) sets how long they stay: 0 unloads right after a response, a negative number keeps the model loaded. docs.ollama.com/faq
2
1
3
152
Nerd Level Tech retweeted
Containerization is at the heart of modern software development. In this in-depth course, Eissa teaches you Docker from the ground up. You'll learn about containers, Dockerfiles, images, Docker Hub, networking, volumes, Docker Compose, and more - plus real-world deployment workflows. freecodecamp.org/news/docker…
6
192
1
1,267
44,072
Nerd Level Tech retweeted
Mistral has released an open-weights speech-to-text model built for Arabic: Voxtral Mini 4B Realtime Arabic, under Apache 2.0. It transcribes as the audio arrives instead of waiting for the whole recording, the shape you need for live captions or a voice assistant. Mistral says it covers Arabic dialects and Modern Standard Arabic, and training focused on code-switching, where speakers move between languages in the same conversation. Egyptian, Moroccan, Gulf and Levantine Arabic are all in its language list. The numbers are Mistral's own: at a 480 ms delay it averages 8.82% character error rate across seven Arabic benchmarks. That still trails Mistral's Voxtral Transcribe Arabic at 7.91%, by 0.91 points. The card also says scores may differ under other normalization methods, so compare vendors with care. It's about 4.4B parameters with BF16 weights, so roughly 9 GB of weights, and the card's way to serve it is vLLM: vllm serve mistralai/Voxtral-Mini-4B-Realtime-Arabic Which Arabic dialect would you test it on first? huggingface.co/mistralai/Vox…
1
1
190
Nerd Level Tech retweeted
If your team builds on Claude, there's a date to put in the calendar: Anthropic's updated Usage Policy takes effect on November 12. Anthropic says most of the changes clarify rules that already existed. Three parts are still worth a manager's ten minutes. The first covers high-risk uses. When Claude's output can affect someone's health, legal rights, finances, livelihood or access to essential services, there has to be a qualified human in the loop, someone with the authority to review and change Claude's recommendations, and the person affected has to be told AI was used. That requirement isn't new, but the section now lists which kinds of recommendations are covered and which aren't. A good moment to check where your product sits. The second covers physical actions. If Claude drives hardware that acts on its own and could injure someone, a qualified operator must be able to watch it and stop it, and the equipment must hold a safe state if Claude disconnects. The third is surveillance. Tracking people without their consent is prohibited, and Claude can't be used to decide or recommend who to investigate, arrest or charge. Tracking people agreed to, like fraud monitoring, stays permitted. The clause getting the headlines, a ban on sustained, needless cruelty toward the models, is meant only for extreme cases, not ordinary frustration or model testing. For most teams the work is a short review of where their use cases sit before the 12th. anthropic.com/news/2026-usag…
1
2
6
414
Nerd Level Tech retweeted
Data Analytics Cheat Sheet ✍️
3
110
2
550
14,818