Categories
News

LM Studio makes it easy to run AI models locally on your PC, Mac

LM Studio makes it easy to run AI models locally on your PC Mac and Linux

If you are interested in trying out the latest AI models and large language models that have been trained in different ways. Or would simply like one of the open source AI models running locally on your home network. Assisting you with daily tasks. You will be pleased to know that it is really easy to run LLM and hence AI Agents on your local computer without the need for third-party servers. Obviously the more powerful your laptop or desktop computer have the better, but as long as you have 8GB of RAM as a minimum you should be able to run at least one or two smaller AI models such as Mistral and others.

Running AI models locally opens up opportunities for individuals and small businesses to experiment and innovate with AI without the need for expensive servers or cloud-based solutions. Whether you’re a student, an AI enthusiast, or a professional researcher, you can now easily run AI models on your PC, Mac, or Linux machine.

One of the most user-friendly tools for this purpose is LM Studio, a software that allows you to install and use a variety of AI models. With a straightforward installation process, you can have LM Studio set up on your computer in no time. It supports a wide range of operating systems, including Windows, macOS, and Linux, making it accessible to a broad spectrum of users.

The user interface of LM Studio is designed with both beginners and advanced users in mind. The advanced features are neatly tucked away, so they don’t overwhelm new users but are easily accessible for those who need them. For instance, you can customize options and presets to tailor the software to your specific needs.

LM Studio dashboard

LM Studio dashboard chat box

Other articles we have written that you may find of interest on the subject of running AI models locally

LM Studio supports several AI models, including large language models. It even allows for running quantized models in GF format, providing a more efficient way to run these models on your computer. The flexibility to download and add different models is another key feature. Whether you’re interested in NLP, image recognition, or any other AI application, you can find a model that suits your needs.

Search for  AI models and LLMs

LM Studio dashboard

AVX2 support required

Your computer will need to support AVX2 here are a few ways to check what CPU or system is running. Once you know you can then do a quick search to see if the specifications list support for AVX2. You can also ask ChatGPT once you know your CPU.  obviously CPUs after it’s OpenAI’s cut-off date are most likely to support AVX2.

Windows:

  1. Open the Command Prompt.
  2. Run the command systeminfo.
  3. Look for your CPU model in the displayed information, then search for that specific CPU model online to find its specifications.

macOS:

  1. Go to the Apple Menu -> About This Mac -> System Report.
  2. Under “Hardware,” find the “Total Number of Cores” and “Processor Name.”
  3. Search for that specific CPU model online to check its specifications.

Linux:

  1. Open the Terminal.
  2. Run the command lscpu or cat /proc/cpuinfo.
  3. Check for the flag avx2 in the output.

Software Utility:

You can use third-party software like CPU-Z (Windows) or iStat Menus (macOS) to see detailed specifications of your CPU, including AVX2 support.

Vendor Websites:

Visit the CPU manufacturer’s website and look up your CPU model. Detailed specifications should list supported instruction sets.

Direct Hardware Check:

If you have the skill and comfort level to do so, you can directly check the CPU’s markings and then refer to vendor specifications.

For Windows users with an M2 drive, LM Studio can be run on this high-speed storage device, providing enhanced performance. However, as mentioned before, regardless of your operating system, one crucial factor to consider is the RAM requirement. As a rule of thumb, a minimum of 8 GB of RAM is recommended to run smaller AI models such as Mistral. Larger models may require more memory, so it’s important to check the specifications of the models you’re interested in using.

In terms of model configuration and inference parameters, LM Studio offers a range of options. You can tweak these settings to optimize the performance of your models, depending on your specific use case. This level of control allows you to get the most out of your AI models, even when running them on a personal computer.

One of the most powerful features of LM Studio is the ability to create a local host and serve your model through an API. This means you can integrate your model into other applications or services, providing a way to operationalize your AI models. This feature transforms LM Studio from a mere tool for running AI models locally into a platform for building and deploying AI-powered applications.

Running AI models locally on your PC, Mac, or Linux machine is now easier than ever. With tools like LM Studio, you can experiment with different models, customize your settings, and even serve your models through an API. Whether you’re a beginner or a seasoned AI professional, these capabilities open up a world of possibilities for innovation and exploration in the field of AI.

Filed Under: Guides, Top News





Latest timeswonderful Deals

Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, timeswonderful may earn an affiliate commission. Learn about our Disclosure Policy.

Categories
News

Easily install custom AI Models locally with Ollama

Easily install custom AI Models locally with Ollama

