Below you will find pages that utilize the taxonomy term โAIโ
2024
Building Advanced RAG Applications with MyScaleDB and LlamaIndex
Explore how to build advanced Retrieval-Augmented Generation (RAG) applications using MyScaleDB and LlamaIndex. This guide covers the installation of necessary tools, setting up a virtual environment, and creating an index for document categorization. Learn how to execute simple and filtered queries, and troubleshoot common issues. Enhance your understanding of integrating high-performance SQL vector databases with cutting-edge data frameworks for efficient LLM applications.
2024
[Artifical Intelligence] Coding with CrewAI: AI Orchestration Simplified
Explore CrewAI, a pioneering framework streamlining AI agent orchestration. Discover practical applications, from Jan and LM Studio integration to Serper API utilization. Follow along as we delve into coding with CrewAI, showcasing its versatility in crafting resumes and more. Experience the seamless synergy of autonomous AI agents, revolutionizing workflows with efficiency and innovation. Unlock the power of CrewAI, propelling your projects to new heights in artificial intelligence.
2024
[Artificial Intelligence] Text-to-Image with StableDiffusionPipeline
In this post, we explore the capabilities of StableDiffusionPipeline for generating photorealistic images from textual inputs. We start with setting up the environment and installing necessary libraries. Then, we dive into Textual Inversion, demonstrating how the model learns new concepts from images. Image-to-Image transformations are also explored, showcasing the pipeline's versatility. Additionally, we introduce Animagine XL 2.0, a model for high-resolution anime image creation, and provide sample code for its implementation. Lastly, we highlight Stable Diffusion XL, a powerful text-to-image model, and share a festive image generated using it.
2024
[Artificial Intelligence] Stable Diffusion: Text-to-Image Modeling Journey
This post explores Stable Diffusion, a latent text-to-image diffusion model in machine learning. Diffusion models, with forward, reverse, and sampling components, understand and generate patterns in datasets. Illustrating applications in image tasks, it introduces the process of installing and utilizing Stable Diffusion. The post details image generation and modification using prompts, with examples and troubleshooting. Notably, it shares an encounter with CUDA out-of-memory errors and the resolution through image resizing. Overall, it offers a comprehensive guide, combining theoretical insights with practical implementation steps in a professional manner.
2024
[Artificial Intelligence] OpenVINO, Optimum-Intel, CPU: An Exploration in Model Optimization
Explore the convergence of OpenVINO and Optimum-Intel in this post, where I detail the setup and execution of example code on my aging laptop. Focused on applying Quantization-aware Training and the Token Merging method to optimize the UNet model within the Stable Diffusion pipeline, this journey showcases the synergy of open-source tools for deep learning model deployment. Note that the provided code is tailored for CPU-based inference due to limitations in my aging GeForce graphics card, making it a valuable resource for users with similar hardware constraints. Dive into the world of optimized models and delightful Pokemon creation!
2024
[Artificial Intelligence] Exploring Autogen Studio
In this exploration of Autogen Studio, we navigated through the AI landscape, harnessing the LM Studio API to compare responses from diverse language models. Employing the Mistral Instruct 7B model, we scrutinized prompts like Stock Price and Paint, visualizing outcomes and delving into key configurations. The post also offered insights into the primary assistant, model configuration, and agent workflows, accompanied by a comparative analysis of Mistral model responses. This comprehensive journey demystifies the power of Autogen Studio and its seamless integration with LM Studio API, providing practical guidance for AI enthusiasts.
2024
[Artificial Intelligence] Deploying LLMs with WasmEdge in HomeLab
In this post, we explored deploying Lightweight Language Models (LLMs) using WasmEdge, a high-performance WebAssembly runtime, within a HomeLab environment. The process involved preparing an OpenAI-compatible API server, configuring the Wasi-NN plugin, and deploying the setup to HomeLab using Kubernetes (K3s). The post also detailed the steps for testing the API server and integrating it into a Java application. Overall, the guide provides a comprehensive walkthrough of hosting and utilizing LLMs with WasmEdge in a local environment.
2024
[Artificial Intelligence] Integration of Kong into AI Workflow
This comprehensive guide navigates through configuring Kong OSS and Kong Ingress Controller (KIC), seamlessly integrating Kong into an AI workflow. Starting with Kong OSS configuration, the tutorial covers updating environment variables and service ports. The Langchain4j application is then adapted to leverage Kong API, allowing for flexible path-based APIs. Additionally, potential timeout issues are addressed. The guide concludes with a demonstration of Kong Ingress Controller configuration, emphasizing optimal settings for specific use cases. Whether through Kong OSS or KIC, readers gain insights into enhancing API management and integration within their AI workflows.
2023
[Artificial Intelligence] Unveiling Agent AutoBuild in Autogen
In this blog, I explored Autogen's Agent AutoBuild and experimented with the Mixtral 8x7B model. I configured Autogen, envisioning a software academy project for coding novices. Through code snippets, I showcased AutoBuild's multi-agent system creation and tailored a task that wrote a General Paper article on art and courage. The Mixtral 8x7B model in LM Studio brought excitement but posed challenges with duplicate content. Check out the blog for a firsthand look at the dynamic interplay between Autogen and cutting-edge AI, complete with code snippets and images.
2023
[Artificial Intelligence] Empowering Autogen: Enabling Seamless Java Code Execution
In this post, I explored enhancing Autogen's capabilities by enabling seamless Java code execution. Drawing inspiration from 0xlws' fork supporting JavaScript, I embarked on modifying Autogen to robustly support Java. I detailed the setup process, including installing Java on Windows Subsystem for Linux (WSL) and modifying key files. The post includes code snippets showcasing the changes, recompilation steps, and instructions for generating Java code. I extended functionality to additional test cases, seamlessly switching between Java and Python code execution. Docker integration for Java code execution was also optimized, showcasing Autogen's versatility and robust development experience.
2023
[Artificial Intelligence] Multi-agent Conservation with Autogen
In my recent blog, I demonstrated setting up a multi-agent conservation using Autogen. Employing agents "for_motion" and "against_motion," each engaged in a dynamic debate, facilitated by a neutral party. The debate evolved through multiple rounds, with each agent providing substantiated arguments, exceeding 300 words per response. The facilitator ensured debate guidelines were adhered to. The messages were then passed to an assistant tasked with synthesizing a comprehensive article. Utilizing Autogen's versatility, I showcased the system in action, debating different questions and generating diverse articles. The blog includes a full script in app.py and snapshots of the entire debate session.
2023
[Artificial Intelligence] Exploring AutoGen with LM Studio and Local LLM
I explored AutoGen, an innovative framework on GitHub, enabling the development of Large Language Model (LLM) applications. Collaborating with LM Studio, I set up a local LLM application, showcasing the step-by-step process. Installing LM Studio involved configuring context length, enabling GPU acceleration, and setting CPU threads. The integration process showcased a seamless environment for running local LLMs. Additionally, I explored the AutoGen setup, including installing Anaconda and creating a virtual environment. With the provided guidelines, I executed the app.py script, generating a stock price comparison chart through AutoGen's dynamic conversation.
2023
[Artificial Intelligence] Boosting Inference Speed: SSD and GPU Acceleration
Embarking on an exhilarating upgrade journey, I chronicle the seamless migration to the powerful Lexar NM790 SSD and unveil the secrets behind turbocharging Langchain4j's inferencing speed. With Clonezilla's reliability, my Windows 11 transition to this SSD was flawless, offering a tangible boost. The GPU acceleration saga unfolded with CUDA installation and the NVIDIA Container Toolkit magic, resulting in a high-speed universe. Launching the LocalAI image in a GPU Docker container revealed the grand finaleโa remarkable surge in Langchain4j's inference speed. This transformation invites tech enthusiasts to explore elevated performance and redefine possibilities.
2023
[Artificial Intelligence] RAG over Java code with Langchain4j
In my latest post, I delve into seamlessly integrating Retrieval-Augmented Generation (RAG) with Java code using Langchain4j. Drawing inspiration from RAG over code, I explore Java Parser's potential for robust codebase analysis. The pivotal JavaParsingService and EmbeddingStoreService orchestrate this integration, enabling users to effortlessly load Java projects and glean profound insights. The enhanced controller boasts user-friendly endpoints, fostering dynamic interactions. Witness Retrieval-Augmented Generation breathe life into Java code, from codebase ingestion to insightful querying with models like gpt4all-j, WizardLM, and OpenAI. This narrative unveils the nuanced capabilities of RAG in querying Java codebases.
2023
[Artificial Intelligence] Building an AI Application with Langchain4j
I embarked on a journey to harness the capabilities of Langchain4j, crafting a powerful AI application in Java using the local language model. Utilizing Spring Boot, Postman, and various Langchain4j components, I explored setting up, implementing a chat service, integrating custom tools, embedding functionality with Chroma, translation, persistence, retrieval, and streaming services. The blog post serves as a comprehensive guide for building personalized AI applications, showcasing the versatility and potential of Langchain4j in Java development.
2023
[Artificial Intelligence] Unlocking the Power of Machine Learning with MLC LLM
I delve into the transformative realm of MLC LLM, an advanced universal deployment solution for extensive language models. My post guides you personally through the setup, emphasizing critical components like TVM and Conda. I demonstrate the process, including TVM installation via pip, Conda setup on WSL, and Vulkan SDK installation for optimal performance. Navigating the MLC Chat exploration, I detail creating a Conda environment and running MLC LLM's CLI version, offering a glimpse into its potential through a sample question. With MLC LLM and MLC Chat at your fingertips, the world of machine learning and language understanding unfolds boundless possibilities. ๐๐ง
2023
[Artificial Intelligence] Utilizing vLLM for Efficient Language Model Serving
Embarking on my journey with vLLM, I explore its potential for streamlined Large Language Model (LLM) inference and deployment. The blog details my personal experience setting up vLLM on a Windows Subsystem for Linux (WSL) instance running Ubuntu 22.04. I meticulously guide through installing WSL, NVIDIA GPU drivers, CUDA Toolkit, and Docker for efficient utilization. Delving into vLLM setup within the NVIDIA PyTorch Docker image, I navigate through the installation process and launch the API server. The blog provides insights into querying the model and creating a Docker image snapshot, offering a comprehensive guide to efficient language model serving.
2023
[Artificial Intelligence] Unleashing the Power of LLaMA Server in Docker Container
After completing the Generative AI with Large Language Models course, I'm thrilled to share my Dockerized experience running the LLaMA model. The guide covers setting up the project structure, creating a FastAPI application, and Dockerizing it. Additionally, I showcase building an AI chatbot, integrating it with FastAPI, HuggingFace embeddings, and LLaMA. The Docker environment loads the LLM and allows seamless interactions with PDFs. I conclude by enhancing performance with OpenBLAS, significantly reducing inferencing time. Explore the power of LLaMA Server in a Docker container for transformative AI experiences! ๐
2023
[Artificial Intelligence] Unlocking the Power of GPT4All: How to summarize YouTube Videos in Minutes (Part 2)
In this comprehensive guide, I explore AI-powered techniques to extract and summarize YouTube videos using tools like Whisper.cpp, GPT4All, LLaMA.cpp, and OpenAI models. I detail the step-by-step process, from setting up the environment to transcribing audio and leveraging AI for summarization. Despite encountering issues with GPT4All's accuracy, alternative approaches using LLaMA.cpp and OpenAI models provide versatile summarization options. The tutorial aims to empower researchers, content creators, and information enthusiasts to efficiently analyze and summarize YouTube content using cutting-edge AI technologies.
2023
[Artificial Intelligence] Unlocking the Power of GPT4All: How to summarize YouTube Videos in Minutes (Part 1)
Hey folks! Today, I'm stoked to introduce you to the game-changer that is GPT4All for summarizing YouTube videos. Join me on this journey of transformation as we set up the magic using Python. We'll load transcripts, chunk them for optimal processing, and then unleash the power of GPT4All for mind-blowing summarizations. Brace yourself for amazement as we witness the magic unfold! Additionally, we'll explore an optional OpenAI approach for comparison. Stay tuned for more exciting updates in the next blog post on video content summarization without embedded transcripts! โจ๐
2023
[Artificial Intelligence] Receipt OCR with LangChain, OpenAI and PyTesseract
Embarking on a receipt OCR adventure inspired by the LangChain for LLM Application Development course, I explore the synergy of LangChain, OpenAI, and PyTesseract. With PyTesseract, I unlock OCR potential using OpenCV and showcase code for comprehensive text extraction. Integrating OpenAI, I create a prompt to merge and format OCR results. LangChain's LLM-Math tool joins the fray, verifying OCR accuracy by calculating and comparing amounts. Witness the power of combining these technologies for precise receipt data extraction and validation. Dive into the journey, explore the code, and enhance your data processing skills!
2023
[Artificial Intelligence] Autofill PDF with LangChain and LangFlow
In this journey, I explore automating PDF autofill using LangChain and LangFlow. Leveraging LangFlow and OpenAI, I streamline the employment form completion process, demonstrating steps to install LangFlow and set up a PostgreSQL table. Despite encountering challenges in prototyping with LangFlow, the exploration progresses to auto-fill PDFs. After extracting form fields and LLaMA model setup, I employ LangChain to fetch PostgreSQL data. Concluding with Python manipulation to interpolate and update the PDF, the process achieves seamless auto-fill. Dive into the details, overcome challenges, and witness the power of LangChain and LangFlow in revolutionizing PDF automation.
2023
[Artificial Intelligence] Running GPT4All for your PostgreSQL with LangChain
In this exploration, I guide you through setting up GPT4All on a Windows PC and demonstrate its synergy with SQL Chain for PostgreSQL queries using LangChain. Utilizing Jupyter Notebook and prerequisites like PostgreSQL and GPT4All-J v1.3-groovy, I install dependencies and showcase LangChain and GPT4All model setup. Navigating an Open Source Shakespeare database, I provide an ER diagram for clarity. Querying GPT4All through LangChain, we delve into PostgreSQL queries and also compare responses with OpenAI. The comprehensive walkthrough empowers you to seamlessly integrate GPT4All into your PostgreSQL workflows for efficient and dynamic interactions.
2023
[Artificial Intelligence] Running LLaMA server in local machine
In continuation from my previous post, I prepared the environment using Pipenv and installed the OpenAI-like web server with specific CMAKE arguments. Running the server with a provided model was straightforward. To create an SSH tunnel to the remote Ubuntu machine from my Windows PC, I used PuTTY, configuring it to forward port 8888. Connecting from BYO-GPT involved adjusting the server endpoint in the Dart file. This seamless integration allowed me to access the Open API for the LLAMA CPP server and successfully connect BYO-GPT to the specified server.
2023
[Artificial Intelligence] Building ChatBot for your PDF files with LangChain
In this post, I extend the use case from my previous post to demonstrate building a ChatBot for PDF files using LangChain. In the preparation phase, I install Chroma, an open-source embedding database, and ingest a PDF file using PyPDFLoader. I then split the document into chunks and use Chroma's default embeddings. Due to a potential issue, I provide an alternative embedding approach. Next, I load a local LLaMA model, prepare for question-answering, and run queries using RetrievalQAWithSourcesChain. I also touch on running with OpenBLAS for optimization. The guide empowers users to explore personalized question-answering over their PDF documents.
2023
[Artificial Intelligence] Building a basic Chain with LangChain
With the LangChain framework and a setup from a previous post, I delve into building a basic chain using Llama.cpp within LangChain. Following preparations, I install required packages and run interactive Python code to set up the LLM model. The process involves formatting a prompt template and creating a chain. I explore memory integration, adding a conversation buffer for context. The conversation with AI is initiated and continued through user inputs. Stay tuned for more explorations in upcoming posts!
2023
[Artificial Intelligence] Running LLaMA model locally
In this thorough guide, I prepared my Ubuntu machine (32GB) for the LLaMA (Language Model) build. Following Georgi Gergano's llama.cpp, I executed CMake commands, ensuring the correct tag and building the model successfully. I downloaded Microsoft's Phi2 model in GGUF format, enabling local execution without exposing prompts or data. Running the Phi2 model showcased its capabilities in a few-shot interaction, providing accurate responses. Additionally, I explored optional OpenBLAS integration for improved speed, offering insights into the installation and rebuild process.