Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

How to run models likst Mistral-7B and Llama using Ollama on M1/M2 Mac?

Description

This project will show you how to setup with Ollama on Apple MacBooks and also how to run python scripts to call the Mistral or Llama2 using API.

Installation

Install Ollama on your Mac

  1. Visit this official Ollama Website
  2. Click on the "Download" Button.
  3. Once Ollama is downloaded on your mac. Move it to your Applications folder and run it through Spotlight search.
  4. Now open the terminal and type
ollama run mistral

It will take a few minutes to download and run the mistral model.

  1. Once the download is done and you see ">>>", start chatting with the mistral model to see if everything is fine.

  2. You can also download llama2 model by typing in your terminal

ollama run llama2
  1. Some commands to interact with ollama using terminal

    • To see all the downloaded models:
      ollama list
      
    • To run a model:
      ollama run
      
    • To delete a model:
      ollama rm
      

To run the ollama models using python scripts

Install the project by following these steps:

  1. Clone the repository:
    git clone https://github.com/UsmanQT/Ollama-Mistral.git
    
  2. Navigate to the project directory if not already. Otherwise skip this step:
    cd Ollama-Mistral
    

Usage

To use the project, follow these steps:

  1. Run the python script:

    python3 mistral-ollama.py
    
  2. Enter prompt: "Hey how are you doing?"

  3. You can change the model's name to "llama2" in the curl command if you wish to use llama2.

Wonderful !! You just ran models from Ollama on your local MacBook

Contact

For inquiries, please contact:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages