Exploring Microsoft Phi-3: How to Download and Use?

What is Phi-3?

On 04/23, Microsoft announced the release of the Phi-3 series of artificial intelligence models, which is the smallest AI model the company has created to date. The Phi-3 model, as the most powerful and cost-effective small language model currently available, owes its excellence to the innovative training techniques developed by Microsoft researchers. Phi-3 has demonstrated outstanding performance in various benchmark tests, including language evaluation, encoding, and mathematical capability assessment, surpassing models of the same size or even larger.

Advantages of Phi-3?

Currently, Microsoft has only released the Mini version, which contains 3.8 billion parameters, outperforming models twice its size, and it can even run on mobile phones! 

The Phi-3 model will be available on the Microsoft Azure AI model directory, Hugging Face (a machine learning model platform), and Ollama (a lightweight framework for running models on local computers). Additionally, it will be provided as an NVIDIA NIM microservice with standard API interfaces for deployment anywhere. 

Microsoft has also announced the upcoming release of other models in the Phi-3 series to offer more choices. Phi-3-small (7 billion parameters) and Phi-3-medium (14 billion parameters) are expected to be available soon in the Azure AI model directory and other model platforms.

How to Download, Install, and Use Phi-3 Mini?

1. Download LM Studio

First, you need to download and install LM Studio. You can visit the LM Studio official website (lmstudio.ai) to download the version suitable for your operating system.

2. Log in to Hugging Face

Enter “huggingface. co” in your browser to access the website, or directly visit the link https://huggingface.co/collections/microsoft/phi-3-6626e15e9585a200d2d761e3.

3. Download the Phi-3 Mini Model

Enter "Phi-3" in the search box and search. In the search results, find the model named microsoft/Phi-3-mini-4k-instruct-gguf, select and download the latest version, usually labeled as "latest" or a specific version number, such as Q4, as it is only 2.32GB. 

Please note:Some versions of Phi-3 7B Mini may be optimized for performance, such as providing faster processing speeds or lower resource consumption, so please choose the appropriate version according to your needs.

4. Start Using the Phi-3 Mini Model

Once the model is downloaded and installed, you can start using the Phi-3 Mini model immediately. In LM Studio, click on the "AI Chat" tab in the left menu, then select the Phi-3 Mini model from the model selection bar at the top, and you can start using it.