If you are just getting started with large language models and would like to easily install different AI models currently available you should deftly check out Ollama. It’s really easy-to-use and takes just a few minutes to install and set up your first large language model. One word of warning is that your computer will need at least 8GB RAM and as much as you can spare for some models, as LLMs use large amounts of memory for each request.

Ollama currently supports easy installation of a wide variety of AI models including : llama 2, llama 2-uncensored, codellama, codeup, everythinglm, falcon, llama2-chinese, mistral, mistral-openorca, samantha-mistral, stable-beluga, wizardcoder and more. however you can also install custom AI models locally with Ollama as well.

Installing custom AI models locally with Ollama

Ollama is an AI model management tool that allows users to easily install and use custom models. One of the key benefits of Ollama is its versatility. While it comes pre-loaded with a variety of models, it also allows users to install custom models that are not available in the Ollama library. This opens up a world of possibilities for developers and researchers to experiment with different models and fine-tunes.

Other articles we have written that you may find of interest on the subject of Ollama :

One such custom model that can be installed in Ollama is Jackalope. Jackalope is a 7B model, a fine-tuning of the Mistral 7B model. It is recommended to get the quantized version of the model, specifically in GGUF format. Formerly known as GGML, GGUF is a quantized version of models used by the project LLaMA CPP, which Ollama uses for models.

The process of installing Jackalope, or any other custom model in Ollama, starts with downloading the model and placing it in a model’s folder for processing. Once the model is downloaded, the next step is to create a model file. This file includes parameters and points to the downloaded file. It also includes a template for a system prompt that users can fill out when running the model.

After creating and saving the model file, the process of creating a model using the model file begins. This process includes passing the model file, creating various layers, writing the weights, and finally, seeing a success message. Once the process is complete, the new model, in this case, Jackalope, can be seen in the model list and run just like any other model.

While Ollama offers a significant degree of flexibility in terms of the models it can handle, it’s important to note that some models may not work. However, fine-tunes of LLaMA2, Mistral 7B, and Falcon models should work. This limitation, while it may seem restrictive, still allows users to try out a vast array of different models from the hugging face hub.

Ollama provides a user-friendly platform for installing and using custom AI models. The process, while it may seem complex at first glance, is straightforward and allows users to experiment with a variety of models. Whether it’s the Jackalope model or any other custom model, the possibilities are vast with Ollama. However, users should be aware of potential limitations with some models and ensure they are using compatible models for optimal performance.

Filed Under: Guides, Top News





Latest timeswonderful Deals

Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, timeswonderful may earn an affiliate commission. Learn about our Disclosure Policy.

Categories
News

How to read and process PDFs locally using Mistral AI

How to read and process PDFs locally using Mistral AI model

If you would prefer to keep your PDF documents, receipts or personal information out of the hands of third-party companies such as OpenAI, Microsoft, Google and others. You will be pleased to know that you curb process and read PDFs on your own computer or personal or private network using the Mistral AI model.

Over the last 18 months or so artificial intelligence (AI) has seen significant advancements, particularly in the realm of document processing, thanks to large language models being able to read. One such advancement is the use of AI to read and process PDF documents locally. This guide will provide more details on how you can keep your PDF documents safe and secure by processing them on your own computer or local network. Using Katana ML’s open source library to process PDF documents locally with the Mistral AI model.

“Mistral-7B-v0.1 is a small, yet powerful model adaptable to many use-cases. Mistral 7B is better than Llama 2 13B on all benchmarks, has natural coding abilities, and 8k sequence length. It’s released under Apache 2.0 licence, and we made it easy to deploy on any cloud.”

Katana ML is an open source MLOps infrastructure that can be used in the cloud or on-premise. It offers state-of-the-art machine learning APIs that cater to a wide array of use-cases. One such application is the processing of PDF documents using the Mistral 7B model. This model, despite being small in size, boasts impressive performance metrics and adaptability.

How to read and process PDFs locally using Mistral AI

Other articles we have written that you may find of interest on the subject of Mistral AI :

Mistral 7B is a 7.3 billion parameter model that outperforms its counterparts, Llama 2 13B and Llama 1 34B, on various benchmarks. It even approaches CodeLlama 7B performance on code while maintaining proficiency in English tasks. The model uses Grouped-query attention (GQA) for faster inference and Sliding Window Attention (SWA) to handle longer sequences at a smaller cost. The model is released under the Apache 2.0 license and can be used without restrictions.

