<?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 Akshay Chame on Medium]]></title>
        <description><![CDATA[Stories by Akshay Chame on Medium]]></description>
        <link>https://medium.com/@akshay.chame22?source=rss-ffd20c34e1b4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*F0x3NCHfbUYdg8ZpUsVucg.gif</url>
            <title>Stories by Akshay Chame on Medium</title>
            <link>https://medium.com/@akshay.chame22?source=rss-ffd20c34e1b4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:04:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akshay.chame22/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[How to run DeepSeek-R1:1.5b LLM on android using Termux]]></title>
            <link>https://medium.com/qed42-tech-insights/how-to-run-deepseek-r1-1-5b-llm-on-android-using-termux-91e30a318459?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/91e30a318459</guid>
            <category><![CDATA[deepseek-r1]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[termux]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Thu, 27 Mar 2025 07:32:45 GMT</pubDate>
            <atom:updated>2025-03-27T07:32:45.279Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gkx5PmRs6p2Htt2oWuIwcg.png" /></figure><p>Large Language Models (LLMs) have revolutionized natural language processing, unlocking capabilities that were once unimaginable. However, deploying these models on mobile devices has remained a complex challenge, requiring solutions that balance computational demands with hardware limitations.</p><p>Running an LLM like DeepSeek-R1:1.5b on an Android device pushes the boundaries of on-device AI, offering powerful natural language generation without relying on cloud infrastructure.</p><p>For instance, this setup enables local processing of advanced tasks like real-time decision-making systems or automated code debugging, making it both efficient and accessible.</p><p>The ability to achieve this on mobile opens up possibilities for real-time, offline use cases, particularly in areas where connectivity or privacy is critical. But to make this possible, a robust environment is essential-this is where Termux becomes the key.</p><p>This guide walks you through the process, ensuring you can set up and run the DeepSeek-R1:1.5b LLM efficiently while also exploring ways to extend it into a free API for broader application integration.</p><h3>Understanding reasoning models</h3><p>Reasoning models are specialized language models designed to excel at logical reasoning, problem-solving, and structured thinking tasks.</p><p>Unlike common language models that primarily focus on generating coherent text by predicting the next word in a sequence, reasoning models go a step further by integrating structured reasoning mechanisms. These mechanisms enable them to perform logical inference, step-by-step problem-solving, and decision-making, making them adept at handling complex tasks that require more than just text generation.</p><p>They often integrate symbolic reasoning components and are trained using techniques such as <strong>GPRO</strong> (Gradient-based Probabilistic Optimization) and supervised fine-tuning on datasets containing explicit reasoning tasks. This enables them to perform structured reasoning and handle complex problem-solving scenarios effectively.</p><p>This specialization makes reasoning models particularly effective in domains requiring precise and logical decision-making, such as mathematical problem-solving, legal reasoning, and complex question-answering systems.‍</p><h3>DeepSeek-R1: Architecture and Training Approach</h3><p>DeepSeek-R1 is a reinforcement learning-driven LLM designed to <strong>enhance reasoning capabilities</strong> while maintaining structured, user-friendly outputs. Unlike traditional LLMs that depend on <strong>supervised fine-tuning (SFT) and RLHF</strong>, DeepSeek-R1 optimizes reasoning through <strong>self-improving reinforcement learning (RL)</strong>, reducing reliance on human-labeled data.</p><h3>Architecture of DeepSeek-R1</h3><h4>1. Cold Start Fine-Tuning for Stability</h4><p>DeepSeek-R1 builds upon <strong>DeepSeek-V3-Base</strong> but starts with a <strong>small, high-quality dataset of structured Chain of Thought (CoT) reasoning</strong>.</p><ul><li>This phase <strong>stabilizes RL training</strong> by ensuring the model <strong>learns structured reasoning before reinforcement learning begins</strong>.</li><li>Unlike models that jump directly into RL, this step prevents <strong>instability</strong> and improves <strong>interpretability</strong>.</li></ul><h4>2. Reinforcement Learning for Reasoning</h4><p>DeepSeek-R1 uses <strong>Group Relative Policy Optimization (GRPO)</strong> to refine reasoning.</p><ul><li><strong>GRPO replaces the critic model</strong> by optimizing <strong>grouped response evaluations</strong>, making RL <strong>more efficient and stable</strong>.</li><li><strong>Rule-based rewards</strong> ensure accuracy in <strong>math, coding, and logical reasoning</strong> while <strong>format rewards</strong> enforce structured, readable outputs.</li><li>A <strong>language consistency reward</strong> prevents issues like mixed-language responses.</li></ul><h4>3. Supervised Fine-Tuning for Generalization</h4><p>After RL optimizes reasoning, DeepSeek-R1 undergoes <strong>SFT to enhance non-reasoning tasks</strong> such as <strong>writing, translation, and factual QA</strong>.</p><ul><li>Uses <strong>rejection sampling</strong> to <strong>filter high-quality reasoning samples</strong> for consistency.</li><li>Avoids training on <strong>massive, unfiltered datasets</strong>, ensuring better alignment with structured reasoning.</li></ul><h4>4. Final Reinforcement Learning for Human Alignment</h4><p>A <strong>second RL stage</strong> refines helpfulness and safety <strong>after reasoning is optimized</strong>.</p><ul><li>Unlike traditional RLHF models that prioritize alignment first, DeepSeek-R1 <strong>focuses on reasoning first, alignment second</strong>, ensuring strong logical performance without sacrificing clarity.<strong>‍</strong></li><li><strong>Rule-based rewards</strong> optimize reasoning, while <strong>human preference models</strong> refine responses for usability and safety.</li></ul><h3>Device requirements</h3><p>Before proceeding with the installation, ensure your Android device meets these minimum requirements for running the DeepSeek-R1:1.5B model on your phone:</p><ul><li>Android version: 7.0 (Nougat) or higher</li><li>Available storage: At least 8GB free space</li><li>RAM: Minimum 6GB, recommended 8GB or more</li><li>Processor: Snapdragon 845 or equivalent (8 cores recommended)</li><li>Architecture: ARM64 (aarch64)</li></ul><p>Note: The model’s performance will vary significantly based on your device’s specifications. Higher-end devices will provide better response times and more stable operation.</p><h3>Prerequisites</h3><p>1. An Android device with sufficient storage and processing power.</p><p>2. Termux app installed on your device. Download the Termux APK from<a href="https://github.com/termux/termux-app/releases"> Termux Releases</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*onSmKq5ECPwq4Ug9.png" /></figure><p>3. A stable internet connection.</p><p>Termux is an Android terminal emulator and Linux environment app that is crucial for this setup. Ensure your device meets these prerequisites before proceeding.</p><h3>Troubleshooting common issues</h3><h4>Memory management‍</h4><p>If you encounter out-of-memory errors:</p><ul><li>Close background apps before running the model</li><li>Use a swap file to extend available memory:<br>‍‍</li></ul><h4>Performance optimization</h4><p>To improve model performance:</p><ul><li>Enable high-performance mode on your device if available</li><li>Set CPU governor to performance:‍</li></ul><p>Note: This requires root access and may affect battery life.</p><h3>Step-by-step guide</h3><h4>1. Set up the Termux environment</h4><p>First, ensure that your Termux environment is properly configured. Run the following commands: <br>‍</p><pre>termux-setup-storage pkg upgrade pkg install git cmake golang‍</pre><ul><li><strong>termux-setup-storage</strong>: Grants Termux access to your device’s file storage.</li><li><strong>pkg upgrade</strong>: Updates Termux packages to their latest versions.</li><li><strong>pkg install git cmake golang</strong>: Installs the necessary tools, including Git, CMake, and Go.</li></ul><p>Additional recommended packages:‍</p><pre>pkg install python clang make wget</pre><p>These steps prepare your Termux environment for installing and running advanced software like Ollama.</p><h4>2. Install Ollama</h4><p>Ollama is a tool that allows you to run LLMs locally. Here’s how to set it up: <br>‍</p><pre>git clone --depth 1 https: //github.com/ollama/ollama.gitcd ollama go generate ./... go build . ./ollama serve &amp;‍</pre><ul><li><strong>git clone</strong>: Clones the Ollama repository.</li><li><strong>go generate ./…</strong>: Generates code required for the project.</li><li><strong>go build .</strong>: Builds the Ollama binary.</li><li><strong>./ollama serve &amp;</strong>: Starts the Ollama server in the background.‍</li></ul><p><strong>Important configuration tips:</strong>‍</p><h4>3. Run DeepSeek-R1:1.5b</h4><p>With the server running, you can now execute the DeepSeek-R1:1.5b LLM:‍</p><pre>./ollama run deepseek-r1:1.5b</pre><p>Model configuration options:</p><pre>./ollama run deepseek-r1:1.5b --ram-limit 4GB --ctx-size 2048</pre><p>Performance monitoring:</p><pre>top -p $(pgrep ollama)‍</pre><h4>4. Creating an API endpoint</h4><p>To expose your local model as an API endpoint:‍</p><pre>pkg install nginx</pre><p>Create a simple proxy configuration:‍</p><pre>server {<br>    listen 8080;<br>    location /v1 {<br>        proxy_pass http://127.0.0.1:11434;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>    }<br>}</pre><p>Start the server:‍</p><pre>ginx -c /path/to/config</pre><p>Your API will be accessible at: <a href="http://your-device-ip:8080/v1/generate">http://your-device-ip:8080/v1/generate</a></p><h4>5. Security considerations</h4><ul><li>Use API keys for authentication</li><li>Implement rate limiting</li><li>Monitor system resources</li><li>Regular security updates:<br>‍</li></ul><pre>pkg upgrade<br>pkg update</pre><h3>Monitoring and maintenance</h3><h4>Resource usage tracking</h4><pre>#!/bin/bash<br>while true; do<br>   ps aux | grep ollama<br>   free -h<br>   sleep 5<br>done</pre><h4>Automatic recovery</h4><p>Create a simple watchdog script:‍</p><pre>#!/bin/bash<br>while true; do<br>   if ! pgrep -x &quot;ollama&quot; &gt; /dev/null; then<br>       echo &quot;Restarting Ollama...&quot;<br>       ./ollama serve &amp;<br>   fi<br>   sleep 60<br>done</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*rKGNzdE6JZXfYWfZIto58w.gif" /></figure><p>‍<strong>Model performance comparison across benchmarks</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*4TFTcYQDX6HwWZ_EZLyzdw.png" /></figure><p>‍‍<br>Model performance across benchmarks can vary and is subject to change due to updates, new evaluations, or changes in testing conditions. Always verify with the latest data.</p><h3>Benefits and applications</h3><p>Running DeepSeek-R1:1.5b locally on Android has several advantages:</p><h4>1. Low-cost API endpoint</h4><ul><li>Build a chatbot that processes user queries</li><li>Integrate with mobile apps</li><li>Create custom REST APIs</li><li>Implement webhooks for automation</li></ul><h4>2. Offline capabilities</h4><ul><li>Local processing</li><li>No internet dependency</li><li>Reduced latency</li><li>Better privacy</li></ul><h4>3. Data privacy</h4><ul><li>Complete data control</li><li>No external service dependency</li><li>Compliance friendly</li><li>Perfect for sensitive applications</li></ul><h4>4. Customization</h4><ul><li>Model fine-tuning options</li><li>Integration flexibility</li><li>Prompt engineering</li><li>Performance optimization</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fa4FyZ1nzbzg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Da4FyZ1nzbzg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fa4FyZ1nzbzg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2bd00da965e342e1df26d7f16418be56/href">https://medium.com/media/2bd00da965e342e1df26d7f16418be56/href</a></iframe><h3>Conclusion</h3><p>Deploying the DeepSeek-R1:1.5b Large Language Model (LLM) on your Android device using Termux transforms your smartphone into a powerful AI tool.</p><p>This setup enables advanced natural language processing tasks directly on your device, ensuring privacy, reducing latency, and eliminating reliance on cloud services.</p><p>By following this guide, you’ve transformed your Android device into a powerful tool capable of handling advanced reasoning tasks such as real-time code generation, interactive debugging, and context-aware query resolution. The integration with Termux provides a robust Linux environment, enabling seamless operation of the DeepSeek-R1:1.5b model to deliver sophisticated, on-device AI capabilities..</p><p>Extending this setup into a free API endpoint enhances its versatility, allowing integration with various applications and services-a capability particularly valuable in scenarios where real-time processing and data privacy are paramount.</p><p>As you continue to explore and optimize this configuration, monitor system performance and manage resources effectively to maintain optimal operation. Stay updated with the latest developments in LLM deployment on mobile platforms to leverage new features and improvements.</p><p>Embracing on-device AI not only enhances your Android device’s functionality but also contributes to the broader movement toward decentralized, open source and accessible artificial intelligence solutions.</p><p><em>Originally published at </em><a href="https://www.qed42.com/insights/how-to-run-deepseek-r1-1-5b-llm-on-android-using-termux"><em>https://www.qed42.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91e30a318459" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qed42-tech-insights/how-to-run-deepseek-r1-1-5b-llm-on-android-using-termux-91e30a318459">How to run DeepSeek-R1:1.5b LLM on android using Termux</a> was originally published in <a href="https://medium.com/qed42-tech-insights">QED42 Tech Insights</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SmolAgents vs. AGNO: A Brief Case Study on AI Agent Frameworks ⚡]]></title>
            <link>https://medium.com/@akshay.chame22/smolagents-vs-agno-a-brief-case-study-on-ai-agent-frameworks-d686ba6efebc?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/d686ba6efebc</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agno]]></category>
            <category><![CDATA[smol]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Tue, 04 Mar 2025 13:26:41 GMT</pubDate>
            <atom:updated>2025-03-04T13:26:41.488Z</atom:updated>
            <content:encoded><![CDATA[<p>AGNO Agents and SmolAgents are both powerful frameworks for building AI agents, but they cater to different use cases and workflows. While AGNO Agents focus on orchestrating multi-agent collaboration with structured interactions, SmolAgents prioritize lightweight, decentralized AI automation.</p><p>In this brief case study, we’ll compare their core architectures, strengths, and ideal applications to help you choose the right framework for your AI-driven projects. Whether you’re developing autonomous research assistants, workflow automation, or intelligent chatbots, understanding their differences will give you a clearer edge in AI agent development.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*V393c9UY2eV6fTjAVyL83g.png" /></figure><h4>What Are They?</h4><ul><li><strong>AGNO Agents</strong>: These are built using the Agno framework, which is great for making AI assistants that can handle tasks like searching the web, using knowledge bases, and working in teams. They work with text, images, audio, and video, and are known for being fast and efficient.</li><li><strong>SmolAgents</strong>: Made by Hugging Face, these are simpler and focus on agents that write and run Python code to use tools. They’re lightweight and secure, perfect for tasks where you need flexibility in how tools are used.</li></ul><h4>How Do They Compare?</h4><ul><li><strong>Ease of Use</strong>: Both are easy to start with, but SmolAgents might feel simpler with fewer lines of code. AGNO has more features ready to use, which can be helpful but might take more setup for complex tasks.</li><li><strong>Performance</strong>: AGNO claims to be 5000x faster than similar frameworks and uses less memory, making it great for big projects. SmolAgents are lightweight, but we don’t have direct speed comparisons.</li><li><strong>Tool Usage</strong>: AGNO uses predefined tools, so it’s straightforward, while SmolAgents let agents write code to call tools, giving more freedom but requiring more setup.</li><li><strong>Security</strong>: SmolAgents have secure environments for running code, which is crucial since they execute Python. AGNO doesn’t focus on this, as it may not run arbitrary code.</li><li><strong>Special Features</strong>: AGNO supports multi-agent teams and knowledge management out of the box. SmolAgents can do multi-agent setups, but you might need to build more yourself.</li></ul><h4>An Unexpected Detail</h4><p>Interestingly, SmolAgents, despite being new, can match the performance of agents using proprietary models with open-source ones, which could make them a cost-effective choice for some users (<a href="https://github.com/huggingface/smolagents">SmolAgents GitHub</a>).</p><p>Choose AGNO if you need a robust, feature-rich system, especially for multimodal tasks. Go for SmolAgents if you need agents that can dynamically write and run code, with a focus on simplicity and security.</p><h3>Survey Note</h3><p>AGNO agents and SmolAgents represent two distinct approaches to building AI agents, each with unique strengths and use cases. This comparison aims to provide a detailed analysis based on their features, performance, and applicability, drawing from available documentation and community insights as of March 3, 2025.</p><h4>Background and Definition</h4><p><strong>AGNO Agents</strong>:</p><p>AGNO agents are AI programs designed to act autonomously, leveraging tools, knowledge, and memory to solve problems. They are built using the Agno framework, an open-source, model-agnostic platform that supports multiple modalities, including text, image, audio, and video. The framework, previously known as Phidata, is noted for its exceptional performance, claiming to be 5000x faster than LangGraph and using 50x less memory (<a href="https://github.com/agno-agi/agno">Agno GitHub</a>). Agents in AGNO are categorized by levels of autonomy:</p><ul><li>Level 0: Basic inference tasks without tools.</li><li>Level 1: Use tools for autonomous task execution, such as web searches.</li><li>Level 2: Incorporate knowledge, combining memory and reasoning.</li><li>Level 3: Teams of specialized agents collaborating on complex workflows.</li></ul><p><strong>SmolAgents</strong>:</p><p>SmolAgents, developed by Hugging Face, is a lightweight library focusing on code execution agents. These agents write Python code to call tools and orchestrate other agents, with a core logic of approximately 1,000 lines of code (<a href="https://github.com/huggingface/smolagents">SmolAgents GitHub</a>). It supports secure code execution through sandboxed environments and is model-agnostic, working with various large language models. Launched in late 2024, it aims to simplify agent development, with features like Hub integrations for sharing tools (<a href="https://huggingface.co/blog/smolagents">Hugging Face Blog on SmolAgents</a>).</p><h4>Framework Features and Performance</h4><p><strong>AGNO Framework Features</strong>:</p><p>The Agno framework offers a comprehensive set of features:</p><ul><li><strong>Speed and Efficiency</strong>: Agent creation is reported to be ~2μs for instantiation, 5000x faster than LangGraph, and uses ~3.75Kib memory compared to LangGraph’s higher usage (<a href="https://www.agno.com/">Agno Official Website</a>).</li><li><strong>Modality Support</strong>: Native support for text, image, audio, and video, making it versatile for multimodal applications (<a href="https://docs.agno.com/introduction">Agno Documentation</a>).</li><li><strong>Tool Integration</strong>: Predefined tools like DuckDuckGo, YFinance, and PDF knowledge bases, simplifying tool usage (<a href="https://github.com/agno-agi/agno">Agno GitHub</a>).</li><li><strong>Knowledge Management</strong>: Uses vector databases for Agentic RAG or dynamic few-shot learning, with memory management for agent sessions (<a href="https://docs.agno.com/get-started/agents">Agno Documentation</a>).</li><li><strong>Multi-Agent Collaboration</strong>: Supports teams of specialized agents, ideal for complex workflows like customer support or research (<a href="https://medium.com/@sudarshan-koirala/create-your-first-agent-with-agno-previously-phidata-27513eddc27f">Medium Article by Sudarshan Koirala</a>).</li><li><strong>Monitoring</strong>: Real-time tracking on<a href="https://app.agno.com/"> agno.com</a> for agent performance (<a href="https://aiagentsdirectory.com/agent/agno">AI Agents Directory</a>).</li></ul><p><strong>SmolAgents Framework Features</strong>:</p><p>SmolAgents focus on simplicity and code execution:</p><ul><li><strong>Lightweight Design</strong>: Core logic in ~1,000 lines, making it easy to understand and modify (<a href="https://aiagentsdirectory.com/agent/smolagents">SmolAgents Review</a>).</li><li><strong>Code Execution Agents</strong>: Agents generate Python code to call tools, offering flexibility in tool usage, with secure execution via sandboxed environments (<a href="https://www.nb-data.com/p/mastering-smolagents-building-ai">Mastering SmolAgents</a>).</li><li><strong>Model-Agnostic</strong>: Supports Hugging Face, OpenAI, Anthropic, and local models like Ollama, with no vendor lock-in (<a href="https://github.com/huggingface/smolagents">SmolAgents GitHub</a>).</li><li><strong>Modality Support</strong>: Claims support for text, vision, video, and audio, though primarily focused on text-based code agents (<a href="https://medium.com/@frankmorales_91352/building-ai-agents-with-llama-2-and-smol-agents-a-code-driven-tutorial-d507dcd01841">Building AI Agents with Llama 2 and Smol Agents</a>).</li><li><strong>Hub Integrations</strong>: Allows sharing and pulling tools from Hugging Face Hub, enhancing ecosystem growth (<a href="https://smolagents.org/">SmolAgents Website</a>).</li><li><strong>Performance</strong>: In benchmarks, open-source models using SmolAgents have matched proprietary model performance, though specific speed and memory metrics are less emphasized (<a href="https://www.analyticsvidhya.com/blog/2025/01/smolagents/">Analytics Vidhya Blog</a>).</li></ul><h4>Capabilities and Use Cases</h4><p><strong>AGNO Agents Capabilities</strong>:</p><p>AGNO agents operate across various domains:</p><ul><li><strong>Customer Support</strong>: AI-powered agents available 24/7, understanding queries and resolving issues (<a href="https://bestaiagents.ai/agent/agno">Best AI Agents</a>).</li><li><strong>Travel Assistance</strong>: Multimodal agents for trip planning, booking, and real-time updates (<a href="https://medium.com/@sahin.samia/build-your-own-deep-research-agent-using-agno-formerly-phidata-a6c9ca96f22b">Medium Article by Sahin Ahmed</a>).</li><li><strong>Coding Assistance</strong>: Analyze codebases, suggest optimizations, and debug, enhancing development efficiency (<a href="https://dev.to/mehmetakar/building-ai-agents-with-agno-phidata-tutorial-4ilh">Dev.to Blog Post</a>).<br> Their predefined tools and knowledge management make them suitable for structured, feature-rich applications.</li></ul><p><strong>SmolAgents Capabilities</strong>:</p><p>SmolAgents are ideal for scenarios requiring dynamic code execution:</p><ul><li><strong>Research and Development</strong>: Agents that write code to call APIs, analyze data, or automate workflows (<a href="https://huggingface.co/blog/smolagents">Hugging Face SmolAgents Blog</a>).</li><li><strong>Custom Tool Integration</strong>: Developers can define any tool as a Python function, offering flexibility for niche use cases (<a href="https://www.analyticsvidhya.com/blog/2025/01/smolagents/">SmolAgents Demo</a>).</li><li><strong>Multi-Agent Hierarchies</strong>: Agents can call other agents, creating networks for complex tasks, though setup may require more manual work (<a href="https://medium.com/@nandinilreddy/huggingface-smol-agents-ee8ef83ea9eb">Medium Article by Nandini Lokesh Reddy</a>).<br> Their focus on code execution makes them suitable for environments where security and flexibility are paramount.</li></ul><h4>Example Code and Implementation</h4><p><strong>AGNO Example Code</strong>:</p><p>A basic AGNO agent with tools:</p><pre>from agno.agent import Agent<br>from agno.models.openai import OpenAIChat<br>from agno.tools.duckduckgo import DuckDuckGoTools<br>agent = Agent(model=OpenAIChat(id=&quot;gpt-4o&quot;), description=&quot;You are an enthusiastic news reporter!&quot;, tools=[DuckDuckGoTools()], show_tool_calls=True, verbose=True)<br>agent.print_response(&quot;Tell me about a breaking news story from New York.&quot;, stream=True)</pre><p>For knowledge management:</p><pre>from agno.knowledge.pdf_url import PDFUrlKnowledgeBase<br>from agno.vectordb.lancedb import LanceDb, SearchType<br>from agno.embedder.openai import OpenAIEmbedder<br>agent = Agent(model=OpenAIChat(id=&quot;gpt-4o&quot;), description=&quot;You are a Thai cuisine expert!&quot;, knowledge=PDFUrlKnowledgeBase(urls=[&quot;https://example.com/thai_recipes.pdf&quot;], vector_db=LanceDb(…)), tools=[DuckDuckGoTools()], show_tool_calls=True, verbose=True)<br>agent.knowledge.load()<br>agent.print_response(&quot;How do I make chicken and galangal in coconut milk soup&quot;, stream=True)</pre><p>Multi-agent team:</p><pre>web_agent = Agent(name=&quot;Web Agent&quot;, role=&quot;Search the web&quot;, model=OpenAIChat(id=&quot;gpt-4o&quot;), tools=[DuckDuckGoTools()], instructions=&quot;Always include sources&quot;, show_tool_calls=True, verbose=True)<br>finance_agent = Agent(name=&quot;Finance Agent&quot;, role=&quot;Get financial data&quot;, model=OpenAIChat(id=&quot;gpt-4o&quot;), tools=[YFinanceTools()], instructions=&quot;Use tables&quot;, show_tool_calls=True, verbose=True)<br>agent_team = Agent(team=[web_agent, finance_agent], model=OpenAIChat(id=&quot;gpt-4o&quot;), instructions=[&quot;Always include sources&quot;, &quot;Use tables&quot;], show_tool_calls=True, verbose=True)<br>agent_team.print_response(&quot;What&#39;s the market outlook for AI semiconductor companies?&quot;, stream=True)</pre><p><strong>SmolAgents Example Code</strong>:</p><p><strong>A basic code agent:</strong></p><pre>from smolagents import CodeAgent, HfApiModel<br>agent = CodeAgent(model=HfApiModel(&quot;mistralai/Mistral-7B-Instruct-v0.1&quot;))<br>agent.run(&quot;What&#39;s the weather like in Paris?&quot;)</pre><p>With a custom tool:</p><pre>from typing import Optional<br>from smolagents import CodeAgent, HfApiModel, tool<br>@tool<br>def get_weather(city: str) -&gt; str:<br># Implementation to get weather<br>pass<br>agent = CodeAgent(model=HfApiModel(&quot;mistralai/Mistral-7B-Instruct-v0.1&quot;), tools=[get_weather])<br>agent.run(&quot;What&#39;s the weather like in Paris?&quot;)<br>Multi-agent setup:<br>from smolagents import CodeAgent, HfApiModel, tool<br>@tool<br>def ask_other_agent(question: str) -&gt; str:<br>other_agent = CodeAgent(model=HfApiModel(&quot;model_name&quot;))<br>return other_agent.run(question)<br>main_agent = CodeAgent(model=HfApiModel(&quot;main_model&quot;), tools=[ask_other_agent])<br>main_agent.run(&quot;Some task requiring another agent&quot;)</pre><h4>Comparative Analysis</h4><p>The following table summarizes the key differences and similarities:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*ulmFL_BFWJzylIiGOijzWw.png" /></figure><h4>Use Case Recommendations</h4><p><strong>Choose AGNO Agents If:</strong></p><ul><li><strong>You need a robust, feature-rich framework for multimodal tasks.</strong></li><li><strong>Performance and efficiency are critical, especially for large-scale applications.</strong></li><li><strong>You want out-of-the-box tools and knowledge management, like in customer support or travel assistance.</strong></li></ul><p><strong>Choose SmolAgents If:</strong></p><ul><li><strong>You need agents that can dynamically write and execute code, such as for research or custom tool integration.</strong></li><li><strong>Security is a priority, especially for code execution environments.</strong></li><li><strong>Simplicity and flexibility in tool usage are more important than predefined features.</strong></li></ul><h4>Production Use Case Recommendations</h4><p><strong>Choose AGNO Agents If</strong>:</p><ul><li>The project needs high performance and efficiency, critical for production environments handling large volumes, such as customer support chatbots or travel assistants.</li><li>Multimodal support is necessary, ensuring the agent can handle various media types in production.</li><li>Tasks are well-defined and can be handled with predefined tools, reducing the risk of errors in production.</li><li>Reliability and scalability are top priorities, with features like real-time monitoring enhancing production uptime.</li></ul><p><strong>Choose SmolAgents If</strong>:</p><ul><li>The project requires agents to dynamically write and execute code, such as automating research or custom API calls, with security being a production priority.</li><li>Flexibility in tool usage is preferred, allowing adaptation to changing production needs, though this may increase maintenance.</li><li>Simplicity and cost-effectiveness are valued, especially with open-source models matching proprietary performance, potentially reducing production costs.</li></ul><h4>Maturity and Stability for Production</h4><p>AGNO, with over 19,600 GitHub stars and active development, is more mature and has been tested in various production scenarios, such as customer support and travel assistance, as noted in their documentation (<a href="https://docs.agno.com/introduction">AGNO Documentation</a>). Its performance metrics and monitoring capabilities make it a safer choice for mission-critical production projects.</p><p>SmolAgents, launched in late 2024, are relatively new, and while backed by Hugging Face, their production use cases are less established. Their focus on code execution and security is promising, but the lack of specific performance metrics and monitoring tools may pose challenges for production deployment, especially at scale (<a href="https://github.com/huggingface/smolagents">SmolAgents GitHub</a>).</p><h4>Cost and Maintenance Considerations</h4><p>Both frameworks are open-source, reducing direct costs, but production deployment may involve costs for model providers or infrastructure. AGNO’s efficiency (5000x faster, 50x less memory) suggests lower operational costs at scale, while SmolAgents’ lightweight design may also be cost-effective, especially with open-source models (<a href="https://www.analyticsvidhya.com/blog/2025/01/smolagents/">Analytics Vidhya Blog</a>). Maintenance may be higher for SmolAgents due to custom tool implementations, whereas AGNO’s predefined features could simplify production upkeep.</p><h3>Key Citations</h3><blockquote><a href="https://github.com/agno-agi/agno">Build Multimodal AI Agents with memory, knowledge and tools GitHub</a></blockquote><blockquote><a href="https://www.agno.com/">Pure AI agents model agnostic, blazing fast, future proof Agno Website</a></blockquote><blockquote><a href="https://docs.agno.com/introduction">Introduction to Agno Official Documentation</a></blockquote><blockquote><a href="https://aiagentsdirectory.com/agent/agno">Agno Review and Alternatives AI Agents Directory</a></blockquote><blockquote><a href="https://github.com/huggingface/smolagents">SmolAgents GitHub barebones library for agents</a></blockquote><blockquote><a href="https://huggingface.co/blog/smolagents">Introducing smolagents simple agents that write actions in code Hugging Face Blog</a></blockquote><blockquote><a href="https://aiagentsdirectory.com/agent/smolagents">SmolAgents Review and Alternatives AI Agents Directory</a></blockquote><blockquote><a href="https://www.nb-data.com/p/mastering-smolagents-building-ai">Mastering SmolAgents Building AI Agents with Tools</a></blockquote><blockquote><a href="https://medium.com/@frankmorales_91352/building-ai-agents-with-llama-2-and-smol-agents-a-code-driven-tutorial-d507dcd01841">Building AI Agents with Llama 2 and Smol Agents Code-Driven Tutorial Medium</a></blockquote><blockquote><a href="https://www.analyticsvidhya.com/blog/2025/01/smolagents/">SmolAgents by Hugging Face Build AI Agents in Less than 30 Lines Analytics Vidhya</a></blockquote><blockquote><a href="https://smolagents.org/">SmolAgents Ecosystem Growth and Capabilities Website</a></blockquote><blockquote><a href="https://medium.com/@sudarshan-koirala/create-your-first-agent-with-agno-previously-phidata-27513eddc27f">Create Your First Agent with Agno previously Phidata Medium Article</a></blockquote><blockquote><a href="https://medium.com/@sahin.samia/build-your-own-deep-research-agent-using-agno-formerly-phidata-a6c9ca96f22b">Build your own Deep Research Agent Using AGNO formerly Phidata Medium Article</a></blockquote><blockquote><a href="https://dev.to/mehmetakar/building-ai-agents-with-agno-phidata-tutorial-4ilh">Building AI Agents with Agno-Phidata Github 18.5k Stars DEV Community</a></blockquote><blockquote><a href="https://bestaiagents.ai/agent/agno">Agno Phidata Framework AI Agent Builder Best AI Agents</a></blockquote><blockquote><a href="https://docs.agno.com/get-started/agents">Get Started with Agents Agno Documentation</a></blockquote><blockquote><a href="https://medium.com/@nandinilreddy/huggingface-smol-agents-ee8ef83ea9eb">SmolAgents by Hugging Face Enhancing Human Workflows in 2025 Medium</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d686ba6efebc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why AI Companies Should Use Odoo for Business Management]]></title>
            <link>https://medium.com/@akshay.chame22/why-ai-companies-should-use-odoo-for-business-management-cf2f7df73014?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf2f7df73014</guid>
            <category><![CDATA[crm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[hr]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 08:47:21 GMT</pubDate>
            <atom:updated>2025-02-28T08:47:21.757Z</atom:updated>
            <content:encoded><![CDATA[<p>Artificial Intelligence (AI) companies operate in a fast-paced, dynamic environment that requires seamless collaboration, efficient resource allocation, and real-time data insights. Managing such an ecosystem demands an integrated, flexible, and scalable enterprise resource planning (ERP) system. This is where Odoo, an open-source ERP platform, proves to be a game-changer.</p><p>Odoo consolidates core business operations — including customer relationship management (CRM), project management, HR, sales, inventory, and finance — into a single, unified system. AI-driven organizations can benefit immensely from Odoo’s adaptability, automation, and cost-effectiveness. Let’s explore why Odoo is the perfect fit for AI companies and how it can streamline their workflows.</p><h3>1. Integrated Business Management</h3><h3>Unified Platform</h3><p>One of Odoo’s strongest advantages is its ability to unify various business functions. AI companies often struggle with siloed data spread across multiple software platforms, making collaboration difficult. Odoo brings everything into one place, enhancing efficiency and communication.</p><p><strong>Example:</strong> An AI company working on multiple machine learning projects can use Odoo’s <strong>Project Management</strong> module to track development timelines, the <strong>CRM</strong> module to manage client interactions, and the <strong>HR</strong> module to allocate resources effectively — all in one dashboard.</p><h3>Seamless Data Flow</h3><p>Manual data transfers between teams increase the risk of errors and inefficiencies. With Odoo’s centralized database, information flows smoothly across departments, ensuring consistency and reducing redundant work. Whether it’s syncing AI project progress with sales forecasts or tracking expenses against R&amp;D budgets, Odoo keeps everything aligned.</p><h3>2. Open-Source Flexibility &amp; Customization</h3><h3>Open-Source Benefits</h3><p>Odoo is an open-source ERP solution, giving AI companies complete control over their data and software environment. Unlike proprietary ERPs, which lock users into rigid systems, Odoo’s open-source nature allows for extensive customization and integration without vendor-imposed restrictions.</p><h3>Customizable for AI-Specific Needs</h3><p>AI companies require unique workflows and integrations that traditional ERPs often fail to provide. With Odoo’s modular structure, businesses can customize modules to include AI-based analytics, automation, and reporting features tailored to their operations.</p><h3>API &amp; Connector Integration</h3><p>AI teams rely on various tools like TensorFlow, PyTorch, GitHub, and Jira. Odoo’s robust API framework enables seamless integration with these tools, ensuring a smooth workflow from development to deployment.</p><p><strong>Example:</strong> An AI firm could integrate Odoo’s CRM with its AI-based sales prediction model, automatically scoring leads based on potential conversion rates and optimizing the sales pipeline.</p><h3>3. Cost-Effective Scaling</h3><h3>No Vendor Lock-In</h3><p>Many AI startups face budget constraints and can’t afford expensive, inflexible ERP systems. Odoo, with its <strong>Community Edition</strong> (which is free to use), offers a scalable solution without vendor lock-in. The platform’s PostgreSQL database ensures full data ownership, eliminating concerns about proprietary restrictions.</p><h3>Pay-As-You-Grow Model</h3><p>Companies can start with essential modules — such as CRM, Project Management, and HR — and expand to advanced functionalities like IoT integration or predictive analytics as they scale. This modular approach ensures that businesses only pay for what they need, reducing overhead costs.</p><h3>4. Enhanced Collaboration &amp; Productivity</h3><h3>Project Management for AI Development</h3><p>AI development is often structured in sprints, requiring constant tracking of experiments, feature iterations, and deployment timelines. Odoo’s <strong>Project Management</strong> module helps AI teams assign tasks, monitor progress using Gantt charts and Kanban boards, and streamline workflows.</p><h3>Embedded Communication</h3><p>Real-time communication is crucial for debugging AI models, discussing client requirements, or managing product updates. Odoo’s <strong>Discuss</strong> module allows teams to collaborate instantly without relying on external messaging apps.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fp3E3omCf51zECiCFk7s_A.gif" /></figure><h3>5. Data-Driven Decision-Making</h3><h3>Advanced Analytics &amp; Reporting</h3><p>Odoo provides customizable dashboards and reporting tools, enabling AI companies to analyze performance metrics, sales trends, resource allocation, and more.</p><p><strong>Example:</strong> An AI startup can generate automated reports on model accuracy trends, training data performance, and computational resource usage to optimize future experiments.</p><h3>AI-Driven Workflow Optimization</h3><p>Odoo can be enhanced with AI/ML models to streamline decision-making. For instance, AI-driven demand forecasting can help optimize resource allocation, while sentiment analysis in CRM can improve customer interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5UQoztCQ_y_Vr95XeAkvwA.png" /></figure><h3>6. Client &amp; Partner Management</h3><h3>AI-Specific CRM Capabilities</h3><p>AI companies need an effective way to manage sales pipelines, track customer interactions, and nurture leads. Odoo’s CRM module allows businesses to automate follow-ups, schedule product demos, and analyze client behavior to drive sales.</p><h3>Helpdesk &amp; Support Integration</h3><p>For AI companies offering SaaS-based AI services, customer support is crucial. Odoo’s <strong>Helpdesk</strong> module allows teams to manage support tickets efficiently. Additionally, integrations with Jira enable smooth issue escalation to technical teams.</p><h3>7. Security &amp; Compliance</h3><h3>Role-Based Access Control</h3><p>AI companies often deal with sensitive data, requiring strict access controls. Odoo’s <strong>role-based access system</strong> ensures that only authorized personnel can access critical AI models, datasets, and customer information.</p><h3>Compliance with Regulations</h3><p>Odoo provides configurable security settings to help businesses comply with regulations like <strong>GDPR, CCPA</strong>, and <strong>industry-specific standards</strong>. Customizable audit logs and access tracking enhance data security.</p><h3>8. Automation &amp; Efficiency</h3><h3>Workflow Automation</h3><p>Repetitive tasks — such as generating invoices for AI services, sending project update emails, or scheduling model training — can be automated with Odoo. This reduces manual effort and increases efficiency.</p><h3>IoT &amp; AI Integration</h3><p>Odoo supports IoT integration, making it ideal for AI companies involved in <strong>AI-powered hardware</strong> or <strong>edge computing</strong>. IoT sensors can feed real-time data into machine learning models, enhancing automation and predictive insights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ybf12FylOdu6qBfToaMpyw.png" /></figure><h3>Why AI Companies Choose Odoo</h3><h3>Example Use Case</h3><p>Consider an AI startup specializing in predictive analytics. Using Odoo:</p><ul><li>The CRM module manages <strong>sales pipelines and lead tracking</strong>.</li><li>The <strong>Project Management</strong> module helps track AI model development cycles.</li><li><strong>IoT integration</strong> allows real-time data collection from edge devices.</li><li><strong>GitHub and Jira integration</strong> streamline software development workflows.</li></ul><h3>Competitive Edge Over Other ERPs</h3><p>Unlike traditional ERPs, which are often rigid and costly, Odoo’s modular architecture is highly adaptable. AI companies, known for their iterative development cycles, benefit from its flexibility to support <strong>rapid prototyping, agile sprints, and scalable deployments</strong>.</p><h3>Final Thoughts</h3><p>Odoo is a powerful and cost-effective solution for AI-driven companies looking to optimize their operations, improve collaboration, and make data-driven decisions. Whether you’re a startup experimenting with AI models or an established firm offering AI solutions, Odoo provides the tools needed to streamline workflows, enhance productivity, and scale efficiently.</p><p>By leveraging Odoo’s open-source capabilities, AI companies can customize, integrate, and expand their business management solutions while maintaining full control over their data and software environment. With its flexibility and automation, Odoo enables AI companies to focus on what they do best — <strong>innovating and building the future of artificial intelligence.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf2f7df73014" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing PaliGemma 2: Google’s Next-Gen Vision-Language Model]]></title>
            <link>https://medium.com/@akshay.chame22/introducing-paligemma-2-googles-next-gen-vision-language-model-61bafa446de5?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/61bafa446de5</guid>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Fri, 21 Feb 2025 10:26:25 GMT</pubDate>
            <atom:updated>2025-02-21T10:26:25.488Z</atom:updated>
            <content:encoded><![CDATA[<p>Google has officially unveiled <strong>PaliGemma 2</strong>, an advanced iteration of its popular vision-language model, <strong>PaliGemma</strong>. This new release brings significant improvements in both flexibility and performance, thanks to the integration of Google’s latest <strong>Gemma 2</strong> language models and the powerful <strong>SigLIP</strong> vision encoder.</p><p>Let’s dive into the details of <strong>PaliGemma 2</strong>, its architecture, capabilities, and how it advances the field of multimodal AI.</p><h3>PaliGemma 2: The Evolution of a Powerful Model</h3><p>PaliGemma 2 is designed to handle <strong>vision-language tasks</strong> with improved efficiency and accuracy. While its predecessor, PaliGemma, was only available in a <strong>3B parameter variant</strong>, PaliGemma 2 introduces <strong>three different sizes: 3B, 10B, and 28B</strong>. Each variant supports multiple input resolutions — <strong>224x224, 448x448, and 896x896</strong>, allowing users to choose a balance between model complexity and computational efficiency.</p><p>With this expansion in model variants, PaliGemma 2 provides more <strong>fine-tuning flexibility</strong> for downstream tasks, making it a robust choice for researchers and developers working on <strong>image captioning, visual question answering (VQA), object detection, and more.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LLXTfcL5Reeer0ao.png" /></figure><h3>Architecture: The Power of SigLIP and Gemma 2</h3><p>PaliGemma 2 connects two powerful AI components:</p><ul><li><strong>SigLIP</strong> (Sigmoid-activated Language-Image Pretraining) — A state-of-the-art vision encoder that enhances visual understanding.</li><li><strong>Gemma 2</strong> — The latest generation of Google’s language model, bringing improved text generation capabilities.</li></ul><p>The new architecture is built upon <strong>Gemma 2’s 2B, 9B, and 27B</strong> language models, leading to <strong>PaliGemma 2’s 3B, 10B, and 28B variants</strong> when combined with the SigLIP image encoder. This integration enables <strong>high-quality image-text understanding</strong>, making PaliGemma 2 suitable for <strong>advanced multimodal AI applications</strong>.</p><h3>Pre-Trained Models &amp; Fine-Tuned Variants</h3><p>PaliGemma 2 comes with <strong>pre-trained (pt) models</strong> in three sizes — 3B, 10B, and 28B. Additionally, Google has introduced <strong>fine-tuned models</strong> trained on the <strong>DOCCI dataset</strong>, which is specifically designed for <strong>high-quality image captioning</strong>. These fine-tuned models are available in the <strong>3B and 10B variants</strong>, with an input resolution of <strong>448x448</strong>.</p><p>Google has also released <strong>open-source repositories, fine-tuning scripts, and a demo for VQA (Visual Question Answering) on the VQAv2 dataset</strong>, making it easier for developers to experiment with and deploy PaliGemma 2 in real-world applications.</p><h3>PaliGemma 2 Capabilities &amp; Pre-Training Data</h3><p>One of the standout aspects of PaliGemma 2 is its pre-training on a <strong>diverse multimodal dataset</strong>, which allows it to adapt well to various downstream tasks with minimal fine-tuning. The dataset includes:</p><ol><li><strong>WebLI</strong> — A massive multilingual image-text dataset sourced from the web, enabling strong visual and semantic understanding.</li><li><strong>CC3M-35L</strong> — A curated set of English image-alt_text pairs from webpages, translated into <strong>34 additional languages</strong> via Google Cloud Translation API.</li><li><strong>Visual Question Generation with Question Answering Validation (VQ2A)</strong> — A high-quality dataset designed for robust visual question-answering.</li><li><strong>OpenImages</strong> — A dataset enriched with detection and object-aware questions and answers.</li><li><strong>WIT (Wikipedia Image-Text dataset)</strong> — A collection of images and text sourced from Wikipedia, enhancing <strong>contextual and factual understanding</strong>.</li></ol><p>This extensive dataset provides PaliGemma 2 with <strong>enhanced visual-language understanding</strong>, including <strong>object localization, multilingual capabilities, and text rendering in images</strong>.</p><p><strong>Examples Outputs :</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VvW6ZqE8Q6SYai7m" /><figcaption>Segment Detection</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*61hbq8iOpE_mZzD8" /><figcaption>Image to Text</figcaption></figure><h3>Usage tips</h3><ul><li>PaliGemma is not meant for conversational use, and it works best when fine-tuning to a specific use case. Some downstream tasks on which PaliGemma can be fine-tuned include image captioning, visual question answering (VQA), object detection, referring expression segmentation and document understanding.</li><li>One can use PaliGemmaProcessor to prepare images, text and optional labels for the model. When fine-tuning a PaliGemma model, the suffix argument can be passed to the processor which creates the labels for the model:</li></ul><pre>prompt = &quot;What is on the flower?&quot;<br>answer = &quot;a bee&quot;<br>inputs = processor(images=raw_image, text=prompt, suffix=answer, return_tensors=&quot;pt&quot;)</pre><p><strong>Text Recognition in Images</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*SsgQcLl4Q4ue3Q7_lqEzkw.png" /></figure><h3>Fine-Tuned Performance: How PaliGemma 2 Compares</h3><p>To highlight its improvements, Google benchmarked <strong>PaliGemma 2 fine-tuned on the DOCCI dataset</strong> against other models. Below are key results from <strong>technical report:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/776/0*9vqoiyQ5ciUpjM8n" /></figure><h3>Key Takeaways from the Results:</h3><ul><li><strong>Lower NES Score</strong>: PaliGemma 2’s fine-tuned variants achieve <strong>lower NES scores</strong>, indicating <strong>more accurate and nuanced captioning</strong>.</li><li><strong>Competitive Performance</strong>: Even at <strong>3B</strong>, PaliGemma 2 outperforms larger models like <strong>PaLI-5B</strong> in certain tasks.</li><li><strong>Scalability</strong>: The <strong>10B model</strong> delivers <strong>state-of-the-art performance</strong>, making it a powerful tool for high-quality captioning and vision-language tasks.</li></ul><h3>How to Use PaliGemma 2 with Transformers</h3><p>Google has provided <strong>Hugging Face Transformers integration</strong> for seamless usage of PaliGemma 2. Developers can load the models, fine-tune them for specific tasks, and deploy them efficiently.</p><p>You can use PaliGemma 2 mix models using transformers.</p><p><a href="https://huggingface.co/spaces/Akshayram1/paligemma_2_demo_image_text_to_text"><strong>Hugging Face Link</strong></a></p><pre>from transformers import (<br>    PaliGemmaProcessor,<br>    PaliGemmaForConditionalGeneration,<br>)<br>from transformers.image_utils import load_image<br>import torch<br><br>model_id = &quot;google/paligemma2-10b-mix-224&quot;<br><br>url = &quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg&quot;<br>image = load_image(url)<br><br># Load the model and the processor<br>model = PaliGemmaForConditionalGeneration.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map=&quot;auto&quot;).eval()<br>processor = PaliGemmaProcessor.from_pretrained(model_id)<br><br># Prepare the inputs<br>prompt = &quot;describe en&quot;<br>model_inputs = processor(text=prompt, images=image, return_tensors=&quot;pt&quot;).to(torch.bfloat16).to(model.device)<br>input_len = model_inputs[&quot;input_ids&quot;].shape[-1]<br><br># Infer and postprocess the inference outputs<br>with torch.inference_mode():<br>    generation = model.generate(**model_inputs, max_new_tokens=100, do_sample=False)<br>    generation = generation[0][input_len:]<br>    decoded = processor.decode(generation, skip_special_tokens=True)<br>    print(decoded)</pre><h3>Fine-Tuning PaliGemma 2</h3><p>Fine-tuning PaliGemma 2 is straightforward using Google’s provided scripts. Developers can adapt the model for tasks such as <strong>visual question answering, object detection, and image captioning</strong>. The <strong>DOCCI fine-tuned models</strong> demonstrate how PaliGemma 2 can produce <strong>detailed and informative captions</strong>, capturing spatial relationships and world knowledge effectively.</p><p><a href="https://colab.research.google.com/drive/11Xh-1WevRfx0wSmk2VQdkdnXdpSnSmCr"><strong>colab link</strong></a></p><h3>Final Thoughts</h3><p>PaliGemma 2 represents a major leap in <strong>vision-language AI</strong>, providing a <strong>scalable, high-performing, and flexible</strong> model for multimodal applications. With its integration of <strong>SigLIP and Gemma 2</strong>, expanded <strong>parameter sizes</strong>, and <strong>improved fine-tuned performance</strong>, PaliGemma 2 is poised to become a leading choice for <strong>researchers, developers, and AI enthusiasts</strong>.</p><p>With open access to <strong>pre-trained models, fine-tuning scripts, and demos</strong>, the possibilities with PaliGemma 2 are endless. Whether you’re working on <strong>AI-generated captions, VQA, or object recognition</strong>, this model offers an exciting new avenue for innovation in <strong>multimodal AI</strong>.</p><p>PaliGemma 2 is here — <strong>let’s see what the AI community can build with it!</strong></p><p>Refrence :</p><ul><li><a href="https://huggingface.co/blog/paligemma">Blog: PaliGemma — Google’s Cutting-Edge Open Vision Language Model</a></li><li><a href="https://huggingface.co/blog/paligemma2">Blog: Welcome PaliGemma 2 — New vision language models by Google</a></li><li><a href="https://huggingface.co/papers/2412.03555">PaliGemma 2 Technical Report</a></li><li><a href="https://github.com/merveenoyan/smol-vision/blob/main/Fine_tune_PaliGemma.ipynb">PaliGemma Fine-tuning Tutorial</a></li><li><a href="https://huggingface.co/collections/google/paligemma-2-mix-67ac6a251aaf3ee73679dcc4">Release Collection for PaliGemma 2 Mix Models</a></li><li><a href="https://huggingface.co/collections/google/paligemma-2-release-67500e1e1dbfdd4dee27ba48">Release Collection for PaliGemma 2</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61bafa446de5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[️ Lumina-Image 2.0: Redefining the Landscape of -Generated Imagery]]></title>
            <link>https://medium.com/@akshay.chame22/%EF%B8%8F-lumina-image-2-0-redefining-the-landscape-of-generated-imagery-54d4a3782d86?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/54d4a3782d86</guid>
            <category><![CDATA[gen-ai-tools]]></category>
            <category><![CDATA[image]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Tue, 04 Feb 2025 10:18:21 GMT</pubDate>
            <atom:updated>2025-02-04T10:18:21.441Z</atom:updated>
            <content:encoded><![CDATA[<h3>🚀 Introduction</h3><p>In the ever-evolving 🌍 of 🤖-driven 🖼️ generation, <strong>Lumina-Image 2.0</strong> emerges as a groundbreaking advancement. Developed by the 🇨🇳 tech community, this model balances ⚡, 🎯, and 🔓, positioning itself as a formidable contender in the generative 🤖 space. With a focus on 🎨-quality 🖼️ synthesis, robust 🏆🗣️ support, and an open-source approach, Lumina-Image 2.0 is set to empower 🧑‍🔬, 👨‍💻, and 🎨 professionals alike.</p><h3>🌟 Key Features</h3><h4>1. ⚡ Yet Powerful 2B Parameter Model</h4><p>Lumina-Image 2.0 operates on a <strong>2.6B parameter</strong> model, optimizing 🖥️ efficiency without compromising 🎯. Unlike bulkier models that demand significant ⚙️ resources, this model strikes a ⚖️, making it suitable for diverse applications ranging from 🎨 design to 🎓 research.</p><h4>2. 🔓 and Transparent Development</h4><p>The model is released under the <strong>📝 Apache 2.0 License</strong>, ensuring full 🔎, ♻️, and 🆓. This licensing model encourages 💡 by allowing 🔄 and 🔗 into various workflows.</p><h4>3. 🎛️ System Prompt Support for Enhanced Interaction</h4><p>One of the defining features of Lumina-Image 2.0 is its <strong>support for system prompts</strong>. This functionality enhances 🎨, enabling users to 🎚️ their requests for more 📜 accurate and visually compelling outputs.</p><h4>4. 🌍🗣️ Text Encoder for Broader Usability</h4><p>A <strong>🌍🗣️ text encoder</strong> allows Lumina-Image 2.0 to process diverse linguistic inputs effectively. This makes it a valuable tool for 🌎 content creators, 🧑‍🔬, and 🏢 working across multiple languages.</p><h4>5. 🖼️-Resolution Output and ⚙️ Technology</h4><p>The model supports an <strong>impressive resolution of 1024</strong> 📏, ensuring crisp and detailed 🖼️ outputs. Additionally, <strong>Flux VAE with a 16-channel system</strong> enhances its generative capabilities, making it a versatile choice for 🎨-fidelity 🖼️ generation.</p><h3>📊 Performance Benchmark</h3><p>Lumina-Image 2.0 excels across multiple 📏 metrics when compared to other leading models. Based on recent 🏆 results:</p><ul><li><strong>📊 GenEval Score</strong>: Achieves an <strong>overall score of 0.73</strong>, outperforming many competing models in tasks like 🔢 and 🎨 attribution.</li><li><strong>📈 DPG Evaluation</strong>: Secures top rankings with an <strong>overall score of 90.20</strong>, excelling in 🏷️ recognition and 🎭 precision.</li><li><strong>🖼️ T2I-CompBench</strong>: Demonstrates superior <strong>🎨 (0.8211), 📐 (0.6028), and 🏞️ (0.7417) accuracy</strong>, proving its capability in maintaining 🎯 details.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eDm7z5w_8eA--inK.png" /></figure><p>These 📏 position Lumina-Image 2.0 as one of the most <strong>⚡ and 🎯</strong> 🖼️ generation models available today.</p><h3>🎮 Model Zoo</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*NHYBDYphuMv256UngPeqbA.png" /></figure><p>✅ <a href="https://huggingface.co/Alpha-VLLM/Lumina-Image-2.0">hugging face link</a></p><h3>💻 Finetuning Code</h3><h4>1. Create a conda environment and install PyTorch</h4><pre>conda create -n Lumina2 -y<br>conda activate Lumina2<br>conda install python=3.11 pytorch==2.1.0 torchvision==0.16.0 torchaudio==2.1.0 pytorch-cuda=12.1 -c pytorch -c nvidia -y</pre><h4>2. Install dependencies</h4><pre>pip install -r requirements.txt</pre><h4>3. Install flash-attn</h4><pre>pip install flash-attn --no-build-isolation</pre><h4>4. Prepare data</h4><p>You can place the links to your data files in ./configs/data.yaml. Your image-text pair training data format should adhere to the following:</p><pre>{<br>    &quot;image_path&quot;: &quot;path/to/your/image&quot;,<br>    &quot;prompt&quot;: &quot;a description of the image&quot;<br>}</pre><h4>5. Start finetuning</h4><pre>bash scripts/run_1024_finetune.sh</pre><h3>🔗 Resources and Accessibility</h3><p>For those interested in exploring Lumina-Image 2.0, the following resources are available:</p><ul><li><strong>🎮 Live Demo</strong>: Test and interact with the model on Hugging Face Spaces.</li><li><strong>📥 Model and Weights</strong>: Access the official 📦 on <strong>Hugging Face</strong> for detailed 📜 and fine-tuning options.</li><li><strong>🔓 Open-Source Codebase</strong>: 👨‍💻 can explore and contribute to the project on GitHub (<strong>Alpha-VLLM/Lumina-Image-2.0</strong>).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*clj3rYZ3H5tXCiiM.png" /></figure><h3>🎯 Conclusion</h3><p>Lumina-Image 2.0 marks a significant milestone in 🤖-powered 🖼️ generation. By combining a <strong>compact yet powerful model structure</strong> with <strong>state-of-the-art generative capabilities</strong>, it is poised to revolutionize 🎨 and 🤖-assisted design. With an 🔓 approach and high 🔄, Lumina-Image 2.0 is set to become an essential tool in the 🤖 and 📊 communities.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54d4a3782d86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Rise of Kimi k1.5: A New Chapter in AI Development]]></title>
            <link>https://medium.com/@akshay.chame22/the-rise-of-kimi-k1-5-a-new-chapter-in-ai-development-2791ba6e70cf?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/2791ba6e70cf</guid>
            <category><![CDATA[kimi]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[genai]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 09:31:41 GMT</pubDate>
            <atom:updated>2025-01-28T09:31:41.034Z</atom:updated>
            <content:encoded><![CDATA[<p>In the high-stakes world of artificial intelligence, where giants like OpenAI’s o1 and DeepSeek’s R1 dominate headlines, a disruptive force has emerged: Kimi k1.5. Developed by China’s Moonshot AI, this multimodal powerhouse is not just a competitor; it’s a bold statement of intent. With groundbreaking capabilities, Kimi k1.5 is redefining the rules of AI dominance and challenging Silicon Valley’s supremacy. Let’s unpack why Kimi k1.5 is being hailed as a game-changer.</p><h3>Breaking New Ground in Multimodal Processing</h3><p>Kimi k1.5 is not just another AI system. It’s a strategic masterstroke designed to integrate text, visuals, and code into a unified framework that delivers seamless results across domains. This multimodal integration isn’t about incremental improvement — it’s a transformative leap. Imagine solving a geometry puzzle with visual aids while analyzing accompanying textual descriptions, all in one pass. That’s the Kimi k1.5 experience.</p><p>The model’s 128,000-token context window is its crowning jewel. With this extended capacity, Kimi k1.5 can analyze entire novels, detailed blueprints, or even sprawling datasets in one go, offering precision and depth unmatched by the likes of OpenAI o1 or DeepSeek R1. This revolutionary advancement enables higher-order reasoning that these competitors have yet to achieve.</p><h3>Why Kimi k1.5 Tops the Competition</h3><p>What puts Kimi k1.5 ahead of its rivals is its arsenal of state-of-the-art innovations. Here’s a breakdown of its competitive edge:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*Giurm125vJ8SRkCA" /></figure><h3>1. Revolutionary Optimization Framework</h3><p>Unlike DeepSeek R1’s reliance on traditional reinforcement learning or o1’s computationally heavy approaches, Kimi k1.5 adopts a sleek reinforcement learning strategy that:</p><ul><li>Emphasizes <strong>Online Mirror Descent</strong>, enhancing the balance between exploration and exploitation.</li><li>Applies a <strong>Length Penalty</strong> mechanism that promotes concise and accurate outputs over verbose or redundant ones.</li></ul><p>These methods don’t just reduce overhead — they redefine efficiency.</p><h3>2. Efficiency Without Compromise</h3><p>Competitors like o1 often demand extensive GPU resources, but Kimi k1.5 is built for scalable deployment. By employing techniques like <strong>partial rollouts</strong>, Kimi slashes training costs while maintaining performance, making it more accessible to businesses and developers alike.</p><h3>3. Superior Multimodal Integration</h3><p>Where DeepSeek excels in textual reasoning and o1 has a grip on visual tasks, Kimi k1.5 combines the best of both worlds. It can interpret mathematical notations, analyze visual data, debug code, and synthesize these inputs into actionable insights, giving it unmatched versatility.</p><h3>Applications That Matter</h3><p>Kimi k1.5 doesn’t stop at outperforming benchmarks. It’s designed with real-world applications in mind:</p><h3>1. Next-Gen Education</h3><p>Imagine an AI tutor that teaches quantum physics through diagrams, explains calculus through code examples, and uses rich text summaries to solidify understanding. Kimi k1.5 makes this a reality, outpacing competitors in multimodal learning environments.</p><h3>2. Advanced Scientific Research</h3><p>From analyzing genomic sequences to solving equations in high-energy physics, Kimi k1.5’s ability to handle complex, multimodal datasets transforms it into a researcher’s ultimate assistant.</p><h3>3. Developer Productivity</h3><p>With code debugging and dynamic problem-solving capabilities, Kimi k1.5 outshines its peers, offering a productivity boost to developers that neither o1 nor R1 can match.</p><h3>Global Implications and Competitive Landscape</h3><p>The rise of Kimi k1.5 signals a tectonic shift in the AI landscape. As OpenAI’s o1 and DeepSeek R1 continue to make headlines, Moonshot AI’s innovation represents a wake-up call for global tech leaders. The focus on efficiency, scalability, and multimodal integration sets a new benchmark for excellence.</p><h3>Look at the dominance of benchmark By the Numbers</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/0*dcHZrm3d5u74CG0j" /></figure><h3>Looking Ahead: The Kimi k1.5 Era</h3><p>Kimi k1.5 isn’t just challenging the status quo; it’s rewriting it. As AI evolves, the principles that define Kimi — integration, efficiency, and practical utility — will become the standard by which all future models are judged. The Kimi era isn’t coming — it’s already here.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HVdYtH-xPswfDyyHq6AuLA.png" /></figure><h3>Conclusion</h3><p>In a world where AI giants reign, Kimi k1.5 proves that disruption isn’t just possible — it’s inevitable. By delivering cutting-edge innovation while prioritizing scalability and real-world application, Moonshot AI has positioned Kimi k1.5 as the ultimate OpenAI o1 and DeepSeek V3 killer. This is more than a breakthrough. This is the new benchmark.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2791ba6e70cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Run DeepSeek-R1:1.5b LLM on Android Using Termux Locally]]></title>
            <link>https://medium.com/@akshay.chame22/how-to-run-deepseek-r1-1-5b-llm-on-android-using-termux-locally-9d13fcd891cb?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d13fcd891cb</guid>
            <category><![CDATA[deepseek-r1]]></category>
            <category><![CDATA[ollama]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Tue, 28 Jan 2025 06:19:23 GMT</pubDate>
            <atom:updated>2025-01-28T07:19:35.899Z</atom:updated>
            <content:encoded><![CDATA[<p>🌟 Large Language Models (LLMs) have revolutionized the field of artificial intelligence by enabling powerful natural language understanding and generation. However, running such models on mobile devices is not straightforward. In this guide, we’ll walk you through the process of running the DeepSeek-R1:1.5b LLM on an Android device using Termux. By the end, you’ll have a working setup that can even be extended to create a free API endpoint for integration with other applications. 🌟</p><h3>Device Requirements</h3><p>Before proceeding with the installation, ensure your Android device meets these minimum requirements:</p><ul><li>Android version: 7.0 (Nougat) or higher</li><li>Available storage: At least 8GB free space</li><li>RAM: Minimum 6GB, recommended 8GB or more</li><li>Processor: Snapdragon 845 or equivalent (8 cores recommended)</li><li>Architecture: ARM64 (aarch64)</li></ul><p>Note: The model’s performance will vary significantly based on your device’s specifications. Higher-end devices will provide better response times and more stable operation.</p><h3>Prerequisites</h3><p>✅ 1. An Android device with sufficient storage and processing power.<br> ✅ 2. Termux app installed on your device. Download the Termux APK from <a href="https://github.com/termux/termux-app/releases">Termux Releases</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fwxacZrsRBqDxUEC" /></figure><p>✅ 3. A stable internet connection.</p><p>🌟 — -🌟</p><h3>Troubleshooting Common Issues</h3><h3>Memory Management</h3><p>If you encounter out-of-memory errors:</p><ul><li>Close background apps before running the model</li><li>Use a swap file to extend available memory:</li></ul><pre>dd if=/dev/zero of=/data/swap bs=1M count=2048<br>mkswap /data/swap<br>swapon /data/swap</pre><h3>Performance Optimization</h3><p>To improve model performance:</p><ul><li>Enable high-performance mode on your device if available</li><li>Set CPU governor to performance:</li></ul><pre>su<br>echo &quot;performance&quot; &gt; /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor</pre><p>Note: This requires root access and may affect battery life.</p><h3>Step-by-Step Guide</h3><h3>1. Set Up the Termux Environment</h3><p>🌟 First, ensure that your Termux environment is properly configured. Run the following commands: 🌟</p><pre>termux-setup-storage<br>pkg upgrade<br>pkg install git cmake golang</pre><ul><li><strong>termux-setup-storage</strong>: Grants Termux access to your device’s file storage.</li><li><strong>pkg upgrade</strong>: Updates Termux packages to their latest versions.</li><li><strong>pkg install git cmake golang</strong>: Installs the necessary tools, including Git, CMake, and Go.</li></ul><p>🌟 — -🌟</p><h3>2. Install Ollama</h3><p>🌟 Ollama is a tool that allows you to run LLMs locally. Here’s how to set it up: 🌟</p><pre>git clone --depth 1 https://github.com/ollama/ollama.git<br>cd ollama<br>go generate ./...<br>go build .<br>./ollama serve &amp;</pre><ul><li><strong>git clone</strong>: Clones the Ollama repository.</li><li><strong>go generate ./...</strong>: Generates code required for the project.</li><li><strong>go build .</strong>: Builds the Ollama binary.</li><li><strong>./ollama serve &amp;</strong>: Starts the Ollama server in the background.</li></ul><p>🌟 The Ollama server will now be running and ready to handle requests. 🌟</p><p>🌟 — -🌟</p><h3>3. Run DeepSeek-R1:1.5b</h3><p>🌟 With the server running, you can now execute the DeepSeek-R1:1.5b LLM: 🌟</p><pre>./ollama run deepseek-r1:1.5b</pre><p>🌟 This command initializes the DeepSeek-R1:1.5b model and starts processing your inputs. You can now interact with the LLM through the Ollama interface. 🌟</p><p>🌟 — -🌟</p><h3>4. Optional Cleanup</h3><p>🌟 To free up storage space and secure your environment, you can clean up unnecessary files and restrict permissions: 🌟</p><pre>chmod -R 700 ~/go<br>rm -r ~/go<br>cp ollama/ollama /data/data/com.termux/files/usr/bin/</pre><ul><li><strong>chmod -R 700 ~/go</strong>: Restricts access to the Go directory.</li><li><strong>rm -r ~/go</strong>: Removes the Go directory after installation.</li><li><strong>cp ollama/ollama /data/data/com.termux/files/usr/bin/</strong>: Copies the Ollama binary to a system-wide location for easier access.</li></ul><p>🌟 — -🌟</p><h3>Benefits and Applications</h3><p>🌟 Running DeepSeek-R1:1.5b locally on Android has several advantages: 🌟</p><h3>1. Low-Cost API Endpoint</h3><p>🌟 By running the model locally, you can create a free API endpoint that can be used in other applications. For example, you can: 🌟</p><ul><li>Build a chatbot that processes user queries.</li><li>Integrate the LLM into mobile apps for enhanced functionalities like summarization, translation, or Q&amp;A.</li></ul><h3>2. Offline Capabilities</h3><p>🌟 Since the model runs locally, it does not require an active internet connection for processing, making it ideal for offline use cases. 🌟</p><h3>3. Data Privacy</h3><p>🌟 Your data stays on your device, ensuring maximum privacy. This is particularly useful for sensitive applications like healthcare or personal finance. 🌟</p><h3>4. Customization</h3><p>🌟 You can fine-tune the model or integrate it with other tools, such as Firebase or local databases, to enhance its capabilities and adapt it to specific needs. 🌟</p><p>🌟 — -🌟</p><p>Youtube link</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Fa4FyZ1nzbzg%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Da4FyZ1nzbzg&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Fa4FyZ1nzbzg%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b9f2299529b64605877c7a2f5400afc/href">https://medium.com/media/2b9f2299529b64605877c7a2f5400afc/href</a></iframe><p>🌟 By following this guide, you can unlock the power of DeepSeek-R1:1.5b on your Android device. Whether you’re a developer looking to integrate advanced AI into your projects or a hobbyist exploring the capabilities of LLMs, this setup offers a robust and flexible foundation. Happy experimenting! 🌟</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d13fcd891cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[“ Logfire: Simplifying Observability for Python Developers ”]]></title>
            <link>https://medium.com/@akshay.chame22/logfire-simplifying-observability-for-python-developers-ffd2c19fe909?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/ffd2c19fe909</guid>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Thu, 23 Jan 2025 07:18:03 GMT</pubDate>
            <atom:updated>2025-01-23T07:27:26.310Z</atom:updated>
            <content:encoded><![CDATA[<h3>🌟 Introducing Pydantic Logfire</h3><p>From the 🛠️ team behind 🐍 Pydantic, Logfire is an 🔍 observability platform built on the same belief as our open-source library — that the most 💪 powerful tools can be 🧑‍💻 easy to use.</p><h3>🏆 What Sets Logfire Apart</h3><h3>🚀 Simplicity and Power</h3><ul><li>Logfire’s 📊 dashboard is simple yet 💥 powerful, ensuring your entire 👩‍💻 engineering team will actively use it.</li><li><strong>⚡ Quick Onboarding</strong>: Time-to-first-log should be less than 5️⃣ minutes.</li></ul><h3>🐍 Python-Centric Insights</h3><ul><li>Provides unparalleled 👁️ visibility into 🐍 Python applications.</li><li>Features include:</li><li>🖼️ Rich display of Python objects.</li><li>🔁 Event-loop telemetry.</li><li>🧪 Profiling Python code &amp; 📊 database queries.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_U6RKsZONlMBW3pC.png" /></figure><h3>🌀 Pydantic Integration</h3><ul><li>Gain 👁️‍🗨️ insights into data flowing through your Pydantic models.</li><li>Offers built-in 📈 analytics on validations.</li><li>🏗️ Instrument your applications with less 📜 code, less ⌛ time, and better 🧠 understanding.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_r6H1PWdYp9gMSc4.png" /></figure><h3>🎠 OpenTelemetry Integration</h3><ul><li>Logfire acts as an 🧭 opinionated wrapper around OpenTelemetry.</li><li>Leverage existing ⚙️ tooling, 🏗️ infrastructure, and instrumentation for 🐍 Python packages.</li><li>Supports virtually any 🖥️ programming language.</li></ul><pre>import logfire<br>from fastapi import FastAPI<br><br>app = FastAPI()<br><br>logfire.configure()<br>logfire.instrument_fastapi(app)<br><br><br>@app.get(&quot;/hello&quot;)<br>async def hello(name: str):<br>    return {&quot;message&quot;: f&quot;hello {name}&quot;}<br><br><br>if __name__ == &quot;__main__&quot;:<br>    import uvicorn<br><br>    uvicorn.run(app)</pre><h3>📊 Structured Data</h3><ul><li>Easily include 🐍 Python objects (e.g., 📝 lists, 📦 dicts, 📄 dataclasses, 🌀 Pydantic models, 📋 DataFrames) in Logfire calls.</li><li>Automatically turns data into a 📑 structured format, making it ready to 🕵️‍♂️ query.</li></ul><h3>🧮 SQL Support</h3><ul><li>Query data using standard 💾 SQL, ensuring familiarity for many 👨‍💻 developers.</li><li>Integrates with existing 📊 BI tools and 🗄️ database querying libraries for greater 🔓 flexibility.</li></ul><h3>🪡 Find the Needle in a Stack Trace</h3><ul><li>Designed by 🐍 Python developers for Python developers.</li><li>Focuses on providing the <strong>🎯 right data</strong> in ways that make sense for 🐍 Python applications.</li><li>🛠️ Tools specifically crafted to address Python’s unique 🎢 challenges and opportunities.</li></ul><h3>⚙️ Features at a Glance</h3><ul><li><strong>🌐 Web UI</strong>: An 🖥️ intuitive interface to explore and 🔎 monitor your application’s 🗂️ logs.</li><li><strong>📋 Custom Onboarding Checklist</strong>: Guided 🧭 steps to ensure smooth 🛬 integration and setup.</li></ul><p><strong>📚 How-To Guides:</strong></p><ul><li>🖋️ Create write tokens.</li><li>🛠️ Set up different environments.</li><li>🗂️ Implement sampling strategies.</li><li>📤 Export or scrub sensitive 🕵️ data.</li></ul><p><strong>🔗 Integrations</strong>:</p><ul><li>🤖 LLMs.</li><li>🕸️ Web frameworks (e.g., 🏎️ FastAPI).</li><li>🗃️ Databases.</li><li>🌐 HTTP clients.</li><li>📡 Event streams.</li><li>📓 Logging tools.</li><li>📊 System metrics.</li><li>💳 Stripe &amp; ☁️ AWS Lambda support.</li></ul><h3>💡 Emulating Pydantic’s Philosophy</h3><ul><li>Strikes the perfect ⚖️ balance between 🛠️ ease of use and sophisticated 🔬 capabilities.</li><li>Enables both 🍼 novice and 🧙‍♂️ expert developers to instrument their applications effectively.</li></ul><p>For more ℹ️ information, visit: <a href="https://pydantic.dev/logfire">Pydantic Logfire</a>.+ <a href="https://logfire.pydantic.dev/docs/">docs</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ffd2c19fe909" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building a Multi-Agent Resume Processing System with LangGraph and Gemini]]></title>
            <link>https://medium.com/@akshay.chame22/building-a-multi-agent-resume-processing-system-with-langgraph-and-gemini-b0351400b52b?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0351400b52b</guid>
            <category><![CDATA[langchain-agents]]></category>
            <category><![CDATA[langsmith]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[gen-ai-tools]]></category>
            <category><![CDATA[langchain]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Wed, 23 Oct 2024 06:11:03 GMT</pubDate>
            <atom:updated>2024-10-23T06:11:03.116Z</atom:updated>
            <content:encoded><![CDATA[<p>Have you ever wondered how to automate resume processing while maintaining human-level accuracy? In this comprehensive guide, we’ll walk through building a multi-agent system that combines the power of LangGraph, Google’s Gemini API, and human feedback loops to create an intelligent resume processing pipeline.</p><p><strong>LangChain/LangSmith Human Feedback Loops</strong></p><p><strong>What is it?</strong> A human feedback loop in LangChain/LangSmith is a mechanism that allows humans to review, evaluate, and correct AI outputs during the execution of AI workflows. It’s like having a quality control checkpoint where humans can intervene when needed.</p><p><strong>Key Components:</strong></p><ol><li><strong>Feedback Collection</strong></li></ol><ul><li>Real-time input from users</li><li>Rating systems (1–5 stars, thumbs up/down)</li><li>Text-based corrections and comments</li><li>Accept/reject decisions on outputs</li></ul><ol><li><strong>Feedback Types</strong></li></ol><ul><li>Quality ratings</li><li>Correctness validation</li><li>Content moderation</li><li>Output refinement</li><li>Process guidance</li></ul><p><strong>Benefits:</strong></p><ol><li><strong>Quality Control</strong></li></ol><ul><li>Ensures accurate outputs</li><li>Maintains high standards</li><li>Catches errors early</li></ul><ol><li><strong>Learning &amp; Improvement</strong></li></ol><ul><li>Collects training data</li><li>Identifies common issues</li><li>Improves model performance</li></ul><ol><li><strong>Process Refinement</strong></li></ol><ul><li>Optimizes workflows</li><li>Reduces errors</li><li>Enhances efficiency</li></ul><p><strong>Use Cases:</strong></p><ol><li><strong>Content Generation</strong></li></ol><ul><li>Writing review</li><li>Fact-checking</li><li>Style alignment</li></ul><p><strong>2. Data Processing</strong></p><ul><li>Validation of extracted information</li><li>Error correction</li><li>Format verification</li></ul><p><strong>3. Decision Making</strong></p><ul><li>Approval workflows</li><li>Critical choices</li><li>Risk assessment</li></ul><p><strong>Best Practices:</strong></p><ol><li><strong>Design</strong></li></ol><ul><li>Keep feedback prompts clear</li><li>Make interface user-friendly</li><li>Define clear evaluation criteria</li></ul><p><strong>2. Implementation</strong></p><ul><li>Set appropriate trigger points</li><li>Balance automation and human input</li><li>Maintain response time standards</li></ul><p><strong>3. Management</strong></p><ul><li>Track feedback patterns</li><li>Analyze improvement areas</li><li>Document feedback history</li></ul><p><strong>Common Challenges:</strong></p><ol><li><strong>Time Management</strong></li></ol><ul><li>Balancing speed with quality</li><li>Handling feedback delays</li><li>Managing review queues</li></ul><p><strong>2. Consistency</strong></p><ul><li>Maintaining standard criteria</li><li>Handling subjective feedback</li><li>Aligning multiple reviewers</li></ul><p><strong>3. Integration</strong></p><ul><li>Seamless workflow incorporation</li><li>Feedback data storage</li><li>System responsiveness</li></ul><h3><strong>What We’ll Build</strong></h3><p><strong>We’re creating a system that can:</strong><br>- Read resumes in multiple formats (PDF, DOCX)<br>- Extract key information automatically<br>- Validate the extracted data<br>- Request human feedback when needed<br>- Output structured JSON data</p><p>Let’s dive into how it all works!</p><h3>The Architecture</h3><p>Before we get into the code, let’s understand our system’s architecture. We’re using a multi-agent approach where each agent handles a specific task:</p><p>project/<br>├── agents/<br>│ ├── reader.py # Resume reading<br>│ ├── extractor.py # Information extraction<br>│ └── validator.py # Data validation<br>├── workflow/<br>│ └── graph.py # Workflow definition<br>└── main.py # Entry point</p><p><strong>Building the Core Components</strong></p><p><strong>1. The Resume Reader</strong></p><p>First, let’s build our resume reader. This agent handles different file formats and extracts text content:</p><pre>import os<br>import PyPDF2<br>import docx<br>def reader(file_path):<br> &quot;&quot;&quot;<br> Reads and extracts text from PDF or DOCX files<br> &quot;&quot;&quot;<br> _, file_extension = os.path.splitext(file_path)<br> text = &quot;&quot;<br>try:<br> if file_extension.lower() == &#39;.pdf&#39;:<br> with open(file_path, &#39;rb&#39;) as file:<br> reader = PyPDF2.PdfReader(file)<br> for page in reader.pages:<br> text += page.extract_text() or &#39;&#39;<br> <br> elif file_extension.lower() == &#39;.docx&#39;:<br> doc = docx.Document(file_path)<br> for paragraph in doc.paragraphs:<br> text += paragraph.text + &#39;\n&#39;<br> <br> return text.strip() if text else &quot;No text found&quot;<br>except Exception as e:<br> return f&quot;An error occurred: {str(e)}&quot;</pre><p><strong>2. The Information Extractor</strong></p><pre>import os<br>import google.generativeai as genai<br>from google.ai.generativelanguage_v1beta.types import content<br>def extractor(prompt, validate=False):<br> &quot;&quot;&quot;<br> Extracts structured information from resume text using Gemini<br> &quot;&quot;&quot;<br> genai.configure(api_key=os.environ[&quot;GEMINI_API_KEY&quot;])<br> <br> # Define the schema for structured output<br> schema = {<br> &quot;type&quot;: content.Type.OBJECT,<br> &quot;properties&quot;: {<br> &quot;personal_info&quot;: {<br> &quot;name&quot;: content.Schema(type=content.Type.STRING),<br> &quot;phone_no&quot;: content.Schema(type=content.Type.NUMBER),<br> &quot;email&quot;: content.Schema(type=content.Type.STRING),<br> },<br> &quot;education&quot;: {<br> &quot;degree&quot;: content.Schema(type=content.Type.STRING),<br> &quot;university&quot;: content.Schema(type=content.Type.STRING),<br> },<br> &quot;work_experience&quot;: {<br> &quot;company&quot;: content.Schema(type=content.Type.STRING),<br> &quot;role&quot;: content.Schema(type=content.Type.STRING),<br> &quot;description&quot;: content.Schema(type=content.Type.STRING),<br> }<br> }<br> }<br>model = genai.GenerativeModel(<br> model_name=&quot;gemini-1.5-flash&quot;,<br> generation_config={&quot;response_schema&quot;: schema}<br> )<br> <br> return model.generate_content(prompt).text</pre><p><strong>3. Validator</strong></p><pre>import re<br><br>def validator(resume_data):<br>    &quot;&quot;&quot;<br>    Validates extracted resume data and identifies issues<br>    &quot;&quot;&quot;<br>    errors = []<br>    <br>    def validate_email(email):<br>        pattern = r&quot;[^@]+@[^@]+\.[^@]+&quot;<br>        return bool(re.match(pattern, email))<br><br>    def validate_phone(phone):<br>        pattern = r&quot;^\+?[1-9]\d{1,14}$&quot;<br>        return bool(re.match(pattern, str(phone)))<br><br>    # Validate personal information<br>    personal_info = resume_data.get(&quot;personal_info&quot;, {})<br>    if not validate_email(personal_info.get(&quot;email&quot;, &quot;&quot;)):<br>        errors.append(&quot;Invalid email format&quot;)<br>    if not validate_phone(personal_info.get(&quot;phone_no&quot;)):<br>        errors.append(&quot;Invalid phone number format&quot;)<br>        <br>    return errors if errors else &quot;valid&quot;</pre><p><strong>The Human Feedback Loop: Making It Smart</strong></p><p>Here’s where our system gets interesting. Instead of blindly trusting the AI, we implement a human feedback loop:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtJbO4dm0rar9lYFT_NApA.png" /><figcaption>Human Feedback loop</figcaption></figure><pre>def human_call(data):<br> &quot;&quot;&quot;<br> Handles human feedback for data correction<br> &quot;&quot;&quot;<br> print(&quot;\n=== Data Validation Required ===&quot;)<br> print(f&quot;Current data: {data}&quot;)<br> <br> correction = input(&quot;\nPlease provide corrections or press Enter to approve: &quot;)<br> <br> if correction:<br> return f&quot;Applying correction: {correction}&quot;<br> return &quot;Data approved&quot;<br>def reader_should_continue(data):<br> &quot;&quot;&quot;<br> Determines if human intervention is needed<br> &quot;&quot;&quot;<br> if isinstance(data, str):<br> if &quot;invalid&quot; in data.lower() or &quot;error&quot; in data.lower():<br> return &quot;human&quot;<br> elif isinstance(data, dict):<br> if any(&quot;invalid&quot; in str(v).lower() for v in data.values()):<br> return &quot;human&quot;<br> return &quot;continue&quot;</pre><p><strong>Putting It All Together: The Workflow</strong></p><p>Now, let’s create our workflow using LangGraph:</p><pre>from langgraph.graph import Graph, END<br>def create_workflow():<br> workflow = Graph()<br># Add nodes<br> workflow.add_node(&quot;reader&quot;, reader)<br> workflow.add_node(&quot;extractor&quot;, extractor)<br> workflow.add_node(&quot;validator&quot;, validator)<br> workflow.add_node(&quot;human_call&quot;, human_call)<br># Define workflow<br> workflow.add_edge(&quot;reader&quot;, &quot;extractor&quot;)<br> workflow.add_edge(&quot;extractor&quot;, &quot;validator&quot;)<br> <br> # Add conditional routing<br> workflow.add_conditional_edges(<br> &quot;validator&quot;,<br> reader_should_continue,<br> {<br> &quot;human&quot;: &quot;human_call&quot;,<br> &quot;continue&quot;: END,<br> END: END<br> }<br> )<br> <br> workflow.add_edge(&quot;human_call&quot;, &quot;extractor&quot;)<br> <br> return workflow.compile()</pre><p><strong>Using the System</strong></p><p>Here’s how to use our resume processing system:</p><pre># Set up environment<br>import os<br>from dotenv import load_dotenv<br>load_dotenv()<br># Initialize the workflow<br>chain = create_workflow()<br># Process a resume<br>result = chain.invoke(&quot;resume.pdf&quot;)<br>print(f&quot;Processing complete: {result}&quot;)</pre><p><strong>Best Practices and Tips</strong></p><p>When implementing this system, keep these points in mind:</p><ol><li><strong>Error Handling</strong>: Always implement robust error handling:</li></ol><pre>try:<br> result = chain.invoke(file_path)<br> except Exception as e:<br> logging.error(f&quot;Processing failed: {str(e)}&quot;)</pre><p>2. <strong>Validation Rules</strong>: Define clear validation rules based on your needs:</p><pre># Example validation rule<br> def validate_work_experience(experience):<br> return bool(<br> experience.get(&quot;company&quot;) and <br> experience.get(&quot;role&quot;) and<br> experience.get(&quot;description&quot;)<br> )</pre><p>3. Human Feedback: Make the feedback interface clear and user-friendly:</p><pre>def get_human_feedback(data, issue):<br> print(f&quot;\nIssue detected: {issue}&quot;)<br> print(f&quot;Current value: {data}&quot;)<br> return input(&quot;Please provide correction: &quot;)</pre><p><strong>Some Screenshot if you apply GUI</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kCfOxuoxEnZTgSoqh85BSg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y6FxrBekxJYXJtBS8r-xbg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wcJoTA2AjYnJG0EeL-lXuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XkkWEOXDwXYn_czek90Wug.png" /></figure><p><strong>Langsmit Dashboard</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uznp_48ktEjjdwowS_DDxQ.png" /></figure><p><strong>Conclusion</strong></p><p>Building a multi-agent resume processing system with human feedback loops doesn’t have to be complicated. By breaking down the process into distinct components and implementing proper validation and feedback mechanisms, we can create a robust system that combines the efficiency of AI with human accuracy.</p><p>— -</p><p>If you found this helpful, follow me for more articles on AI development and practical implementations. Have questions or suggestions? Leave a comment below!</p><p>— -</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b0351400b52b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[P Vs NP Problems]]></title>
            <link>https://medium.com/@akshay.chame22/p-vs-np-problems-106c151cbf79?source=rss-ffd20c34e1b4------2</link>
            <guid isPermaLink="false">https://medium.com/p/106c151cbf79</guid>
            <category><![CDATA[cto]]></category>
            <category><![CDATA[p-vs-np]]></category>
            <dc:creator><![CDATA[Akshay Chame]]></dc:creator>
            <pubDate>Wed, 08 Feb 2023 15:21:23 GMT</pubDate>
            <atom:updated>2025-01-23T07:28:38.595Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Computational Complexity :</strong></h3><ul><li>Study of the amount of resources like space and time required for solving problems using computational methods is known as computational complexity. It is used to classify and compare different algorithms, and to understand the limits of what can be computed by computers.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xfF6U0j9VuBCC3jd" /></figure><ul><li>Mostly time complexity is used to measure the complexity of a problem, Amount of time an algorithm needs to solve a problem is known as time complexity and the amount of memory an algorithm requires to solve a problem is known as space complexity.</li><li>According to the resources required to solve a problem, problems are divided into complexity classes. Following are the examples for complexity classes</li><li>‘P’ stands for polynomial time taking problems, ‘NP’ stands for nondeterministic polynomial time taking problems, and ‘NP-hard’ stands for hardest problems in NP and ‘NP-complete’.</li><li>computational complexity is a fundamental area of study in computer science that helps to understand the capabilities and limitations of computers and algorithms, and to guide the design of efficient algorithms.</li></ul><h3><strong>Polynomial problems :</strong></h3><ul><li>If the given problem’s solution can be found by a deterministic algorithm in polynomial time then the problem is considered to be in the P class.</li><li>P problems are a subset of NP problems.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/0*pLjSuz3ckBMS-5Mh" /></figure><p><strong>Examples :</strong></p><ul><li><strong>Sorting algorithms:</strong> Given a list of elements, sort them in a specific order, for example, merge sort, quick sort, bubble sort are all P problems</li><li><strong>Matrix multiplication:</strong> Given two matrices, compute their product</li><li><strong>Linear programming: </strong>Find answer that optimizes the objective function. Given a system of linear constraints and an objective function.</li></ul><h3><strong>Non deterministic Polynomial problems :</strong></h3><ul><li>Solution of a given problem can be checked for right or wrong in polynomial time but calculating solutions of those problems in polynomial time may not be possible. Such types of problems are known as NP problems.</li><li>The class NP-hard problems is a superset of N-problems, which are considered to be the most difficult of the NP problems.</li><li>For problems in N-class no deterministic algorithm is there which can find the solution in polynomial time.Therefore for solving the N-class problem which takes polynomial time there is a need for a non-deterministic algorithm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*NFyTEoj0GttdXL4A" /></figure><p><strong>Examples :</strong></p><ul><li><strong>3-colorability :</strong> In an undirected graph, colorize the vertices of the graph with 3 colors but adjacent vertices can’t have the same color.</li><li><strong>Hamiltonian cycle :</strong> In an undirected graph determine if there exists a cycle which visits every vertex only once.</li></ul><p><strong>Np Hard Problems :</strong></p><ul><li>Problems for which no efficient solution is known are considered in NP hard class.</li><li>These problems are considered to be the most difficult of the NP (nondeterministic polynomial-time) problems, and they are generally not solvable in polynomial time unless P = NP.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7lSeDSY2vNmBXcni" /></figure><p><strong>Examples :</strong></p><ul><li><strong>The clique problem</strong>: In an undirected graph, calculate the largest subset of vertices such that there is an edge between each pair of vertices in the subset..</li><li><strong>The subset sum :</strong> Calculate and tell if there exists a subset of the integers that add up to the target sum in a set of { sum,integers target }.</li></ul><h3><strong>Np complete Problems :</strong></h3><ul><li>If we have a problem which can be classified into both NP and NP-Hard class then that problem is known as NP-Complete problem.</li><li>If NP-complete problems have a non deterministic polynomial time taking algorithm for solving them then these problems are said to be NP-hard problems.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/0*M5-g4NMCpT3mQjwy" /></figure><p><strong>Examples :</strong></p><ul><li><strong>The vertex cover problem:</strong> If each edge in the graph is incident to at least 1 vertex in the subset, find the smallest subset of vertices in an un-directed graph.</li><li><strong>The Boolean satisfiability problem :</strong> In a Boolean formula, show that the formula evaluated to be true if there is an assignment of boolean values to the variables.</li></ul><p><strong>How to write non-deterministic algorithm :</strong></p><ul><li>Step 1 : Write the known algorithm.</li><li>Step 2 : Write the method or function which we can assume working properly and giving the required output but we don’t the working of it. And Hence that method is non-deterministic.</li></ul><p><strong>Example :</strong></p><pre>Nsearch (Arr,n,value)<br>{<br>q=option();<br>if(value=Arr[q])<br>{<br>print(q);<br>}<br>print(0);<br>}</pre><h3><strong>Satisfiability :</strong></h3><ul><li>To show the relation between np problems we take one problem as a base problem and that problem is known as satisfiability problem.</li><li>If we are able to solve the base problem then by proving that relation between base problem and other remaining problem we can conclude that the way in which we have solved the base problem in the similar way we can solve the remaining problems as well.</li><li>Here satisfiability problems take 2^n time which is an exponential time algorithm hence satisfiability is a NP problem.</li><li>To show the relation between the problem we use the method called Reduction.</li><li>In reduction we show the satisfiability ∝ NP problem (0/1 knapsack problem) then the formula used to solve satisfiability problem can be converted in to a formula which will be used to solve other NP problem. And hence if we can solve 1 of the problems in polynomial time,then we can solve the remaining problems in polynomial time as well.</li></ul><h3><strong>Conversion of NP hard problem to NP complete :</strong></h3><p>Step 1 : Prove that the problem is reduced by a satisfiability problem.</p><p>Step 2 : Develop a non deterministic algorithm to solve a given problem.</p><p>If the given problem satisfies both the conditions then that problem comes under NP-Complete class.</p><p><strong>References :</strong></p><p>https://dl.acm.org/doi/fullHtml/10.1145/1562164.1562186<br>https://dl.acm.org/doi/fullHtml/10.1145/1562164.1562186<br>http://2fwww.claymath.org/sites/default/files/pvsnp.pdf<br>https://www.youtube.com/watch?v=e2cF8a5aAhE<br>https://www.pramanaresearch.org/gallery/prj_c_a_44.pdf</p><p><strong>Researched and compiled by : Vishwakarma Institute Of Technology Group 9 CS-SEDA</strong> (Jyoti Kanjalkar,<a href="https://medium.com/u/ffd20c34e1b4?source=post_page-----7abee2c9c044--------------------------------">AkshayChame</a>,<a href="https://medium.com/u/97fda07ec6b9?source=post_page-----7abee2c9c044--------------------------------">MalharJoshi</a>,<a href="https://medium.com/u/b1bf728edce6?source=post_page-----7abee2c9c044--------------------------------">Rohit Jyoti</a>,<a href="https://medium.com/u/4536966f8527?source=post_page-----7abee2c9c044--------------------------------">Varad Uplanchiwar</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=106c151cbf79" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>