Getting Started with AI
Author: Lance Wright (Magic Coding Man)
Published: October 09, 2024
If you're looking to explore how to utilize AI, or you're interested in integrating AI into your projects, the first step is to experiment with it! Learning AI is not only essential but also incredibly fun. This article shares tips, resources, and advice that I wish I had when I first started with AI.
Let’s begin by discussing large language models (LLMs)—these are often what people think of when they talk about AI. But did you know that you can run AI models locally on your computer? You can, and you should start today! Experimenting with AI on your own machine is a fantastic way to learn.
LLMs: Setting Up Locally
One of the best tools for experimenting with LLMs is Oobabooga's Text Generation Web GUI. It’s an open-source project that makes running AI models locally easy. It walks you through installation and helps guide decisions based on your hardware.
Follow the installation steps, and I recommend using Python version 3.10.6, which you can download here. This version will also be useful for other AI projects. Once you're set up, check out the Open LLM Leaderboard, which ranks models and provides download links.
Recommended LLM Model: Phi 3.5 Mini
While learning, I suggest starting with a small model like Phi 3.5 Mini. It’s lightweight and can run on almost any hardware, making it perfect for beginners. As you get more comfortable, you can explore larger models and resources like the article on Running AI Locally and Hardware Essentials.
The key is to play around with Oobabooga’s Web GUI to chat with AI models quickly, privately, and on your own machine!
AI Image Generation: Automatic1111
The next exciting area of AI is image generation, which is evolving fast. Right now, one of the best tools is the Automatic1111 Stable Diffusion Web GUI. It’s an open-source project that allows you to generate images using AI.
For models, visit CivitAI, a fantastic resource for downloading free AI models. While there’s growing talk about other systems like "Flux" for image generation, this guide should remain relevant as it covers essential techniques like positive and negative prompts and LoRA models.
Bringing AI to Production with ONNX
Now, how do you take these AI tools and integrate them into production applications? Python is great for experimentation, but in production, languages like C# and C++ are more common. To bridge this gap, we need to convert AI models into the ONNX format.
ONNX is not only compatible with multiple programming languages, but it also allows you to optimize models by adjusting their precision. For example, using INT4 precision can significantly reduce model size without sacrificing much accuracy. This makes ONNX ideal for production environments where efficiency is key.
Conclusion: Learn, Experiment, and Have Fun!
ONNX and production-level AI are advanced topics, so I recommend starting with the open-source projects mentioned above. Learn the basics of AI with safe tensor models, and explore key concepts like seeds and temperature settings. Most importantly, have fun with AI models!
And if you're feeling adventurous, try out more experimental models like Phi 3.5 Mini Uncensored. Running AI locally lets you explore unfiltered models and gives you full control over your AI experience.