Machine Learning Guide: Recent Episodes

Dept

Machine learning audio course, teaching the fundamentals of machine learning and artificial intelligence. It covers intuition, models (shallow and deep), math, languages, frameworks, etc. Where your other ML resources provide the trees, I provide the forest. Consider MLG your syllabus, with highly-curated resources for each episode's details at ocdevel.com. Audio is a great supplement during exercise, commute, chores, etc.

View Details

ML engineering demand remains high with a 3.2 to 1 job-to-candidate ratio, but entry-level hiring is collapsing as AI automates routine programming and data tasks. Career longevity requires shifting from model training to production operations, deep domain expertise, and mastering AI-augmented workflows before standard implementation becomes a commodity.

Links * Notes and resources at ocdevel.com/mlg/mla-30 * Try a walking desk - stay healthy & sharp while you learn & code * Generate a podcast - use my voice to listen to any AI generated content you want

Market Data and Displacement ML engineering demand rose 89% in early 2025. Median salary is $187,500, with senior roles reaching $550,000. There are 3.2 open jobs for every qualified candidate. AI-exposed roles for workers aged 22 to 25 declined 13 to 16%, while workers over 30 saw 6 to 12% growth. Professional service job openings dropped 20% year-over-year by January 2025. Microsoft cut 15,000 roles, targeting software engineers, and 30% of its code is now AI-generated. Salesforce reduced support headcount from 9,000 to 5,000 after AI handled 30 to 50% of its workload.

Sector Comparisons * Creative: Chinese illustrator jobs fell 70% in one year. AI increased output from 1 to 40 scenes per day, crashing commission rates by 90%. * Trades: US construction lacks 1.7 million workers. Licensing takes 5 years, and the career fatality risk is 1 in 200. High suicide rates (56 per 100,000) and emerging robotics like the $5,900 Unitree R1 indicate a 10 to 15 year window before automation. * Orchestration: Prompt engineering roles paying $375,000 became nearly obsolete in 24 months. Claude Code solves 72% of GitHub issues in under eight minutes.

Technical Specialization Priorities * Model Ops: Move from training to deployment using vLLM or TensorRT. Set up drift detection and monitoring via MLflow or Weights & Biases. * Evaluation: Use DeepEval or RAGAS to test for hallucinations, PII leaks, and adversarial robustness. * Agentic Workflows: Build multi-step systems with LangGraph or CrewAI. Include human-in-the-loop checkpoints and observability. * Optimization: Focus on quantization and distillation for on-device, air-gapped deployment. * Domain Expertise: 57.7% of ML postings prefer specialists in healthcare, finance, or climate over generalists.

Industry Perspectives * Accelerationists (Amodei, Altman): Predict major disruption within 1 to 5 years. * Skeptics (LeCun, Marcus): Argue LLMs lack causal reasoning, extending the adoption timeline to 10 to 15 years. * Pragmatists (Andrew Ng): Argue that as code gets cheap, the bottleneck shifts from implementation to specification.

View Details

OpenClaw is a self-hosted AI agent daemon that executes autonomous tasks through messaging apps like WhatsApp and Telegram using persistent memory. It integrates with Claude Code to enable software development and administrative automation directly from mobile devices.

Links * Notes and resources at ocdevel.com/mlg/mla-29 * Try a walking desk - stay healthy & sharp while you learn & code * Generate a podcast - use my voice to listen to any AI generated content you want

OpenClaw is a self-hosted AI agent daemon (Node.js, port 18789) that executes autonomous tasks via messaging apps like WhatsApp or Telegram. Developed by Peter Steinberger in November 2025, the project reached 196,000 GitHub stars in three months.

Architecture and Persistent Memory * Operational Loop: Gateway receives message, loads SOUL.md (personality), USER.md (user context), and MEMORY.md (persistent history), calls LLM for tool execution, streams response, and logs data. * Memory System: Compounds context over months. Users should prompt the agent to remember specific preferences to update MEMORY.md. * Heartbeats: Proactive cron-style triggers for automated actions, such as 6:30 AM briefings or inbox triage. * Skills: 5,705+ community plugins via ClawHub. The agent can author its own skills by reading API documentation and writing TypeScript scripts.

Claude Code Integration * Mobile to Deploy Workflow: The claude-code-skill bridge provides OpenClaw access to Bash, Read, Edit, and Git tools via Telegram. * Agent Teams: claude-team manages multiple workers in isolated git worktrees to perform parallel refactors or issue resolution. * Interoperability: Use mcporter to share MCP servers between Claude Code and OpenClaw.

Industry Comparisons * vs n8n: Use n8n for deterministic, zero-variance pipelines. Use OpenClaw for reasoning and ambiguous natural language tasks. * vs Claude Cowork: Cowork is a sandboxed, desktop-only proprietary app. OpenClaw is an open-source, mobile-first, 24/7 daemon with full system access.

Professional Applications * Therapy: Voice to SOAP note transcription. PHI requires local Ollama models due to a lack of encryption at rest in OpenClaw. * Marketing: claw-ads for multi-platform ad management, Mixpost for scheduling, and SearXNG for search. * Finance: Receipt OCR and Google Drive filing. Requires human review to mitigate non-deterministic LLM errors. * Real Estate: Proactive transaction deadline monitoring and memory-driven buyer matching.

Security and Operations * Hardening: Bind to localhost, set auth tokens, and use Tailscale for remote access. Default settings are unsafe, exposing over 135,000 instances. * Injection Defense: Add instructions to SOUL.md to treat external emails and web pages as hostile. * Costs: Software is MIT-licensed. API costs are paid per-token or bundled via a Claude subscription key. * Onboarding: Run the BOOTSTRAP.md flow immediately after installation to define agent personality before requesting tasks.

View Details

AI agents differ from chatbots by pursuing autonomous goals through the ReACT loop rather than responding to turn-based prompts. While coding agents are currently the most reliable due to verifiable feedback loops, the market is expanding into desktop and browser automation via tools like Claude co-work and open claw.

Links * Notes and resources at ocdevel.com/mlg/mla-28 * Try a walking desk - stay healthy & sharp while you learn & code * Generate a podcast - use my voice to listen to any AI generated content you want

Fundamental Definitions * Agent vs. Chatbot: Chatbots are turn-based and human-driven. Agents receive objectives and dynamically direct their own processes. * The ReACT Loop: Every modern agent uses the cycle: Thought -> Action -> Observation. This interleaved reasoning and tool usage allows agents to update plans and handle exceptions. * Performance: Models using agentic loops with self-correction outperform stronger zero-shot models. GPT-3.5 with an agent loop scored 95.1% on HumanEval, while zero-shot GPT-4 scored 67.0%.

The Agentic Spectrum 1. Chat: No tools or autonomy. 2. Chat + Tools: Human-driven web search or code execution. 3. Workflows: LLMs used in predefined code paths. The human designs the flow, the AI adds intelligence at specific nodes. 4. Agents: LLMs dynamically choose their own path and tools based on observations.

