<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by JBY on Medium]]></title>
        <description><![CDATA[Stories by JBY on Medium]]></description>
        <link>https://medium.com/@yashv6655?source=rss-16c3985b4bd0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hYvn3QPJz_gZhqJI.jpg</url>
            <title>Stories by JBY on Medium</title>
            <link>https://medium.com/@yashv6655?source=rss-16c3985b4bd0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 06:06:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yashv6655/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Building Claude Code from Scratch: A Simple Journey into AI Agents]]></title>
            <link>https://medium.com/@yashv6655/building-claude-code-from-scratch-a-simple-journey-into-ai-agents-2ca43eccad6e?source=rss-16c3985b4bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ca43eccad6e</guid>
            <category><![CDATA[anthropic-claude]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[JBY]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 18:13:25 GMT</pubDate>
            <atom:updated>2025-10-18T18:13:25.462Z</atom:updated>
            <content:encoded><![CDATA[<h3>What I learned by building my own AI coding assistant</h3><p>When I started this project, I had a simple goal: understand how tools like Claude Code, Cursor, and Gemini CLI actually work. After building a working AI coding agent in ~300 lines of Python, I learned something surprising: <strong>you don’t need a framework to build an AI agent</strong>.</p><p>In this article, I’ll show you exactly how to build your own AI coding agent from scratch using just the Claude API, Python, and some fundamental patterns. By the end, you’ll have a working agent that can:</p><ul><li>Read and write files autonomously</li><li>Search the web for information</li><li>Execute shell commands</li><li>Remember conversation context</li><li>Make decisions about which tools to use</li></ul><p>But more importantly, you’ll understand when to use frameworks like LangChain and when to just write your own code.</p><h3>The Big Question: Framework or From Scratch?</h3><p>Before I started building, I spent hours researching whether I should use LangChain, LangGraph, or CrewAI. The documentation was intimidating. The abstractions were complex. I felt like I needed a PhD to understand multi-agent orchestration.</p><p>Then I found this gem from a 2025 article:</p><blockquote>“Companies often adopt ‘unearned complexity’ by deciding on LangChain or multi-agentic solutions without experimenting enough to understand if they actually need that complexity.”</blockquote><p>So I decided to take a different approach: build the simplest thing that could possibly work, then add complexity only when needed.</p><p>Spoiler: I never needed the framework.</p><h3>What We’re Building</h3><p>Our AI agent will have:</p><p>1. <strong>5 Tools</strong> — read files, write files, edit files, execute shell commands, search the web</p><p>2. <strong>ReAct Loop</strong> — The industry-standard pattern for autonomous agents</p><p>3. <strong>Conversation Memory</strong> — Maintains context across multiple tasks</p><p>4. <strong>Colored CLI</strong> — Because good UX matters</p><p>5. <strong>Human-in-the-Loop</strong>— Safety confirmations for dangerous operations</p><p>The entire project is ~300 lines across 4 files. No frameworks. No abstraction layers. Just clean, understandable code.</p><h3>Understanding the ReAct Loop</h3><p>The core of any AI agent is the ReAct (Reason + Act) pattern. It’s surprisingly simple:</p><ol><li>User gives a task</li><li>Loop: <br>a. Agent THINKS about what to do<br>b. Agent chooses a TOOL to use <br>c. Tool executes and returns RESULT<br>d. Agent OBSERVES the result <br>e. Repeat until task is complete</li><li>Agent provides final answer</li></ol><p>This is the same pattern used by Claude Code, ChatGPT Code Interpreter, and every other coding agent.</p><h3>Building Block 1: The Tools System</h3><p>Every AI agent needs tools to interact with the world. Let’s start with the simplest possible implementation.</p><h4>Tool Schema (for Claude API)</h4><p>Claude needs to know what tools are available and how to use them. We define this using JSON schemas:</p><pre># tools.py<br>TOOL_SCHEMAS = [<br>    {<br>        &quot;name&quot;: &quot;read_file&quot;,<br>        &quot;description&quot;: &quot;Read the contents of a file.&quot;,<br>        &quot;input_schema&quot;: {<br>            &quot;type&quot;: &quot;object&quot;,<br>            &quot;properties&quot;: {<br>                &quot;path&quot;: {<br>                    &quot;type&quot;: &quot;string&quot;,<br>                    &quot;description&quot;: &quot;The file path to read&quot;<br>                }<br>            },<br>            &quot;required&quot;: [&quot;path&quot;]<br>        }<br>    },<br>    # ... more tools<br>]</pre><h4>Tool Implementation</h4><p>Each tool is just a Python function that returns structured data:</p><pre>def read_file(path: str) -&gt; Dict[str, Any]:<br>    &quot;&quot;&quot;Read a file and return its contents.&quot;&quot;&quot;<br>    try:<br>        with open(path, &#39;r&#39;) as f:<br>            content = f.read()<br>        return {<br>            &quot;success&quot;: True,<br>            &quot;content&quot;: content<br>        }<br>    except Exception as e:<br>        return {<br>            &quot;success&quot;: False,<br>            &quot;error&quot;: str(e)<br>        }</pre><p>That’s it. No abstractions. No inheritance. Just a function that does one thing.</p><p>I built 5 tools this way:</p><ul><li><strong>read_file</strong> — Read file contents</li><li><strong>write_file</strong> — Create or overwrite files</li><li><strong>edit_file</strong> — Find and replace text</li><li><strong>shell_command</strong> — Execute shell commands</li><li><strong>web_search</strong> — Search the web using DuckDuckGo</li></ul><h3>Building Block 2: The Agent Core</h3><p>Now for the heart of the system: the ReAct loop.</p><pre>class CodingAgent:<br>    def __init__(self, api_key: str):<br>        self.client = Anthropic(api_key=api_key)<br>        self.conversation_history = []<br><br>    def run(self, user_prompt: str, max_iterations: int = 15):<br>        # Add user&#39;s prompt to conversation<br>        self.conversation_history.append({<br>            &quot;role&quot;: &quot;user&quot;,<br>            &quot;content&quot;: user_prompt<br>        })<br><br>        iteration = 0<br>        while iteration &lt; max_iterations:<br>            # Call Claude with available tools<br>            response = self.client.messages.create(<br>                model=&quot;claude-sonnet-4-5&quot;,<br>                tools=TOOL_SCHEMAS,<br>                messages=self.conversation_history<br>            )<br><br>            # Check if Claude wants to use a tool<br>            if response.stop_reason == &quot;tool_use&quot;:<br>                # Execute the tool<br>                tool_result = execute_tool(...)<br><br>                # Add result to conversation<br>                self.conversation_history.append({<br>                    &quot;role&quot;: &quot;user&quot;,<br>                    &quot;content&quot;: tool_result<br>                })<br><br>            elif response.stop_reason == &quot;end_turn&quot;:<br>                # Task complete!<br>                return response.content<br><br>            iteration += 1</pre><p>This is the entire ReAct loop. Claude decides when to use tools, which tools to use, and when it’s done. Our job is just to:</p><p>1. Call the API</p><p>2. Execute tools when requested</p><p>3. Feed results back</p><p>4. Repeat until done</p><h3>Building Block 3: The CLI Interface</h3><p>We need a way for users to interact with the agent. A simple loop with conversation memory:</p><pre># main.py<br>def main():<br>    agent = CodingAgent(api_key=os.getenv(&quot;ANTHROPIC_API_KEY&quot;))<br><br>    while True:<br>        user_prompt = input(&quot;&gt; &quot;)<br><br>        if user_prompt == &quot;exit&quot;:<br>            break<br><br>        # Run the agent<br>        result = agent.run(user_prompt)<br>        print(result)</pre><p>That’s the basic version. I added:</p><p>- Colored output (using <strong>colorama</strong>)</p><p>- <strong>/reset</strong> command to clear history</p><p>- <strong>/history</strong> command to see conversation stats</p><p>- Safety confirmations for dangerous operations</p><h4>The Web Search Addition</h4><p>Here’s where it gets interesting. Adding a new capability is trivial.</p><p>To add web search, I:</p><p>1. Added <strong>ddgs</strong> package to requirements</p><p>2. Created a <strong>web_search</strong> function</p><p>3. Added the schema to <strong>TOOL_SCHEMAS</strong></p><p>That’s it. The agent immediately knew how to use it:</p><pre>def web_search(query: str, max_results: int = 5):<br>    &quot;&quot;&quot;Search the web using DuckDuckGo.&quot;&quot;&quot;<br>    try:<br>        ddgs = DDGS()<br>        results = ddgs.text(query, max_results=max_results)<br>        return {<br>            &quot;success&quot;: True,<br>            &quot;results&quot;: results<br>        }<br>    except Exception as e:<br>        return {<br>            &quot;success&quot;: False,<br>            &quot;error&quot;: str(e)<br>        }</pre><p>No framework needed. No complex integrations. Just a function.</p><h3>The Moment of Truth: Is This Actually an Agent?</h3><p>After building this, I had a crisis: “Did I just build an LLM wrapper?”</p><p>So I researched the 2025 definitions of AI agents. Here’s what I found:</p><h4>What Makes Something an AI Agent (According to IBM, 2025):</h4><p><strong>Autonomous decision-making</strong> — Claude decides which tools to use</p><p><strong>Tool use</strong> — Interacts with the environment</p><p><strong>ReAct loop</strong> — Think → Act → Observe</p><p><strong>Goal-driven</strong>— Works toward completing tasks</p><p><strong>Perceives environment </strong>— Reads files, searches web</p><p><strong>Takes actions</strong> — Actually modifies files and runs commands</p><p>My code checked every box.</p><h3>The Framework Question: When Do You Actually Need One?</h3><p>After building this, I researched when developers typically switch to frameworks. Here’s what I found:</p><h4>You DON’T need a framework if:</h4><p>- You have &lt; 10 tools</p><p>- You’re building one agent (not a team)</p><p>- Simple conversation memory works fine</p><p>- You don’t need RAG (vector database search)</p><h4>You MIGHT need a framework when:</h4><p>- You need RAG with semantic search</p><p>- You need 3+ agents collaborating</p><p>- You need 20+ external integrations</p><p>- You need complex state machines</p><p>- You’re going to production with enterprise features</p><h3>Key Lessons Learned</h3><h4>1. Start Simple, Add Complexity When It Hurts</h4><p>I almost started with LangChain because “that’s what professionals use.” But by building from scratch, I:</p><p>- Understood exactly how agents work</p><p>- Can debug every line of code</p><p>- Have zero framework lock-in</p><p>- Learned the patterns that frameworks abstract away</p><h4>2. The ReAct Loop Is All You Need</h4><p>Every coding agent — from Claude Code to GitHub Copilot — uses this same loop. Understanding this is more valuable than knowing any specific framework.</p><h4>3. Tool Calling Is the Superpower</h4><p>The magic isn’t in the LLM’s intelligence. It’s in giving it:</p><p>- The ability to take actions (tools)</p><p>- A feedback loop (observations)</p><p>- The autonomy to iterate</p><h4>4. “Agent” Is Simpler Than You Think</h4><p>You don’t need:</p><p>- Multi-agent orchestration</p><p>- Vector databases</p><p>- Complex memory systems</p><p>- Graph-based workflows</p><p>You just need:</p><p>- An LLM that can call tools</p><p>- A loop that feeds results back</p><p>- Tools that do real things</p><h3>The Full Architecture</h3><p>Here’s the complete picture of what we built:</p><pre>┌─────────────────────────────────────────────┐<br>│              User Interface                 │<br>│         (main.py - 50 lines)                │<br>│   Input prompt → Display results            │<br>└─────────────────┬───────────────────────────┘<br>                  │<br>                  ▼<br>┌────────────────────────────────────────────┐<br>│             Agent Core                     │<br>│        (agent.py - 100 lines)              │<br>│                                            │<br>│  ┌─────────────────────────────────┐       │<br>│  │      ReAct Loop                 │       │<br>│  │  1. Send prompt + tools to LLM  │       │<br>│  │  2. LLM decides action          │       │<br>│  │  3. Execute tool                │       │<br>│  │  4. Feed result back            │       │<br>│  │  5. Repeat until done           │       │<br>│  └─────────────────────────────────┘       │<br>└─────────────────┬──────────────────────────┘<br>                  │<br>                  ▼<br>┌────────────────────────────────────────────┐<br>│              Tools Layer                   │<br>│        (tools.py - 150 lines)              │<br>│                                            │<br>│  • read_file()     - Read files            │<br>│  • write_file()    - Create files          │<br>│  • edit_file()     - Modify files          │<br>│  • shell_command() - Run commands          │<br>│  • web_search()    - Search internet       │<br>└────────────────────────────────────────────┘</pre><h3>Conclusion: You Don’t Need Permission</h3><p>The AI agent landscape is full of intimidating terms: multi-agent orchestration, vector embeddings, semantic search, graph-based workflows, RAG pipelines.</p><p>But at the core, an AI agent is just:</p><ol><li>An LLM</li><li>Some tools</li><li>A loop</li></ol><p>You just built one in 300 lines.</p><p>You don’t need:</p><ul><li>A PhD in machine learning</li><li>A complex framework</li><li>Months of learning</li><li>Permission from the “AI engineering” community</li></ul><p>You just need:</p><ul><li>An API key</li><li>Python basics</li><li>The ReAct pattern</li><li>The willingness to start simple</li></ul><p>The frameworks exist to solve problems you don’t have yet. Build first. Abstract later. Learn continuously.</p><p>And when someone asks “Why not just use LangChain?”, you can say:</p><p><strong>“Because I wanted to understand how it actually works.”</strong></p><h3>Resources</h3><p><strong>Code</strong>:</p><ul><li>Full implementation: <a href="https://github.com/yashv6655/Simple-Claude-Code">https://github.com/yashv6655/Simple-Claude-Code</a></li></ul><p><strong>Source</strong>: <a href="https://devblogs.microsoft.com/ise/earning-agentic-complexity/">https://devblogs.microsoft.com/ise/earning-agentic-complexity/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ca43eccad6e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The great AI coding showdown: Claude Code vs Gemini CLI]]></title>
            <link>https://medium.com/@yashv6655/the-great-ai-coding-showdown-claude-code-vs-gemini-cli-dd77bdeb3cc0?source=rss-16c3985b4bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd77bdeb3cc0</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-ml-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[JBY]]></dc:creator>
            <pubDate>Thu, 26 Jun 2025 05:40:58 GMT</pubDate>
            <atom:updated>2025-06-26T05:40:58.273Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>The AI coding assistant market just got a major shakeup.</strong> Google’s Gemini CLI launched on June 25, 2025, with an impossibly generous free tier that’s forcing the entire industry to reconsider their pricing strategies, while Anthropic’s Claude Code maintains its premium positioning with superior performance benchmarks. For developers choosing their next AI coding companion, the decision isn’t just about features: it’s about philosophy, pricing, and which tool best fits your workflow.</p><p><strong>Claude’s underlying models dominate on pure coding performance</strong>, with Claude Sonnet 4 scoring 72.7% on SWE-bench compared to Gemini 2.5 Pro’s 63.2%, but Gemini CLI counters with a massive 1 million token context window (5x larger than Claude’s 200K) and a free tier that covers most developers’ daily usage. The choice between paying $100–200/month for premium capabilities versus getting advanced AI assistance for free represents one of the most significant value propositions in developer tooling today.</p><p>Both tools emerged from the 2024–2025 AI coding revolution, with Claude Code transitioning from research preview to general availability while Gemini CLI launched as an open-source challenger designed to democratize AI-powered development. This comparison examines how these fundamentally different approaches stack up across the factors that matter most to working developers.</p><h3>Claude Code brings enterprise-grade autonomy to the terminal</h3><p><strong>Anthropic’s Claude Code operates as an autonomous coding agent</strong> that understands entire codebases and can perform complex, multi-step development tasks without constant guidance. The tool excels at what it calls “agentic” behavior: mapping project dependencies, making cross-file edits, and executing sophisticated workflows that traditional autocomplete tools can’t handle.</p><p><strong>The installation process reflects its professional focus.</strong> Requiring Node.js 18+ and Git integration, Claude Code expects developers who are comfortable with command-line workflows. After a one-time OAuth setup with your Anthropic Console account, the tool becomes accessible through a simple claude command that immediately understands your project context through special CLAUDE.md configuration files.</p><p><strong>Performance benchmarks reveal the underlying model’s strength in complex reasoning tasks.</strong> Claude Sonnet 4 achieves 72.7% on SWE-bench compared to Gemini 2.5 Pro’s 63.2%, while Claude Opus 4 pushes performance even higher at 72.5%. These scores translate into real-world advantages for tasks like large-scale refactoring, bug hunting across multiple files, and test-driven development workflows where context awareness matters most.</p><p>The tool’s <strong>permission-based interaction model</strong> asks for approval before making system changes, though experienced users can bypass these prompts for faster workflows. This approach reflects Anthropic’s enterprise focus, providing powerful automation while maintaining safety guardrails that make sense in professional environments.</p><h3>Gemini CLI democratizes AI coding with Google’s ecosystem power</h3><p><strong>Google’s Gemini CLI takes a radically different approach</strong>, launching as a fully open-source tool with a free tier so generous it covers roughly double the average developer’s daily usage. With 60 requests per minute and 1,000 requests per day at zero cost, Google is essentially betting that widespread adoption matters more than immediate revenue.</p><p><strong>The technical architecture leverages Google’s multimodal AI capabilities</strong> in ways that pure coding tools cannot match. Developers can generate applications from PDF wireframes, create video content through Veo integration, or process images alongside code, expanding the definition of what a “coding assistant” can accomplish.</p><p><strong>Google’s 1 million token context window represents a significant technical advantage</strong> over Claude’s 200K limit. For developers working with large codebases or needing to maintain context across extended conversations, this 5x capacity difference enables workflows that simply aren’t possible with smaller context windows. The tool can effectively hold entire small-to-medium projects in memory simultaneously.</p><p><strong>The open-source nature creates different community dynamics</strong> than proprietary alternatives. With over 4,000 GitHub stars since its June 25, 2025, launch and Apache 2.0 licensing, Gemini CLI encourages community contributions and provides full transparency into its functionality, addressing common developer concerns about AI tool “black boxes.”</p><h3>Pricing strategies reveal fundamentally different market philosophies</h3><p><strong>Claude Code’s premium pricing structure reflects its enterprise positioning.</strong> The Pro plan at $20/month provides moderate usage limits, while the Max plan offers two tiers: $100/month for 5x Pro usage and $200/month for 20x Pro usage. This tiered approach targets both individual professionals and power users who have integrated AI deeply into their workflows.</p><p><strong>API pricing adds complexity to Claude Code’s cost structure</strong>, with Claude Opus 4 tokens costing $15–75 per million, depending on input versus output usage. Heavy users report monthly costs ranging from hundreds to thousands of dollars, making cost management a critical consideration for professional adoption.</p><p><strong>Gemini CLI’s aggressive free tier represents a classic market disruption strategy.</strong> Google is essentially subsidizing developer adoption to build market share, calculating that widespread usage will create ecosystem lock-in and eventual enterprise revenue through Google Cloud integration. The free limits — 60 requests per minute and 1,000 daily requests — exceed what most developers use even in intensive coding sessions.</p><p><strong>The pricing gap creates different adoption patterns.</strong> Claude Code attracts teams and individual developers who need premium capabilities and can afford the investment, while Gemini CLI removes cost barriers entirely, appealing to students, hobbyists, and price-sensitive professionals who want to experiment with AI coding assistance.</p><h3>Performance differences matter most for complex development tasks</h3><p><strong>Benchmark comparisons reveal nuanced performance trade-offs</strong> between the underlying AI models powering these tools. Claude Sonnet 4’s 72.7% SWE-bench score compared to Gemini 2.5 Pro’s 63.2% translates into measurably better performance on complex coding challenges, particularly those requiring multi-file coordination and deep architectural understanding.</p><p><strong>Claude’s parallel compute capabilities</strong> push performance even higher, with Claude Sonnet 4 achieving 80.2% on SWE-bench when multiple tools can execute simultaneously. This advantage becomes most apparent in scenarios like large-scale refactoring, where the tool must coordinate changes across numerous files while maintaining code consistency and functionality.</p><p><strong>Gemini CLI compensates for lower raw performance</strong> with its massive context window and multimodal capabilities. While the underlying Gemini 2.5 Pro model may not match Claude’s pure coding benchmark scores, its ability to maintain conversation context across extended sessions and process non-text inputs creates different types of productivity gains.</p><p><strong>Real-world performance reports from enterprise users</strong> provide additional perspective. Intercom reports that Claude Code enables applications “they wouldn’t have had bandwidth for” previously, while Anthropic’s internal teams claim 2x productivity increases for specific workflows. Gemini CLI users, while lacking similar enterprise case studies due to its recent launch, report high satisfaction with its responsiveness and broad capability set.</p><h3>User experience philosophies reflect different design priorities</h3><p><strong>Claude Code’s terminal-native interface assumes developer expertise</strong> and rewards users who invest time in learning its capabilities. The tool’s slash command system (/bug, /init, /clear) and project-specific CLAUDE.md configuration files enable sophisticated customization but require technical knowledge to optimize effectively.</p><p><strong>Permission-based workflows</strong> in Claude Code reflect enterprise security concerns, asking for approval before making file changes or executing system commands. While this creates friction for some use cases, it prevents the kinds of accidental damage that could occur with fully autonomous AI agents operating in production environments.</p><p><strong>Gemini CLI prioritizes accessibility and ease of use</strong>, with straightforward installation via npx commands and minimal configuration requirements. The tool&#39;s ReAct (reason-and-act) architecture provides transparency into its thinking process, helping users understand what the AI is doing rather than simply presenting final results.</p><p><strong>Visual design elements</strong> in Gemini CLI include color themes and clean formatting that make terminal interactions more pleasant, while Claude Code focuses on functional density and rapid task completion. These design choices reflect different assumptions about user preferences and primary use cases.</p><h3>Enterprise adoption patterns show market maturity differences</h3><p><strong>Claude Code has established enterprise traction</strong> with organizations like Intercom using it for applications that were previously resource-constrained. The tool’s integration with existing development workflows through GitHub Actions, native IDE support, and MCP (Model Context Protocol) compatibility make it suitable for professional development environments.</p><p><strong>Security and compliance features</strong> in Claude Code address enterprise concerns through local operation, direct API connections without intermediate servers, and audit trails for code changes. The permission system and signed commits provide the kind of governance that enterprise teams require for AI tool adoption.</p><p><strong>Gemini CLI’s enterprise strategy remains developing</strong>, though Google’s broader ecosystem provides advantages through Google Cloud, Workspace integration, and enterprise-grade authentication systems. The open-source nature allows organizations to audit and modify the tool according to their specific requirements — a significant advantage for security-conscious enterprises.</p><p><strong>Market timing favors different adoption strategies.</strong> Claude Code benefits from first-mover advantages and established relationships, while Gemini CLI leverages Google’s brand recognition and developer ecosystem to accelerate adoption among teams already using Google services.</p><h3>The verdict depends on your development context and priorities</h3><p><strong>Choose Claude Code if you prioritize coding performance and can justify premium pricing.</strong> Teams working on complex, multi-file projects where superior AI reasoning translates into significant time savings will find the investment worthwhile. The tool excels at sophisticated refactoring, debugging across large codebases, and workflows where deep architectural understanding matters most.</p><p><strong>Enterprise teams with established AI budgets</strong> should strongly consider Claude Code’s proven capabilities and mature ecosystem integration. The tool’s permission system, security features, and established enterprise customer base make it a safer choice for organizations requiring governance and compliance.</p><p><strong>Choose Gemini CLI if cost efficiency and broad capabilities matter more than peak performance.</strong> The generous free tier makes it ideal for individual developers, students, and teams exploring AI coding assistance without budget constraints. The open-source nature and Google ecosystem integration provide long-term strategic advantages.</p><p><strong>Multimodal workflows</strong> favor Gemini CLI’s unique capabilities in image processing, video generation, and creative content creation alongside traditional coding tasks. Developers working on multimedia projects or requiring visual design capabilities will find features unavailable in pure coding-focused tools.</p><p><strong>The broader market implications</strong> suggest this competition will accelerate AI coding tool adoption across developer communities previously excluded by pricing barriers. Google’s aggressive free-tier strategy forces all competitors to reconsider their value propositions, ultimately benefiting developers through improved capabilities and more accessible pricing.</p><p><strong>For most developers, the decision comes down to budget tolerance and workflow complexity.</strong> Claude Code justifies its premium pricing for teams requiring the best possible AI coding performance, while Gemini CLI provides remarkable capabilities at zero cost for the majority of development use cases. The future likely belongs to developers who leverage both tools strategically, using each where it provides the greatest advantage.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd77bdeb3cc0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Great Compression: Why AI Models Are Getting SmallerAnd Smarter]]></title>
            <link>https://medium.com/@yashv6655/the-great-compression-why-ai-models-are-getting-smallerand-smarter-76fc3c5bb034?source=rss-16c3985b4bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/76fc3c5bb034</guid>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[JBY]]></dc:creator>
            <pubDate>Thu, 22 May 2025 05:42:44 GMT</pubDate>
            <atom:updated>2025-05-22T05:42:44.131Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*P-7OkRzbb7SG54oGeuqgUA.png" /></figure><p>In the early days of large language models, bigger meant better. GPT-3, released in 2020 with 175 billion parameters, was hailed as a breakthrough in natural language understanding. Since then, the industry has pursued increasingly massive models: GPT-4, Gemini Ultra, Claude Opus, with growing accuracy and increasing costs, latency, and carbon footprints.</p><p>But in 2025, the trend has shifted. A new wave of compact, efficient AI models is redefining the landscape. From Apple’s FastVLM to Microsoft’s Phi-3, Meta’s TinyLLaMA, and the lightweight Mistral models, these systems are proving that small doesn’t mean weak.</p><h3>Why Smaller Models Matter</h3><p>Smaller models are not just about cutting corners; they enable a new paradigm in AI: <strong>on-device intelligence</strong>. Instead of relying on distant data centers, compact models can run directly on laptops, phones, and even microcontrollers.</p><p>Here’s why this matters:</p><ul><li><strong>Privacy</strong>: With no need to send data to the cloud, users gain full control over their information.</li><li><strong>Latency</strong>: On-device AI can operate in real-time, without the delay of network round-trips.</li><li><strong>Cost</strong>: Developers can avoid the expense of cloud inference or API fees.</li><li><strong>Sustainability</strong>: Smaller models require less energy to train and deploy.</li></ul><h3>Apple FastVLM: A Case Study</h3><p>Apple’s <a href="https://github.com/apple/ml-fastvlm">FastVLM</a> is a prime example of the next generation of compact multimodal AI systems. Short for Fast Vision-Language Model, FastVLM is trained to perform tasks that combine visual and textual reasoning, like answering natural language questions about an image, without relying on cloud computation.</p><p>At its core, FastVLM uses a MobileViT V2 encoder as the vision backbone, selected for its efficiency and compatibility with Apple Silicon. This encoder converts images into dense feature embeddings. These are then aligned with text inputs through a projection layer that maps both modalities into a shared space. From there, a compact language model (~3 billion parameters) interprets the visual context and generates human-readable responses.</p><p>Despite its compact size, FastVLM-1.1 achieves <strong>91.5% accuracy on VQAv2</strong> (a benchmark for visual question answering) and <strong>46.1% on GQA</strong> (a dataset requiring compositional reasoning about images). These results are comparable to or better than much larger models like LLaVA-1.5.</p><p>What’s most striking is that FastVLM is built for <strong>on-device execution</strong>. It’s optimized using Apple’s Core ML framework to run natively on Macs, iPhones, and iPads — eliminating the need for an internet connection or remote GPU inference. This not only improves latency and battery performance but also aligns with Apple’s broader emphasis on privacy and user control.</p><p>Another key highlight is Apple’s decision to open-source both the weights and training code. This makes FastVLM one of the few models from a major tech company that is both <strong>highly capable and openly reproducible</strong>. Developers and researchers can fine-tune the model on custom datasets or integrate it into real-world apps with minimal computational overhead.</p><p>In a world where most advanced multimodal models are locked behind APIs and cloud paywalls, FastVLM offers an alternative: democratized, high-performance AI that respects privacy and runs at the edge.</p><h3>Phi-3 and Mistral: Efficient Language Understanding</h3><p>Microsoft’s <a href="https://www.microsoft.com/en-us/research/project/phi/">Phi-3</a> family, including Phi-3-mini and Phi-3-small, demonstrates that with focused, high-quality training data, even models with fewer than 10 billion parameters can compete with much larger systems.</p><p>Meanwhile, <a href="https://mistral.ai/news/introducing-mistral-7b/">Mistral</a> has earned praise for its open weights, competitive performance, and speed. Mistral-7B and Mixtral (a mixture-of-experts variant) combine fast inference with high accuracy, optimized for deployment in edge environments.</p><h3>TinyLLaMA: Meta’s Open Bet on Efficiency</h3><p>Meta’s <a href="https://ai.meta.com/blog/tiny-llama-open-foundation-model/">TinyLLaMA</a> is another entrant in the efficient AI race. It offers a distilled version of its popular LLaMA model, designed to run on consumer GPUs and mobile hardware.</p><p>Its training pipeline prioritizes accessibility, making it easier for researchers and developers to customize the model without requiring massive compute budgets. TinyLLaMA continues Meta’s strategy of open development, supporting innovation from the open-source community.</p><h3>The Architecture Revolution</h3><p>What makes these models possible? Three key trends:</p><ul><li><strong>Distillation</strong>: Training a small model to mimic a large one, transferring knowledge efficiently.</li><li><strong>Quantization</strong>: Reducing model precision (e.g., 16-bit or 8-bit) to cut memory and compute requirements.</li><li><strong>LoRA and MoE</strong>: Techniques like Low-Rank Adaptation (LoRA) and Mixture-of-Experts (MoE) enable models to be selectively dynamic without increasing total size.</li></ul><p>Together, these approaches allow teams to build lean systems that still punch above their weight.</p><h3>Implications for Developers and the Future</h3><ul><li><strong>Custom Models</strong>: Startups can now fine-tune their local models for niche use cases.</li><li><strong>AI at the Edge</strong>: Expect smarter wearables, autonomous drones, and IoT devices that use local AI.</li><li><strong>Decentralization</strong>: As APIs become optional, more companies may ditch cloud reliance for good.</li><li><strong>Regulatory Readiness</strong>: Local processing can help meet emerging data sovereignty and AI compliance standards.</li></ul><h3>Conclusion</h3><p>We are entering the phase of the “Great Compression,” where innovation is measured not by how <em>big</em> your model is, but how <em>smartly</em> it fits. These smaller models are not just a response to compute limits, they are unlocking new opportunities in privacy, accessibility, and edge computing.</p><p>As the industry matures, expect the most impactful AI to be the ones you don’t see running because they’re already in your pocket.</p><p><strong>Sources:</strong></p><ul><li><a href="https://github.com/apple/ml-fastvlm">https://github.com/apple/ml-fastvlm</a></li><li><a href="https://www.microsoft.com/en-us/research/project/phi/">https://www.microsoft.com/en-us/research/project/phi/</a></li><li><a href="https://mistral.ai/news/introducing-mistral-7b/">https://mistral.ai/news/introducing-mistral-7b/</a></li><li><a href="https://ai.meta.com/blog/tiny-llama-open-foundation-model/">https://ai.meta.com/blog/tiny-llama-open-foundation-model/</a></li><li><a href="https://huggingface.co/papers/2405.03063">https://huggingface.co/papers/2405.03063</a></li><li><a href="https://www.apple.com/newsroom/">https://www.apple.com/newsroom/</a></li><li><a href="https://developer.apple.com/machine-learning/core-ml/">https://developer.apple.com/machine-learning/core-ml/</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=76fc3c5bb034" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Apple FastVLM: On-Device Multimodal AI Without the Cloud]]></title>
            <link>https://medium.com/@yashv6655/apple-fastvlm-on-device-multimodal-ai-without-the-cloud-3670d63a902e?source=rss-16c3985b4bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/3670d63a902e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[visual-language-model]]></category>
            <dc:creator><![CDATA[JBY]]></dc:creator>
            <pubDate>Tue, 13 May 2025 03:10:01 GMT</pubDate>
            <atom:updated>2025-05-18T20:01:37.619Z</atom:updated>
            <content:encoded><![CDATA[<p>In May 2025, Apple quietly open-sourced a project that could redefine the future of multimodal artificial intelligence: <a href="https://github.com/apple/ml-fastvlm">FastVLM</a>. Short for “Fast Vision-Language Model,” FastVLM is Apple’s answer to the growing demand for lightweight AI models capable of understanding both images and text, but without relying on cloud infrastructure. In an era where most vision-language models (VLMs) are massive, GPU-hungry systems running in data centers, Apple is betting on something different: privacy-preserving, high-performance AI that runs directly on your device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*irKtKAtGcEN8_tuJX4bdmA.png" /></figure><h3>What Is FastVLM?</h3><p>FastVLM is a small yet powerful vision-language model designed for on-device multimodal understanding. It enables tasks like image captioning, visual question answering (VQA), and multimodal instruction following, all on local hardware such as Macs, iPhones, or iPads. The model is trained to align visual inputs with natural language, in effect, letting users ask questions about images and receive natural language responses without sending data to the cloud.</p><h3>How It Works</h3><p>At its core, FastVLM combines a lightweight visual encoder with a compact language model:</p><ul><li><strong>Visual Encoder</strong>: A MobileViT V2-based architecture optimized for Apple Silicon, which efficiently processes images.</li><li><strong>Language Model</strong>: A small LLM (~3B parameters) that interprets user prompts and forms coherent, context-aware responses.</li><li><strong>Multimodal Alignment</strong>: A projection layer fuses image and text features into a shared latent space.</li></ul><p>Despite its size, FastVLM-1.1 achieves impressive accuracy: <strong>91.5% on VQAv2</strong> and <strong>46.1% on GQA</strong>, rivaling larger models like LLaVA-1.5, while being 4–10x smaller.</p><h3>Why It Matters</h3><p>Apple’s move is part of a broader trend: bringing powerful AI capabilities to personal devices. As concerns over data privacy and latency grow, running models locally becomes more attractive. FastVLM is optimized for <a href="https://developer.apple.com/machine-learning/core-ml/">Core ML</a>, allowing seamless integration with Apple’s hardware ecosystem.</p><p>This shift isn’t just technical, it’s philosophical. Apple is emphasizing privacy and user control while maintaining AI performance. By releasing the weights and training code, Apple is also opening the door for developers and researchers to build customized multimodal models.</p><h3>Real-World Applications</h3><ul><li><strong>Accessibility</strong>: Real-time image-to-text conversion for visually impaired users.</li><li><strong>Education</strong>: Interactive visual learning without the need for an internet connection.</li><li><strong>Creative Tools</strong>: On-device AI assistants for artists, designers, and photographers.</li><li><strong>Everyday Utility</strong>: Imagine pointing your camera at a plant and asking, “What kind of plant is this?” or taking a photo of a menu in another language and asking for a translated summary.</li><li><strong>Personal Knowledge Management</strong>: Users could generate structured notes or tags from screenshots, documents, or whiteboard images entirely offline.</li><li><strong>Photo Organization</strong>: Search your photo gallery using natural language prompts like “pictures of my dog at the beach”, without uploading anything to the cloud.</li></ul><h3>How It Compares to Competitors</h3><p>FastVLM enters a crowded field dominated by models like OpenAI’s GPT-4V, Meta’s IDEFICS, Google’s Gemini, and LLaVA-1.5. However, its value proposition is unique:</p><ul><li><strong>On-Device Focus</strong>: Unlike GPT-4V or Gemini, FastVLM is designed to run efficiently on Apple hardware with no server dependency.</li><li><strong>Privacy by Design</strong>: Data never leaves the device, which stands in stark contrast to cloud-first models.</li><li><strong>Open Weights</strong>: Unlike most Apple projects, FastVLM’s weights and training code are public, making it accessible for customization.</li><li><strong>Performance/Size Tradeoff</strong>: It achieves strong accuracy while being significantly smaller than most competing models.</li></ul><p>While it may not outperform the giants in raw generative capability or reasoning depth, FastVLM’s strength lies in efficiency, deployability, and ecosystem fit.</p><h3>The Samsung Challenge: A Glimpse at the Galaxy S25 Edge</h3><p>In contrast to Apple’s low-profile release of FastVLM, Samsung has taken a highly publicized approach to on-device AI with the Galaxy S25 Edge, launched in May 2025. Boasting a sleek 5.8mm titanium design and a 200MP AI-enhanced camera, the device is loaded with features powered by Google’s Gemini AI. Samsung highlights real-time translation, image-based search, and personal assistant functionalities, all happening on-device or in a hybrid setup.</p><p>This shows that Samsung is pushing hard into consumer-facing AI experiences and doing so with significant hardware-software co-design. Their approach leans on tight Google integration, which may offer richer features in the short term.</p><h3>Is Apple Ahead or Lagging Behind?</h3><p>In many ways, Apple is ahead of the game, just quietly so. FastVLM is not flashy, but it’s deeply technical, open-source, and privacy-forward. Unlike Samsung’s approach that still leans on cloud assistance for many tasks, Apple is doubling down on true on-device autonomy.</p><p>That said, Apple must address one critical area: <strong>integration into consumer-facing experiences</strong>. While FastVLM is available to developers, it is not yet baked into iOS features the way Samsung integrates Gemini into Galaxy’s UX. Apple’s next move may be to bring FastVLM into the spotlight through apps like Photos, Notes, or Siri.</p><p>If Apple succeeds in tying FastVLM directly into its core apps and services, it may not only catch up, it could redefine what private, powerful, and helpful AI looks like at a consumer level.</p><h3>How To Try It</h3><p>Developers can clone the <a href="https://github.com/apple/ml-fastvlm">FastVLM GitHub repo</a>, download the pretrained models, and start running inference using PyTorch or ONNX. Core ML conversion tools are also provided, making it easy to deploy on macOS or iOS.</p><h3>Looking Ahead</h3><p>Apple’s FastVLM showcases how efficiency, privacy, and open development can coexist. As large models dominate headlines, this quiet release reminds us that innovation doesn’t always come from scale; sometimes it comes from thinking smaller, smarter, and more locally.</p><p>The next frontier? Embedding FastVLM into Apple’s own apps and services to give everyday users a taste of on-device AI magic, before the competition does.</p><p><strong><em>Sources:</em></strong></p><p><a href="https://github.com/apple/ml-fastvlm"><em>https://github.com/apple/ml-fastvlm</em></a></p><p><a href="https://developer.apple.com/machine-learning/core-ml/"><em>https://developer.apple.com/machine-learning/core-ml/</em></a></p><p><a href="https://huggingface.co/papers/2405.03063"><em>https://huggingface.co/papers/2405.03063</em></a></p><p><a href="https://www.apple.com/newsroom/"><em>https://www.apple.com/newsroom/</em></a></p><p><a href="https://www.lifewire.com/samsung-galaxy-s25-edge-announcement-11733296"><em>https://www.lifewire.com/samsung-galaxy-s25-edge-announcement-11733296</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3670d63a902e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>