The process of using this model to read and process PDFs locally can be executed on platforms like Google Colab or a local machine. The choice between these two depends on the user’s preference and needs. Google Colab offers the advantage of cloud-based processing, eliminating the need for high-end hardware. However, it also comes with limitations, such as a restricted amount of free GPU usage. On the other hand, using a local machine allows for greater control and customization. However, the processing speed might be slower due to hardware limitations.

How to read and process PDFs locally using Mistral AI

To illustrate the process, let’s consider a PDF invoice example. The first step involves cloning the repository from Katana ML and installing the necessary requirements. The user then downloads a quantized model based on the system’s RAM capacity. The configuration file is then edited to optimize speed and quality. The data from the PDF is converted into embeddings and stored in Vector DB, a process known as data injection. The main.py file is then run to ask questions and get answers based on the processed data.

Despite its impressive capabilities, the Mistral AI model is not without its limitations. The processing speed can be slow due to the limitations of current technology. Furthermore, like any AI model, Mistral 7B is not immune to “hallucinations” or mistakes. These are instances where the AI generates incorrect or nonsensical responses.

However, the potential applications of this technology are vast. For example, it can be used to extract structured information from unstructured documents, like invoices or contracts. This can significantly streamline processes in industries like finance, law, and administration.

Looking forward, there are several possibilities for optimization and improvements. For instance, further fine-tuning of the model could enhance its performance. Additionally, advancements in hardware technology could significantly speed up the processing time.

Using Katana ML’s open source library to process PDF documents locally with the Mistral AI model is a promising application of AI technology. Despite its current limitations, it offers a glimpse into the future of document processing and the potential of AI in transforming mundane tasks into automated processes.

Filed Under: Guides, Top News





Latest timeswonderful Deals

Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, timeswonderful may earn an affiliate commission. Learn about our Disclosure Policy.

Categories
News

How to install Ollama LLM locally to run Llama 2, Code Llama

How to install Ollama locally to run Llama 2 and other LLm models

Large language models (LLMs) have become a cornerstone for various applications, from text generation to code completion. However, running these models locally can be a daunting task, especially for those who are not well-versed in the technicalities of AI.  This is where Ollama comes into play.

Ollama is a user-friendly tool designed to run large language models locally on a computer, making it easier for users to leverage the power of LLMs. This article will provide a comprehensive guide on how to install and use Ollama to run Llama 2, Code Llama, and other LLM models.

Ollama is a tool that supports a variety of AI models including LLaMA-2, uncensored LLaMA, CodeLLaMA, Falcon, Mistral, Vicuna model, WizardCoder, and Wizard uncensored. It is currently compatible with MacOS and Linux, with Windows support expected to be available soon. Ollama operates through the command line on a Mac or Linux machine, making it a versatile tool for those comfortable with terminal-based operations.

Easily install and use Ollama locally

One of the unique features of Ollama is its support for importing GGUF and GGML file formats in the Modelfile. This means if you have a model that is not in the Ollama library, you can create it, iterate on it, and upload it to the Ollama library to share with others when you are ready.

 

 

Installation and Setup of Ollama

To use Ollama, users first need to download it from the official website. After downloading, the installation process is straightforward and similar to other software installations. Once installed, Ollama creates an API where it serves the model, allowing users to interact with the model directly from their local machine.

Downloading and Running Models Using Ollama

Running models using Ollama is a simple process. Users can download and run models using the ‘run’ command in the terminal. If the model is not installed, Ollama will automatically download it first. This feature saves users from the hassle of manually downloading and installing models, making the process more streamlined and user-friendly.

Creating Custom Prompts with Ollama

Ollama also allows users to create custom prompts, adding a layer of personalization to the models. For instance, a user can create a model called ‘Hogwarts’ with a system prompt set to answer as Professor Dumbledore from Harry Potter. This feature opens up a world of possibilities for users to customize their models according to their specific needs and preferences.

Removing Models from Ollama

Just as adding models is easy with Ollama, removing them is equally straightforward. Users can remove models using the ‘remove’ command in the terminal. This feature ensures that users can manage their models efficiently, keeping their local environment clean and organized.

Ollama is a powerful tool that simplifies the process of running large language models locally. Whether you want to run Llama 2, Code Llama, or any other LLM model, Ollama provides a user-friendly platform to do so. With its support for custom prompts and easy model management, Ollama is set to become a go-to tool for AI enthusiasts and professionals alike. As we await the Windows version, Mac and Linux users can start exploring the world of large language models with Ollama.

Filed Under: Guides, Top News





Latest timeswonderful Deals

Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, timeswonderful may earn an affiliate commission. Learn about our Disclosure Policy.