Tool Categories and Market Players * Developer Frameworks: Use LangGraph for complex, stateful graphs or CrewAI for role-based multi-agent delegation. OpenAI Agents SDK provides minimalist primitives (Handoffs, Sessions), while the Claude Agent SDK focuses on local computer interaction. * Workflow Automation: n8n and Zapier provide low-code interfaces. These are stable for repeatable business tasks but limited by fixed paths and a lack of persistent memory between runs. * Coding Agents: Claude Code, Cursor, and GitHub Copilot are the most advanced agents. They succeed because code provides an unambiguous feedback loop (pass/fail) for the ReACT cycle. * Desktop and Browser Agents: Claude Cowork( (released Jan 2026) operates in isolated VMs to produce documents. ChatGPT Atlas is a Chromium-based browser with integrated agent capabilities for web tasks. * Autonomous Agents: open claw is an open-source, local system with broad permissions across messaging, file systems, and hardware. While powerful, it carries high security risks, including 512 identified vulnerabilities and potential data exfiltration.

Infrastructure and Standards * MCP (Model Context Protocol): A universal standard for connecting agents to tools. It has 10,000+ servers and is used by Anthropic, OpenAI, and Google. * Future Outlook: By 2028, multi-agent coordination will be the default architecture. Gartner predicts 38% of organizations will utilize AI agents as formal team members, and the developer role will transition primarily to objective specification and output evaluation.

View Details

How to maintain character consistency, style consistency, etc in an AI video. Prosumers can use Google Veo 3’s "High-Quality Chaining" for fast social media content. Indie filmmakers can achieve narrative consistency by combining Midjourney V7 for style, Kling for lip-synced dialogue, and Runway Gen-4 for camera control, while professional studios gain full control with a layered ComfyUI pipeline to output multi-layer EXR files for standard VFX compositing.

Links * Notes and resources at ocdevel.com/mlg/mla-27 * Try a walking desk - stay healthy & sharp while you learn & code * Descript - my favorite AI audio/video editor

AI Audio Tool Selection * Music: Use Suno for complete songs or Udio for high-quality components for professional editing. * Sound Effects: Use ElevenLabs' SFX for integrated podcast production or SFX Engine for large, licensed asset libraries for games and film. * Voice: ElevenLabs gives the most realistic voice output. Murf.ai offers an all-in-one studio for marketing, and Play.ht has a low-latency API for developers. * Open-Source TTS: For local use, StyleTTS 2 generates human-level speech, Coqui's XTTS-v2 is best for voice cloning from minimal input, and Piper TTS is a fast, CPU-friendly option.

I. Prosumer Workflow: Viral Video Goal: Rapidly produce branded, short-form video for social media. This method bypasses Veo 3's weaker native "Extend" feature.

  • Toolchain
    • Image Concept: GPT-4o (API: GPT-Image-1) for its strong prompt adherence, text rendering, and conversational refinement.
    • Video Generation: Google Veo 3 for high single-shot quality and integrated ambient audio.
    • Soundtrack: Udio for creating unique, "viral-style" music.
    • Assembly: CapCut for its standard short-form editing features.
  • Workflow
    1. Create Character Sheet (GPT-4o): Generate a primary character image with a detailed "locking" prompt, then use conversational follow-ups to create variations (poses, expressions) for visual consistency.
    2. Generate Video (Veo 3): Use "High-Quality Chaining."
      • Clip 1: Generate an 8s clip from a character sheet image.
      • Extract Final Frame: Save the last frame of Clip 1.
      • Clip 2: Use the extracted frame as the image input for the next clip, using a "this then that" prompt to continue the action. Repeat as needed.
    3. Create Music (Udio): Use Manual Mode with structured prompts ([Genre: ...], [Mood: ...]) to generate and extend a music track.
    4. Final Edit (CapCut): Assemble clips, layer the Udio track over Veo's ambient audio, add text, and use "Auto Captions." Export in 9:16.

II. Indie Filmmaker Workflow: Narrative Shorts Goal: Create cinematic short films with consistent characters and storytelling focus, using a hybrid of specialized tools.

  • Toolchain
    • Visual Foundation: Midjourney V7 to establish character and style with --cref and --sref parameters.
    • Dialogue Scenes: Kling for its superior lip-sync and character realism.
    • B-Roll/Action: Runway Gen-4 for its Director Mode camera controls and Multi-Motion Brush.
    • Voice Generation: ElevenLabs for emotive, high-fidelity voices.
    • Edit & Color: DaVinci Resolve for its integrated edit, color, and VFX suite and favorable cost model.
  • Workflow
    1. Create Visual Foundation (Midjourney V7): Generate a "hero" character image. Use its URL with --cref --cw 100 to create consistent character poses and with --sref to replicate the visual style in other shots. Assemble a reference set.
    2. Create Dialogue Scenes (ElevenLabs -> Kling):
      • Generate the dialogue track in ElevenLabs and download the audio.
      • In Kling, generate a video of the character from a reference image with their mouth closed.
      • Use Kling's "Lip Sync" feature to apply the ElevenLabs audio to the neutral video for a perfect match.
    3. Create B-Roll (Runway Gen-4): Use reference images from Midjourney. Apply precise camera moves with Director Mode or add localized, layered motion to static scenes with the Multi-Motion Brush.
    4. Assemble & Grade (DaVinci Resolve): Edit clips and audio on the Edit page. On the Color page, use node-based tools to match shots from Kling and Runway, then apply a final creative look.

III. Professional Studio Workflow: Full Control Goal: Achieve absolute pixel-level control, actor likeness, and integration into standard VFX pipelines using an open-source, modular approach.

  • Toolchain
    • Core Engine: ComfyUI with Stable Diffusion models (e.g., SD3, FLUX).
    • VFX Compositing: DaVinci Resolve (Fusion page) for node-based, multi-layer EXR compositing.
  • Control Stack & Workflow
    1. Train Character LoRA: Train a custom LoRA on a 15-30 image dataset of the actor in ComfyUI to ensure true likeness.
    2. Build ComfyUI Node Graph: Construct a generation pipeline in this order:
      • Loaders: Load base model, custom character LoRA, and text prompts (with LoRA trigger word).
      • ControlNet Stack: Chain multiple ControlNets to define structure (e.g., OpenPose for skeleton, Depth map for 3D layout).
      • IPAdapter-FaceID: Use the Plus v2 model as a final reinforcement layer to lock facial identity before animation.
      • AnimateDiff: Apply deterministic camera motion using Motion LoRAs (e.g., v2_lora_PanLeft.ckpt).
      • KSampler -> VAE Decode: Generate the image sequence.
    3. Export Multi-Layer EXR: Use a node like mrv2SaveEXRImage to save the output as an EXR sequence (.exr). Configure for a professional pipeline: 32-bit float, linear color space, and PIZ/ZIP lossless compression. This preserves render passes (diffuse, specular, mattes) in a single file.
    4. Composite in Fusion: In DaVinci Resolve, import the EXR sequence. Use Fusion's node graph to access individual layers, allowing separate adjustments to elements like color, highlights, and masks before integrating the AI asset into a final shot with a background plate.

View Details

Google Veo leads the generative video market with superior 4K photorealism and integrated audio, an advantage derived from its YouTube training data. OpenAI Sora is the top tool for narrative storytelling, while Kuaishou Kling excels at animating static images with realistic, high-speed motion.

Links * Notes and resources at ocdevel.com/mlg/mla-26 * Try a walking desk - stay healthy & sharp while you learn & code * Build the future of multi-agent software with AGNTCY.

S-Tier: Google Veo The market leader due to superior visual quality, physics simulation, 4K resolution, and integrated audio generation, which removes post-production steps. It accurately interprets cinematic prompts ("timelapse," "aerial shots"). Its primary advantage is its integration with Google products, using YouTube's vast video library for rapid model improvement. The professional focus is clear with its filmmaking tool, "Flow."

A-Tier: Sora & Kling * OpenAI Sora: Excels at interpreting complex narrative prompts and has wide distribution through ChatGPT. Features include in-video editing tools like "Remix" and a "Storyboard" function for multi-shot scenes. Its main limits are 1080p resolution and no native audio. * Kuaishou Kling: A leader in image-to-video quality and realistic high-speed motion. It maintains character consistency and has proven commercial viability (RMB 150M in Q1 2025). Its text-to-video interface is less intuitive than Sora's. * Summary: Sora is best for storytellers starting with a narrative idea; Kling is best for artists animating a specific image.

Control and Customization: Runway & Stable Diffusion * Runway: An integrated creative suite with a full video editor and "AI Magic Tools" like Motion Brush and Director Mode. Its value is in generating, editing, and finishing in one platform, offering precise control over stylization and in-shot object alteration. * Stable Diffusion: An open-source ecosystem (SVD, AnimateDiff) offering maximum control through technical interfaces like ComfyUI. Its strength is a large community developing custom models, LoRAs, and ControlNets for specific tasks like VFX integration. It has a steep learning curve.

Niche Tools: Midjourney & More * Midjourney Video: The best tool for animating static Midjourney images (image-to-video only), preserving their unique aesthetic. * Avatar Platforms (HeyGen, Synthesia): Built for scalable corporate and marketing videos, featuring realistic talking avatars, voice cloning, and multi-language translation with accurate lip-sync.

Head-to-Head Comparison Feature Google Veo (S-Tier) OpenAI Sora (A-Tier) Kuaishou Kling (A-Tier) Runway (Power-User Tier) Photorealism Winner. Best 4K detail and physics. Excellent, but can have a stylistic "AI" look. Very strong, especially with human subjects. Good, but a step below the top tier. Consistency Strong, especially with Flow's scene-building. Co-Winner. Storyboard feature is built for this. Co-Winner. Excels in image-to-video consistency. Good, with character reference tools. Prompt Adherence Winner (Language). Best understanding of cinematic terms. Best for imaginative/narrative prompts. Strong on motion, less on camera specifics. Good, but relies more on UI tools. Directorial Control Strong via prompt. Moderate, via prompt and storyboard. Moderate, focused on motion. Winner (Interface). Motion Brush & Director Mode offer direct control. Integrated Audio Winner. Native dialogue, SFX, and music. Major workflow advantage. No. Requires post-production. No. Requires post-production. No. Requires post-production. Advanced Multi-Tool Workflows * High-Quality Animation: Combine Midjourney (for key-frame art) with Kling or Runway (for motion), then use an AI upscaler like Topaz for 4K finishing. * VFX Compositing: Use Stable Diffusion (AnimateDiff/ControlNets) to generate specific elements for integration into live-action footage using professional software like Nuke or After Effects. All-in-one models lack the required layer-based control. * High-Volume Marketing: Use Veo for the main concept, Runway for creating dozens of variations, and HeyGen for personalized avatar messaging to achieve speed and scale.

Decision Matrix: Who Should Use What? User Profile Primary Goal Recommendation Justification The Indie Filmmaker Pre-visualization, short films. OpenAI Sora (Primary), Google Veo (Secondary) Sora's storyboard feature is best for narrative construction. Veo is best for high-quality final shots. The VFX Artist Creating animated elements for live-action. Stable Diffusion (AnimateDiff/ComfyUI) Offers the layer-based control and pipeline integration needed for professional VFX. The Creative Agency Rapid prototyping, social content. Runway (Primary Suite), Google Veo (For Hero Shots) Runway's editing/variation tools are built for agency speed. Veo provides the highest quality for the main asset. The AI Artist / Animator Art-directed animated pieces. Midjourney + Kling Pairs the best image generator with a top-tier motion engine for maximum aesthetic control. The Corporate Trainer Training and personalized marketing videos. HeyGen / Synthesia Specialized tools for avatar-based video production at scale (voice cloning, translation). Future Trajectory 1. Pipeline Collapse: More models will integrate audio and editing, pressuring silent-only video generators. 2. The Control Arms Race: Competition will shift from quality to providing more sophisticated directorial tools. 3. Rise of Aggregators: Platforms like OpenArt that provide access to multiple models through a single interface will become essential.

View Details

The AI image market has split: Midjourney creates the highest quality artistic images but fails at text and precision. For business use, OpenAI's GPT-4o offers the best conversational control, while Adobe Firefly provides the strongest commercial safety from its exclusively licensed training data.

Links * Notes and resources at ocdevel.com/mlg/mla-25 * Try a walking desk - stay healthy & sharp while you learn & code * Build the future of multi-agent software with AGNTCY.

The 2025 generative AI image market is defined by a split between two types of tools. "Artists" like Midjourney excel at creating beautiful, high-quality images but lack precise control. "Collaborators" like OpenAI's GPT-4o and Google's Imagen 4 are integrated into language models, excelling at following complex instructions and accurately rendering text. Standing apart are the open-source "Sovereign Toolkit" Stable Diffusion, which offers users total control, and Adobe Firefly, a "Professional's Walled Garden" focused on commercial safety.

The Five Main Platforms The market is dominated by five platforms with distinct strengths and weaknesses.

Tool Parent Company Core Strength Best For Midjourney v7 Midjourney, Inc. Artistic Aesthetics & Photorealism Fine Art, Concept Design, Stylized Visuals GPT-4o OpenAI Conversational Control & Instruction Following Marketing Materials, UI/UX Mockups, Logos Google Imagen 4 Google Ecosystem Integration & Speed Business Presentations, Educational Content Stable Diffusion 3 Stability AI Ultimate Customization & Control Developers, Power Users, Bespoke Workflows Adobe Firefly Adobe Commercial Safety & Workflow Integration Professional Designers, Agencies, Enterprise Use Platform Analysis * Midjourney v7: Delivers the best aesthetic and photorealistic quality via a new web UI. Its "Draft Mode" allows for rapid, low-cost ideation. However, it cannot reliably render text, struggles to follow precise instructions (like counting objects), makes all images public on cheaper plans, and strictly prohibits API access or automation. * GPT-4o: Its strength is conversational refinement within ChatGPT, allowing users to edit images through dialogue (e.g., "change the shirt to red"). It has excellent instruction-following and text-rendering capabilities. Weaknesses include being slower than competitors and generating only one image at a time. * Google Imagen 4: A practical tool integrated directly into Google Workspace and Gemini. It produces high-quality, high-resolution (2K) photorealistic images quickly and renders text well. Its primary advantage is letting users generate images without leaving their documents or presentations. * Stable Diffusion 3 (SD3): An open-source model that provides users with total control and privacy. The new SD3 architecture significantly improves prompt understanding and text generation. It can run on consumer hardware, and its quality is free after the initial hardware cost. Its power comes from a vast ecosystem of community tools (see below), but it has a steep learning curve. * Adobe Firefly: Embedded within Adobe Creative Cloud (e.g., Photoshop's Generative Fill). Its key differentiator is commercial safety; it is trained only on licensed Adobe Stock and public domain content to indemnify users from copyright claims. It excels at editing existing images rather than generating from scratch.

Techniques & Tools * In-painting/Out-painting: Core editing functions. In-painting modifies a specific area within an image. Out-painting expands an image beyond its original borders. * Stable Diffusion Power Tools: + LoRAs (Low-Rank Adaptations): Small files that apply a specific style, character, or concept to the main model. + ControlNet: A framework that uses a reference image (e.g., a sketch or a stick-figure pose) as a "blueprint" to enforce a specific composition or pose. * Stable Diffusion Interfaces: Users choose a UI to run the model. Automatic1111 is a beginner-friendly, tab-based dashboard. ComfyUI is a more complex but powerful node-based interface for building custom, automated workflows.

Feature Comparison & Exclusion Rules The choice of tool often depends on a single required feature.

Model Text-in-Image Accuracy Photorealism Quality Complex Prompt Adherence Midjourney v7 Poor. A major weakness. Best-in-Class Fair GPT-4o Excellent. A key strength. Very Good Best-in-Class Google Imagen 4 Excellent Excellent Very Good Stable Diffusion 3 Good to Excellent Good to Excellent Good to Excellent This leads to several hard rules for choosing a tool:

  • If you need accurate in-image text: Exclude Midjourney. Use GPT-4o, Google Imagen 4, or specialist tool Ideogram.
  • If you require absolute privacy or must run locally: Stable Diffusion is your only option.
  • If you require a guarantee of commercial safety: Adobe Firefly is the most prudent choice.
  • If you need to automate generation via an API: Use OpenAI or Google's official APIs. Midjourney bans automation and will close your account.

View Details

Auto encoders are neural networks that compress data into a smaller "code," enabling dimensionality reduction, data cleaning, and lossy compression by reconstructing original inputs from this code. Advanced auto encoder types, such as denoising, sparse, and variational auto encoders, extend these concepts for applications in generative modeling, interpretability, and synthetic data generation.

Links * Notes and resources at ocdevel.com/mlg/36 * Try a walking desk - stay healthy & sharp while you learn & code * Build the future of multi-agent software with AGNTCY. * Thanks to T.J. Wilder from intrep.io for recording this episode!

Fundamentals of Autoencoders * Autoencoders are neural networks designed to reconstruct their input data by passing data through a compressed intermediate representation called a “code.” * The architecture typically follows an hourglass shape: a wide input and output separated by a narrower bottleneck layer that enforces information compression. * The encoder compresses input data into the code, while the decoder reconstructs the original input from this code.

Comparison with Supervised Learning * Unlike traditional supervised learning, where the output differs from the input (e.g., image classification), autoencoders use the same vector for both input and output.

Use Cases: Dimensionality Reduction and Representation * Autoencoders perform dimensionality reduction by learning compressed forms of high-dimensional data, making it easier to visualize and process data with many features. * The compressed code can be used for clustering, visualization in 2D or 3D graphs, and input into subsequent machine learning models, saving computational resources and improving scalability.

Feature Learning and Embeddings * Autoencoders enable feature learning by extracting abstract representations from the input data, similar in concept to learned embeddings in large language models (LLMs). * While effective for many data types, autoencoder-based encodings are less suited for variable-length text compared to LLM embeddings.

Data Search, Clustering, and Compression * By reducing dimensionality, autoencoders facilitate vector searches, efficient clustering, and similarity retrieval. * The compressed codes enable lossy compression analogous to audio codecs like MP3, with the difference that autoencoders lack domain-specific optimizations for preserving perceptually important data.

Reconstruction Fidelity and Loss Types * Loss functions in autoencoders are defined to compare reconstructed outputs to original inputs, often using different loss types depending on input variable types (e.g., Boolean vs. continuous). * Compression via autoencoders is typically lossy, meaning some information from the input is lost during reconstruction, and the areas of information lost may not be easily controlled.

Outlier Detection and Noise Reduction * Since reconstruction errors tend to move data toward the mean, autoencoders can be used to reduce noise and identify data outliers. * Large reconstruction errors can signal atypical or outlier samples in the dataset.

Denoising Autoencoders * Denoising autoencoders are trained to reconstruct clean data from noisy inputs, making them valuable for applications in image and audio de-noising as well as signal smoothing. * Iterative denoising as a principle forms the basis for diffusion models, where repeated application of a denoising autoencoder can gradually turn random noise into structured output.

Data Imputation * Autoencoders can aid in data imputation by filling in missing values: training on complete records and reconstructing missing entries for incomplete records using learned code representations. * This approach leverages the model’s propensity to output ‘plausible’ values learned from overall data structure.

Cryptographic Analogy * The separation of encoding and decoding can draw parallels to encryption and decryption, though autoencoders are not intended or suitable for secure communication due to their inherent lossiness.

Advanced Architectures: Sparse and Overcomplete Autoencoders * Sparse autoencoders use constraints to encourage code representations with only a few active values, increasing interpretability and explainability. * Overcomplete autoencoders have a code size larger than the input, often in applications that require extraction of distinct, interpretable features from complex model states.

Interpretability and Research Example * Research such as Anthropic’s “Towards Monosemanticity” applies sparse autoencoders to the internal activations of language models to identify interpretable features correlated with concrete linguistic or semantic concepts. * These models can be used to monitor and potentially control model behaviors (e.g., detecting specific language usage or enforcing safety constraints) by manipulating feature activations.

Variational Autoencoders (VAEs) * VAEs extend autoencoder architecture by encoding inputs as distributions (means and standard deviations) instead of point values, enforcing a continuous, normalized code space. * Decoding from sampled points within this space enables synthetic data generation, as any point near the center of the code space corresponds to plausible data according to the model.

VAEs for Synthetic Data and Rare Event Amplification * VAEs are powerful in domains with sparse data or rare events (e.g., healthcare), allowing generation of synthetic samples representing underrepresented cases. * They can increase model performance by augmenting datasets without requiring changes to existing model pipelines.

Conditional Generative Techniques * Conditional autoencoders extend VAEs by allowing controlled generation based on specified conditions (e.g., generating a house with a pool), through additional decoder inputs and conditional loss terms.

Practical Considerations and Limitations * Training autoencoders and their variants requires computational resources, and their stochastic training can produce differing code representations across runs. * Lossy reconstruction, lack of domain-specific optimizations, and limited code interpretability restrict some use cases, particularly where exact data preservation or meaningful decompositions are required.

View Details

At inference, large language models use in-context learning with zero-, one-, or few-shot examples to perform new tasks without weight updates, and can be grounded with Retrieval Augmented Generation (RAG) by embedding documents into vector databases for real-time factual lookup using cosine similarity. LLM agents autonomously plan, act, and use external tools via orchestrated loops with persistent memory, while recent benchmarks like GPQA (STEM reasoning), SWE Bench (agentic coding), and MMMU (multimodal college-level tasks) test performance alongside prompt engineering techniques such as chain-of-thought reasoning, structured few-shot prompts, positive instruction framing, and iterative self-correction.

Links * Notes and resources at ocdevel.com/mlg/mlg35 * Build the future of multi-agent software with AGNTCY * Try a walking desk stay healthy & sharp while you learn & code

In-Context Learning (ICL) * Definition: LLMs can perform tasks by learning from examples provided directly in the prompt without updating their parameters. + Types: - Zero-shot: Direct query, no examples provided. - One-shot: Single example provided. - Few-shot: Multiple examples, balancing quantity with context window limitations. + Mechanism: ICL works through analogy and Bayesian inference, using examples as semantic priors to activate relevant internal representations. + Emergent Properties: ICL is an "inference-time training" approach, leveraging the model’s pre-trained knowledge without gradient updates; its effectiveness can be enhanced with diverse, non-redundant examples.

Retrieval Augmented Generation (RAG) and Grounding * Grounding: Connecting LLMs with external knowledge bases to supplement or update static training data. + Motivation: LLMs’ training data becomes outdated or lacks proprietary/specialized knowledge. + Benefit: Reduces hallucinations and improves factual accuracy by incorporating current or domain-specific information. * RAG Workflow: 1. Embedding: Documents are converted into vector embeddings (using sentence transformers or representation models). 2. Storage: Vectors are stored in a vector database (e.g., FAISS, ChromaDB, Qdrant). 3. Retrieval: When a query is made, relevant chunks are extracted based on similarity, possibly with re-ranking or additional query processing. 4. Augmentation: Retrieved chunks are added to the prompt to provide up-to-date context for generation. 5. Generation: The LLM generates responses informed by the augmented context. + Advanced RAG: Includes agentic approaches—self-correction, aggregation, or multi-agent contribution to source ingestion, and can integrate external document sources (e.g., web search for real-time info, or custom datasets for private knowledge).

LLM Agents * Overview: Agents extend LLMs by providing goal-oriented, iterative problem-solving through interaction, memory, planning, and tool usage. * Key Components: + Reasoning Engine (LLM Core): Interprets goals, states, and makes decisions. + Planning Module: Breaks down complex tasks using strategies such as Chain of Thought or ReAct; can incorporate reflection and adjustment. + Memory: Short-term via context window; long-term via persistent storage like RAG-integrated databases or special memory systems. + Tools and APIs: Agents select and use external functions—file manipulation, browser control, code execution, database queries, or invoking smaller/fine-tuned models. * Capabilities: Support self-evaluation, correction, and multi-step planning; allow integration with other agents (multi-agent systems); face limitations in memory continuity, adaptivity, and controllability. * Current Trends: Research and development are shifting toward these agentic paradigms as LLM core scaling saturates.

Multimodal Large Language Models (MLLMs) * Definition: Models capable of ingesting and generating across different modalities (text, image, audio, video). * Architecture: + Modality-Specific Encoders: Convert raw modalities (text, image, audio) into numeric embeddings (e.g., vision transformers for images). + Fusion/Alignment Layer: Embeddings from different modalities are projected into a shared space, often via cross-attention or concatenation, allowing the model to jointly reason about their content. + Unified Transformer Backbone: Processes fused embeddings to allow cross-modal reasoning and generates outputs in the required format. * Recent Advances: Unified architectures (e.g., GPT-4o) use a single model for all modalities rather than switching between separate sub-models. * Functionality: Enables actions such as image analysis via text prompts, visual Q&A, and integrated speech recognition/generation.

Advanced LLM Architectures and Training Directions * Predictive Abstract Representation: Incorporating latent concept prediction alongside token prediction (e.g., via autoencoders). * Patch-Level Training: Predicting larger “patches” of tokens to reduce sequence lengths and computation. * Concept-Centric Modeling: Moving from next-token prediction to predicting sequences of semantic concepts (e.g., Meta’s Large Concept Model). * Multi-Token Prediction: Training models to predict multiple future tokens for broader context capture.

Evaluation Benchmarks (as of 2025) * Key Benchmarks Used for LLM Evaluation: + GPQA (Diamond): Graduate-level STEM reasoning. + SWE Bench Verified: Real-world software engineering, verifying agentic code abilities. + MMMU: Multimodal, college-level cross-disciplinary reasoning. + HumanEval: Python coding correctness. + HLE (Human’s Last Exam): Extremely challenging, multimodal knowledge assessment. + LiveCodeBench: Coding with contamination-free, up-to-date problems. + MLPerf Inference v5.0 Long Context: Throughput/latency for processing long contexts. + MultiChallenge Conversational AI: Multiturn dialogue, in-context reasoning. + TAUBench/PFCL: Tool utilization in agentic tasks. + TruthfulnessQA: Measures tendency toward factual accuracy/robustness against misinformation.

Prompt Engineering: High-Impact Techniques * Foundational Approaches: + Few-Shot Prompting: Provide pairs of inputs and desired outputs to steer the LLM. + Chain of Thought: Instructing the LLM to think step-by-step, either explicitly or through internal self-reprompting, enhances reasoning and output quality. + Clarity and Structure: Use clear, detailed, and structured instructions—task definition, context, constraints, output format, use of delimiters or markdown structuring. + Affirmative Directives: Phrase instructions positively (“write a concise summary” instead of “don’t write a long summary”). + Iterative Self-Refinement: Prompt the LLM to review and improve its prior response for better completeness, clarity, and factuality. + System Prompt/Role Assignment: Assign a persona or role to the LLM for tailored behavior (e.g., “You are an expert Python programmer”). * Guideline: Regularly consult official prompting guides from model developers as model capabilities evolve.

Trends and Research Outlook * Inference-time compute is increasingly important for pushing the boundaries of LLM task performance. * Agentic LLMs and multimodal reasoning represent the primary frontiers for innovation. * Prompt engineering and benchmarking remain essential for extracting optimal performance and assessing progress. * Models are expected to continue evolving with research into new architectures, memory systems, and integration techniques.

View Details

Explains language models (LLMs) advancements. Scaling laws - the relationships among model size, data size, and compute - and how emergent abilities such as in-context learning, multi-step reasoning, and instruction following arise once certain scaling thresholds are crossed. The evolution of the transformer architecture with Mixture of Experts (MoE), describes the three-phase training process culminating in Reinforcement Learning from Human Feedback (RLHF) for model alignment, and explores advanced reasoning techniques such as chain-of-thought prompting which significantly improve complex task performance.

Links * Notes and resources at ocdevel.com/mlg/mlg34 * Build the future of multi-agent software with AGNTCY * Try a walking desk stay healthy & sharp while you learn & code

Transformer Foundations and Scaling Laws * Transformers: Introduced by the 2017 "Attention is All You Need" paper, transformers allow for parallel training and inference of sequences using self-attention, in contrast to the sequential nature of RNNs. * Scaling Laws: + Empirical research revealed that LLM performance improves predictably as model size (parameters), data size (training tokens), and compute are increased together, with diminishing returns if only one variable is scaled disproportionately. + The "Chinchilla scaling law" (DeepMind, 2022) established the optimal model/data/compute ratio for efficient model performance: earlier large models like GPT-3 were undertrained relative to their size, whereas right-sized models with more training data (e.g., Chinchilla, LLaMA series) proved more compute and inference efficient.

Emergent Abilities in LLMs * Emergence: When trained beyond a certain scale, LLMs display abilities not present in smaller models, including: + In-Context Learning (ICL): Performing new tasks based solely on prompt examples at inference time. + Instruction Following: Executing natural language tasks not seen during training. + Multi-Step Reasoning & Chain of Thought (CoT): Solving arithmetic, logic, or symbolic reasoning by generating intermediate reasoning steps. * Discontinuity & Debate: These abilities appear abruptly in larger models, though recent research suggests that this could result from non-linearities in evaluation metrics rather than innate model properties.

Architectural Evolutions: Mixture of Experts (MoE) * MoE Layers: Modern LLMs often replace standard feed-forward layers with MoE structures. + Composed of many independent "expert" networks specializing in different subdomains or latent structures. + A gating network routes tokens to the most relevant experts per input, activating only a subset of parameters—this is called "sparse activation." + Enables much larger overall models without proportional increases in compute per inference, but requires the entire model in memory and introduces new challenges like load balancing and communication overhead. * Specialization & Efficiency: Experts learn different data/knowledge types, boosting model specialization and throughput, though care is needed to avoid overfitting and underutilization of specialists.

The Three-Phase Training Process * 1. Unsupervised Pre-Training: Next-token prediction on massive datasets—builds a foundation model capturing general language patterns. * 2. Supervised Fine Tuning (SFT): Training on labeled prompt-response pairs to teach the model how to perform specific tasks (e.g., question answering, summarization, code generation). Overfitting and "catastrophic forgetting" are risks if not carefully managed. * 3. Reinforcement Learning from Human Feedback (RLHF): + Collects human preference data by generating multiple responses to prompts and then having annotators rank them. + Builds a reward model (often PPO) based on these rankings, then updates the LLM to maximize alignment with human preferences (helpfulness, harmlessness, truthfulness). + Introduces complexity and risk of reward hacking (specification gaming), where the model may exploit the reward system in unanticipated ways.

Advanced Reasoning Techniques * Prompt Engineering: The art/science of crafting prompts that elicit better model responses, shown to dramatically affect model output quality. * Chain of Thought (CoT) Prompting: Guides models to elaborate step-by-step reasoning before arriving at final answers—demonstrably improves results on complex tasks. + Variants include zero-shot CoT ("let's think step by step"), few-shot CoT with worked examples, self-consistency (voting among multiple reasoning chains), and Tree of Thought (explores multiple reasoning branches in parallel). * Automated Reasoning Optimization: Frontier models selectively apply these advanced reasoning techniques, balancing compute costs with gains in accuracy and transparency.

Optimization for Training and Inference * Tradeoffs: The optimal balance between model size, data, and compute is determined not only for pretraining but also for inference efficiency, as lifetime inference costs may exceed initial training costs. * Current Trends: Efficient scaling, model specialization (MoE), careful fine-tuning, RLHF alignment, and automated reasoning techniques define state-of-the-art LLM development.

View Details

Tool use in code AI agents allows for both in-editor code completion and agent-driven file and command actions, while the Model Context Protocol (MCP) standardizes how these agents communicate with external and internal tools. MCP integration broadens the automation capabilities for developers and machine learning engineers by enabling access to a wide variety of local and cloud-based tools directly within their coding environments.

Links * Notes and resources at ocdevel.com/mlg/mla-24 * Try a walking desk stay healthy & sharp while you learn & code

Tool Use in Code AI Agents * Code AI agents offer two primary modes of interaction: in-line code completion within the editor and agent interaction through sidebar prompts. * Inline code completion has evolved from single-line suggestions to cross-file edits, refactoring, and modification of existing code blocks. * Tools accessible via agents include read, write, and list file functions, as well as browser automation and command execution; permissions for sensitive actions can be set by developers. * Agents can intelligently search a project’s codebase and dependencies using search commands and regular expressions to locate relevant files.

Model Context Protocol (MCP) * MCP, introduced by Anthropic, establishes a standardized protocol for agents to communicate with tools and services, replacing bespoke tool integrations. * The protocol is analogous to REST for web servers and unifies tool calling for both local and cloud-hosted automation. * MCP architecture involves three components: the AI agent, MCP client, and MCP server. The agent provides context, the client translates requests and responses, and the server executes and responds with data in a structured format. * MCP servers can be local (STDIO-based for local tasks like file search or browser actions) or cloud-based (SSE for hosted APIs and SaaS tools). * Developers can connect code AI agents to directories of MCP servers, accessing an expanding ecosystem of automation tools for both programming and non-programming tasks.

MCP Application Examples * Local MCP servers include Playwright for browser automation and Postgres MCP for live database schema analysis and data-driven UI suggestions. * Cloud-based MCP servers integrate APIs such as AWS, enabling infrastructure management directly from coding environments. * MCP servers are not limited to code automation; they are widely used for pipeline automation in sales, marketing, and other internet-connected workflows.

Retrieval Augmented Generation (RAG) as an MCP Use Case * RAG, once standard in code AI tools, indexed codebases using embeddings to assist with relevant file retrieval, but many agents now favor literal search for practicality. * Local RAG MCP servers, such as Chroma or LlamaIndex, can index entire documentation sets to update agent knowledge of recent or project-specific libraries outside of widely-known frameworks. * Fine-tuning a local LLM with the same documentation is an alternative approach to integrating new knowledge into code AI workflows.

Machine Learning Applications * Code AI tooling supports feature engineering, data cleansing, pipeline setup, model design, and hyperparameter optimization, based on real dataset distributions and project specifications. * Agents can recommend advanced data transformations—such as Yeo-Johnson power transformation for skewed features—by directly analyzing example dataset distributions. * Infrastructure-as-code integration enables rapid deployment of machine learning models and supporting components by chaining coding agents to cloud automation tools. * Automation concepts from code AI apply to both traditional code file workflows and Jupyter Notebooks, though integration with notebooks remains less seamless. * An iterative approach using sidecar Python files combined with custom instructions helps agents access necessary background and context for ML projects.

Workflow Strategies for Machine Learning Engineers * To leverage code AI agents in machine learning tasks, engineers can provide data samples and visualizations to agents through Python files or prompt contexts. * Agents can guide creation and comparison of multiple model architectures, metrics, and loss functions, improving efficiency and broadening solution exploration. * While Jupyter Lab plugin integration is currently limited, some success can be achieved by working with notebook files via code AI tools in standard code editors or by moving between notebooks and Python files for maximum flexibility.

View Details

Gemini 2.5 Pro currently leads in both accuracy and cost-effectiveness among code-focused large language models, with Claude 3.7 and a DeepSeek R1/Claude 3.5 combination also performing well in specific modes. Using local open source models via tools like Ollama offers enhanced privacy but trades off model performance, and advanced workflows like custom modes and fine-tuning can further optimize development processes.

Links * Notes and resources at ocdevel.com/mlg/mla-23 * Try a walking desk stay healthy & sharp while you learn & code

Model Current Leaders According to the Aider Leaderboard (as of April 12, 2025), leading models include for vibe-coding:

  • Gemini 2.5 Pro Preview 03-25: most accurate and cost-effective option currently.
  • Claude 3.7 Sonnet: Performs well in both architect and code modes with enabled reasoning flags.
  • DeepSeek R1 with Claude 3.5 Sonnet: A popular combination for its balance of cost and performance between reasoning and non-reasoning tasks.

Local Models * Tools for Local Models: Ollama is the standard tool to manage local models, enabling usage without internet connectivity. * Best Models per VRAM: See this Reddit post, but know that Qwen 3 launched after that; and DeepSeek R1 is coming soon. * Privacy and Security: Utilizing local models enhances data security, suitable for sensitive projects or corporate environments that require data to remain onsite. * Performance Trade-offs: Local models, due to distillation and size constraints, often perform slightly worse than cloud-hosted models but offer privacy benefits.

Fine-Tuning Models * Customization: Developers can fine-tune pre-trained models to specialize them for their specific codebase, enhancing relevance and accuracy. * Advanced Usage: Suitable for long-term projects, fine-tuning helps models understand unique aspects of a project, resulting in consistent code quality improvements.

Tips and Best Practices * Judicious Use of the @ Key: Improves model efficiency by specifying the context of commands, reducing the necessity for AI-initiated searches. + Examples include specifying file paths, URLs, or git commits to inform AI actions more precisely. * Concurrent Feature Implementation: Leverage tools like Boomerang mode to manage multiple features simultaneously, acting more as a manager overseeing several tasks at once, enhancing productivity. * Continued Learning: Staying updated with documentation, particularly Roo Code's, due to its comprehensive feature set and versatility among AI coding tools.

View Details

Try a walking desk while studying ML or working on your projects! https://ocdevel.com/walk

Show notes: https://ocdevel.com/mlg/mla-22

Tools discussed:

  1. Windsurf: https://codeium.com/windsurf
  2. Copilot: https://github.com/features/copilot
  3. Cursor: https://www.cursor.com/
  4. Cline: https://github.com/cline/cline
  5. Roo Code: https://github.com/RooVetGit/Roo-Code
  6. Aider: https://aider.chat/

Other:

  1. Leaderboards: https://aider.chat/docs/leaderboards/
  2. Video of speed-demon: https://www.youtube.com/watch?v=QlUt06XLbJE&feature=youtu.be
  3. Reddit: https://www.reddit.com/r/chatgptcoding/

Boost programming productivity by acting as a pair programming partner. Groups these tools into three categories:

• Hands-Off Tools: These include solutions that work on fixed monthly fees and require minimal user intervention. GitHub Copilot started with simple tab completions and now offers an agent mode similar to Cursor, which stands out for its advanced codebase indexing and intelligent file searching. Windsurf is noted for its simplicity—accepting prompts and performing automated edits—but some users report performance throttling after prolonged use.

• Hands-On Tools: Aider is presented as a command-line utility that demands configuration and user involvement. It allows developers to specify files and settings, and it efficiently manages token usage by sending prompts in diff format. Aider also implements an “architect versus edit” approach: a reasoning model (such as DeepSeek R1) first outlines a sequence of changes, then an editor model (like Claude 3.5 Sonnet) produces precise code edits. This dual-model strategy enhances accuracy and reduces token costs, especially for complex tasks.

• Intermediate Power Tools: Open-source tools such as Cline and its more advanced fork, RooCode, require users to supply their own API keys and pay per token. These tools offer robust, agentic features, including codebase indexing, file editing, and even browser automation. RooCode stands out with its ability to autonomously expand functionality through integrations (for example, managing cloud resources or querying issue trackers), making it particularly attractive for tinkerers and power users.

A decision framework is suggested: for those new to AI coding assistants or with limited budgets, starting with Cursor (or cautiously exploring Copilot’s new features) is recommended. For developers who want to customize their workflow and dive deep into the tooling, RooCode or Cline offer greater control—always paired with Aider for precise and token-efficient code edits.

Also reviews model performance using a coding benchmark leaderboard that updates frequently. The current top-performing combination uses DeepSeek R1 as the architect and Claude 3.5 Sonnet as the editor, with alternatives such as OpenAI’s O1 and O3 Mini available. Tools like Open Router are mentioned as a way to consolidate API key management and reduce token costs.

View Details

Try a walking desk while studying ML or working on your projects! https://ocdevel.com/walk

Show notes: https://ocdevel.com/mlg/33

3Blue1Brown videos: https://3blue1brown.com/

  • Background & Motivation:

    • RNN Limitations: Sequential processing prevents full parallelization—even with attention tweaks—making them inefficient on modern hardware.
    • Breakthrough: “Attention Is All You Need” replaced recurrence with self-attention, unlocking massive parallelism and scalability.
    • Core Architecture:

    • Layer Stack: Consists of alternating self-attention and feed-forward (MLP) layers, each wrapped in residual connections and layer normalization.

    • Positional Encodings: Since self-attention is permutation invariant, add sinusoidal or learned positional embeddings to inject sequence order.
    • Self-Attention Mechanism:

    • Q, K, V Explained:

      • Query (Q): The representation of the token seeking contextual info.
      • Key (K): The representation of tokens being compared against.
      • Value (V): The information to be aggregated based on the attention scores.
    • Multi-Head Attention: Splits Q, K, V into multiple “heads” to capture diverse relationships and nuances across different subspaces.
    • Dot-Product & Scaling: Computes similarity between Q and K (scaled to avoid large gradients), then applies softmax to weigh V accordingly.
    • Masking:

    • Causal Masking: In autoregressive models, prevents a token from “seeing” future tokens, ensuring proper generation.

    • Padding Masks: Ignore padded (non-informative) parts of sequences to maintain meaningful attention distributions.
    • Feed-Forward Networks (MLPs):

    • Transformation & Storage: Post-attention MLPs apply non-linear transformations; many argue they’re where the “facts” or learned knowledge really get stored.

    • Depth & Expressivity: Their layered nature deepens the model’s capacity to represent complex patterns.
    • Residual Connections & Normalization:

    • Residual Links: Crucial for gradient flow in deep architectures, preventing vanishing/exploding gradients.

    • Layer Normalization: Stabilizes training by normalizing across features, enhancing convergence.
    • Scalability & Efficiency Considerations:

    • Parallelization Advantage: Entire architecture is designed to exploit modern parallel hardware, a huge win over RNNs.

    • Complexity Trade-offs: Self-attention’s quadratic complexity with sequence length remains a challenge; spurred innovations like sparse or linearized attention.
    • Training Paradigms & Emergent Properties:

    • Pretraining & Fine-Tuning: Massive self-supervised pretraining on diverse data, followed by task-specific fine-tuning, is the norm.

    • Emergent Behavior: With scale comes abilities like in-context learning and few-shot adaptation, aspects that are still being unpacked.
    • Interpretability & Knowledge Distribution:

    • Distributed Representation: “Facts” aren’t stored in a single layer but are embedded throughout both attention heads and MLP layers.

    • Debate on Attention: While some see attention weights as interpretable, a growing view is that real “knowledge” is diffused across the network’s parameters.

View Details

Discussing Databricks with Ming Chang from Raybeam (part of DEPT®)

View Details

Conversation with Dirk-Jan Kubeflow (vs cloud native solutions like SageMaker)


Dirk-Jan Verdoorn - Data Scientist at Dept Agency

Kubeflow. (From the website:) The Machine Learning Toolkit for Kubernetes. The Kubeflow project is dedicated to making deployments of machine learning (ML) workflows on Kubernetes simple, portable and scalable. Our goal is not to recreate other services, but to provide a straightforward way to deploy best-of-breed open-source systems for ML to diverse infrastructures. Anywhere you are running Kubernetes, you should be able to run Kubeflow.

TensorFlow Extended (TFX). If using TensorFlow with Kubeflow, combine with TFX for maximum power. (From the website:) TensorFlow Extended (TFX) is an end-to-end platform for deploying production ML pipelines. When you're ready to move your models from research to production, use TFX to create and manage a production pipeline.

Alternatives:

  • Airflow
  • MLflow

View Details

Chatting with co-workers about the role of DevOps in a machine learning engineer's life


Expert coworkers at Dept

  • Matt Merrill - Principal Software Developer
  • Jirawat Uttayaya - DevOps Lead
  • The Ship It Podcast (where Matt features often)

Devops tools

  • Terraform
  • Ansible

Pictures (funny and serious)

  • Which AWS container service should I use?
  • A visual guide on troubleshooting Kubernetes deployments
  • Public Cloud Services Comparison
  • Killed by Google
  • aCloudGuru AWS curriculum

View Details

(Optional episode) just showcasing a cool application using machine learning


Dept uses Descript for some of their podcasting. I'm using it like a maniac, I think they're surprised at how into it I am. Check out the transcript & see how it performed.

  • Descript
  • The Ship It Podcast How to ship software, from the front lines. We talk with software developers about their craft, developer tools, developer productivity and what makes software development awesome. Hosted by your friends at Rocket Insights. AKA shipit.io
  • Brandbeats Podcast by BASIC An agency podcast with views on design, technology, art, and culture. Explore the new microsite at www.brandbeats.basicagency.com

View Details

Show notes: ocdevel.com/mlg/mla-17

Developing on AWS first (SageMaker or other)


Consider developing against AWS as your local development environment, rather than only your cloud deployment environment. Solutions:

  1. Stick to AWS Cloud IDEs (Lambda, SageMaker Studio, Cloud9
  2. Connect to deployed infrastructure via Client VPN

    • Terraform example
    • YouTube tutorial
    • Creating the keys
    • LocalStack

Infrastructure as Code

  • Terraform
  • CDK
  • Serverless

View Details

Part 2 of deploying your ML models to the cloud with SageMaker (MLOps)


MLOps is deploying your ML models to the cloud. See MadeWithML for an overview of tooling (also generally a great ML educational run-down.)

  • SageMaker
  • Jumpstart
  • Deploy
  • Pipelines
  • Monitor
  • Kubernetes
  • Neo

View Details

Show notes Part 1 of deploying your ML models to the cloud with SageMaker (MLOps)


MLOps is deploying your ML models to the cloud. See MadeWithML for an overview of tooling (also generally a great ML educational run-down.)

  • SageMaker
  • DataWrangler
  • Feature Store
  • Ground Truth
  • Clarify
  • Studio
  • AutoPilot
  • Debugger
  • Distributed Training

And I forgot to mention JumpStart, I'll mention next time.

View Details

Server-side ML. Training & hosting for inference, with a goal towards serverless. AWS SageMaker, Batch, Lambda, EFS, Cortex.dev

View Details

Client, server, database, etc.

View Details

Use Docker for env setup on localhost & cloud deployment, instead of pyenv / Anaconda. I recommend Windows for your desktop.

View Details

Show notes at ocdevel.com/mlg/32. L1/L2 norm, Manhattan, Euclidean, cosine distances, dot product


Normed distances link

  • A norm is a function that assigns a strictly positive length to each vector in a vector space. link
  • Minkowski is generalized. p_root(sum(xi-yi)^p). "p" = ? (1, 2, ..) for below.
  • L1: Manhattan/city-block/taxicab. abs(x2-x1)+abs(y2-y1). Grid-like distance (triangle legs). Preferred for high-dim space.
  • L2: Euclidean. sqrt((x2-x1)^2+(y2-y1)^2. sqrt(dot-product). Straight-line distance; min distance (Pythagorean triangle edge)
  • Others: Mahalanobis, Chebyshev (p=inf), etc

Dot product

  • A type of inner product.
    Outer-product: lies outside the involved planes. Inner-product: dot product lies inside the planes/axes involved link. Dot product: inner product on a finite dimensional Euclidean space link

Cosine (normalized dot)

View Details

Kmeans (sklearn vs FAISS), finding n_clusters via inertia/silhouette, Agglomorative, DBSCAN/HDBSCAN

View Details

NLTK: swiss army knife. Gensim: LDA topic modeling, n-grams. spaCy: linguistics. transformers: high-level business NLP tasks.

View Details

matplotlib, Seaborn, Bokeh, D3, Tableau, Power BI, QlikView, Excel

View Details

EDA + charting. DataFrame info/describe, imputing strategies. Useful charts like histograms and correlation matrices.

View Details

Run your code + visualizations in the browser: iPython / Jupyter Notebooks.

View Details

Salary based on location, gender, age, tech... from O'Reilly.

View Details

Dimensions, size, and shape of Numpy ndarrays / TensorFlow tensors, and methods for transforming those.

View Details

Comparison of different data storage options when working with your ML models.

View Details

Some numerical data nitty-gritty in Python.

View Details

Reboot on the MLG episode, with more confident recommends.

View Details

Introduction to reinforcement learning concepts. ocdevel.com/mlg/29 for notes and resources.

View Details

Hyperparameters part 2: hyper-search, regularization, SGD optimizers, scaling. ocdevel.com/mlg/28 for notes and resources

View Details

Hyperparameters part 1: network architecture. ocdevel.com/mlg/27 for notes and resources

View Details

Community project & intro to Bitcoin/crypto + trading. ocdevel.com/mlg/26 for notes and resources

View Details

Convnets or CNNs. Filters, feature maps, window/stride/padding, max-pooling. ocdevel.com/mlg/25 for notes and resources

View Details

TensorFlow, Pandas, Numpy, Scikit-Learn, Keras, TensorForce. ocdevel.com/mlg/24 for notes and resources

View Details

RNN review, bi-directional RNNs, LSTM & GRU cells. ocdevel.com/mlg/23 for notes and resources

View Details

Recurrent Neural Networks (RNNs) and Word2Vec. ocdevel.com/mlg/22 for notes and resources

View Details

Update on Patreon and resources.

Keep the podcast alive, donate on Patreon (https://www.patreon.com/machinelearningguide)

View Details

Natural Language Processing classical/shallow algorithms. ocdevel.com/mlg/20 for notes and resources

View Details

Natural Language Processing classical/shallow algorithms. ocdevel.com/mlg/19 for notes and resources

View Details

Introduction to Natural Language Processing (NLP) topics. ocdevel.com/mlg/18 for notes and resources

View Details

Checkpoint - learn the material offline! ocdevel.com/mlg/17 for notes and resources

View Details

Can AI be conscious? ocdevel.com/mlg/16 for notes and resources

View Details

Performance evaluation & improvement. ocdevel.com/mlg/15 for notes and resources

View Details

Speed run of Anomaly Detection, Recommenders(Content Filtering vs Collaborative Filtering), and Markov Chain Monte Carlo (MCMC). ocdevel.com/mlg/14 for notes and resources

View Details

Speed run of Support Vector Machines (SVMs) and Naive Bayes Classifier. ocdevel.com/mlg/13 for notes and resources

View Details

Speed-run of some shallow algorithms: K Nearest Neighbors (KNN); K-means; Apriori; PCA; Decision Trees ocdevel.com/mlg/12 for notes and resources

View Details

Checkpoint - start learning the material offline!

45m/d ML - Coursera (https://www.coursera.org/learn/machine-learning) course:hard - Python (http://amzn.to/2mVgtJW) book:medium - Deep Learning Resources (http://ocdevel.com/podcasts/machine-learning/9)

15m/d Math (KhanAcademy) - Either LinAlg (https://www.khanacademy.org/math/linear-algebra) course:medium OR Fast.ai (http://www.fast.ai/2017/07/17/num-lin-alg/) course:medium - Stats (https://www.khanacademy.org/math/statistics-probability) course:medium - Calc (https://www.khanacademy.org/math/calculus-home) course:medium

Audio - The Master Algorithm (http://amzn.to/2kLOQjW) audio:medium Semi-technical overview of ML basics & main algorithms - Mathematical Decision Making (https://goo.gl/V75I49) audio|course:hard course on "Operations Research", similar to ML - Statistics (https://goo.gl/4vvXJs), Probability (https://goo.gl/Q4KwZ6) audio|course:hard - Calculus 1 (https://goo.gl/fcLP3l), 2 (https://goo.gl/sBpljN), 3 (https://goo.gl/8Hdwuh) audio|course:hard - Convert video to audio: mp4 => mp3: for f in *.mp4; do ffmpeg -i "$f" "${f%.mp4}.mp3" && rm "$f"; done youtube => mp3: setup youtube-dl (https://github.com/rg3/youtube-dl) and run youtube-dl -x youtube.com/playlist?list=

View Details

Languages & frameworks comparison. Languages: Python, R, MATLAB/Octave, Julia, Java/Scala, C/C++. Frameworks: Hadoop/Spark, Deeplearning4J, Theano, Torch, TensorFlow. ocdevel.com/mlg/10 for notes and resources

View Details

Deep learning and neural networks. How to stack our logisitic regression units into a multi-layer perceptron. ocdevel.com/mlg/9 for notes and resources

View Details

Introduction to the branches of mathematics used in machine learning. Linear algebra, statistics, calculus. ocdevel.com/mlg/8 for notes and resources

View Details

Your first classifier: Logistic Regression. That plus Linear Regression, and you're a 101 supervised learner! ocdevel.com/mlg/7 for notes and resources

View Details

Discussion on certificates and degrees from Udacity to a Masters degree. ocdevel.com/mlg/6 for notes and resources

View Details

Introduction to the first machine-learning algorithm, the 'hello world' of supervised learning - Linear Regression ocdevel.com/mlg/5 for notes and resources

View Details

Overview of machine learning algorithms. Infer/predict, error/loss, train/learn. Supervised, unsupervised, reinforcement learning. ocdevel.com/mlg/4 for notes and resources

View Details

Show notes at ocdevel.com/mlg/3. Why should you care about AI? Inspirational topics about economic revolution, the singularity, consciousness, and fear.

View Details

Show notes at ocdevel.com/mlg/2

Updated! Skip to [00:29:36] for Data Science (new content) if you've already heard this episode.

What is artificial intelligence, machine learning, and data science? What are their differences? AI history.


Hierarchical breakdown: DS(AI(ML)). Data science: any profession dealing with data (including AI & ML). Artificial intelligence is simulated intellectual tasks. Machine Learning is algorithms trained on data to learn patterns to make predictions.

Artificial Intelligence (AI) - Wikipedia Oxford Languages: the theory and development of computer systems able to perform tasks that normally require human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.

AlphaGo Movie, very good!

Sub-disciplines

  • Reasoning, problem solving
  • Knowledge representation
  • Planning
  • Learning
  • Natural language processing
  • Perception
  • Motion and manipulation
  • Social intelligence
  • General intelligence

Applications

  • Autonomous vehicles (drones, self-driving cars)
  • Medical diagnosis
  • Creating art (such as poetry)
  • Proving mathematical theorems
  • Playing games (such as Chess or Go)
  • Search engines
  • Online assistants (such as Siri)
  • Image recognition in photographs
  • Spam filtering
  • Prediction of judicial decisions
  • Targeting online advertisements

Machine Learning (ML) - Wikipedia Oxford Languages: the use and development of computer systems that are able to learn and adapt without following explicit instructions, by using algorithms and statistical models to analyze and draw inferences from patterns in data.

Data Science (DS) - Wikipedia Wikipedia: Data science is an interdisciplinary field that uses scientific methods, processes, algorithms and systems to extract knowledge and insights from noisy, structured and unstructured data, and apply knowledge and actionable insights from data across a broad range of application domains. Data science is related to data mining, machine learning and big data.

History * Greek mythology, Golums * First attempt: Ramon Lull, 13th century * Davinci's walking animals * Descartes, Leibniz * 1700s-1800s: Statistics & Mathematical decision making

+ Thomas Bayes: reasoning about the probability of events
+ George Boole: logical reasoning / binary algebra
+ Gottlob Frege: Propositional logic
  • 1832: Charles Babbage & Ada Byron / Lovelace: designed Analytical Engine (1832), programmable mechanical calculating machines
  • 1936: Universal Turing Machine

    • Computing Machinery and Intelligence - explored AI!
    • 1946: John von Neumann Universal Computing Machine
    • 1943: Warren McCulloch & Walter Pitts: cogsci rep of neuron; Frank Rosemblatt uses to create Perceptron (-> neural networks by way of MLP)
    • 50s-70s: "AI" coined @Dartmouth workshop 1956 - goal to simulate all aspects of intelligence. John McCarthy, Marvin Minksy, Arthur Samuel, Oliver Selfridge, Ray Solomonoff, Allen Newell, Herbert Simon

    • Newell & Simon: Hueristics -> Logic Theories, General Problem Solver

    • Slefridge: Computer Vision
    • NLP
    • Stanford Research Institute: Shakey
    • Feigenbaum: Expert systems
    • GOFAI / symbolism: operations research / management science; logic-based; knowledge-based / expert systems
    • 70s: Lighthill report (James Lighthill), big promises -> AI Winter
    • 90s: Data, Computation, Practical Application -> AI back (90s)

    • Connectionism optimizations: Geoffrey Hinton: 2006, optimized back propagation

    • Bloomberg, 2015 was whopper for AI in industry
    • AlphaGo & DeepMind

View Details

Show notes: ocdevel.com/mlg/1. MLG teaches the fundamentals of machine learning and artificial intelligence. It covers intuition, models, math, languages, frameworks, etc. Where your other ML resources provide the trees, I provide the forest. Consider MLG your syllabus, with highly-curated resources for each episode's details at ocdevel.com. Audio is a great supplement during exercise, commute, chores, etc.


  • MLG, Resources Guide
  • Dept Agency
  • Gnothi (podcast project): website, Github

What is this podcast? * "Middle" level overview (deeper than a bird's eye view of machine learning; higher than math equations) * No math/programming experience required

Who is it for

  • Anyone curious about machine learning fundamentals
  • Aspiring machine learning developers

Why audio?

  • Supplementary content for commute/exercise/chores will help solidify your book/course-work

What it's not

  • News and Interviews: TWiML and AI, O'Reilly Data Show, Talking machines
  • Misc Topics: Linear Digressions, Data Skeptic, Learning machines 101
  • iTunesU issues

Planned episodes

  • What is AI/ML: definition, comparison, history
  • Inspiration: automation, singularity, consciousness
  • ML Intuition: learning basics (infer/error/train); supervised/unsupervised/reinforcement; applications
  • Math overview: linear algebra, statistics, calculus
  • Linear models: supervised (regression, classification); unsupervised
  • Parts: regularization, performance evaluation, dimensionality reduction, etc
  • Deep models: neural networks, recurrent neural networks (RNNs), convolutional neural networks (convnets/CNNs)
  • Languages and Frameworks: Python vs R vs Java vs C/C++ vs MATLAB, etc; TensorFlow vs Torch vs Theano vs Spark, etc