How to use a Microsoft Phi-4 Model

In this chapter, we will explore how to download and set up the Microsoft Phi-4 model for use with Ozeki AI Server. You will learn how to obtain the model from Hugging Face, configure it properly, and integrate it into the Ozeki AI Server for seamless operation. With its advanced reasoning capabilities and efficient performance, Phi-4 can enhance AI-driven applications while running on optimized hardware. By following this guide, you will be able to deploy and interact with the Phi-4 model through Ozeki AI Server effectively.

What is Microsoft Phi-4?

Microsoft Phi-4 is a small language model (SLM) with 14 billion parameters, designed for complex reasoning, mathematics, and logic-based tasks. It provides high efficiency while maintaining strong performance, making it a powerful alternative to larger AI models. Optimized for real-world applications, Phi-4 excels in problem-solving and natural language understanding. It is available on platforms like Azure AI, Hugging Face, and Ollama, allowing easy integration into various AI-powered systems.

What is Ozeki AI Server?

Ozeki AI Server is a software platform that combines artificial intelligence (AI) with communication systems, offering tools to develop and deploy AI-driven applications for businesses. It enables the automation of processes such as text messaging, voice calls, machine learning, and chatbots, streamlining communication workflows. By integrating AI with communication networks, Ozeki AI Server enhances customer support, optimizes operations, and improves user engagement across multiple industries.

How to download Microsoft Phi-4 model (Quick Steps)

  1. Go to the huggingface.co website
  2. Search for "phi 4 gguf"
  3. Click on "Files and versions"
  4. Click on "phi-4-q4.gguf"
  5. Download this .gguf file with the arrow pointing down

How to create Ozeki AI Server model and Chatbot (Quick Steps)

  1. Open Ozeki 10
  2. Launch the Ozeki AI Server
  3. Create new GGUF model, configure it
  4. Create new AI chatbot, configure it
  5. Have a good conversation with the chatbot

How to download Microsoft Phi-4 model (Video tutorial)

This video tutorial will show you how to download the Microsoft Phi-4 model from Huggingface.co and save it to the C:\AIModels directory on your computer. By following the step-by-step guide, you’ll be able to set up the model effortlessly and have it ready to use in no time.

Step 1 - Open Huggingface.co

First, go to the Huggingface website, then click on the search bar and search for "phi 4 gguf" (Figure 1).

Open Huggingface.co
Figure 1 - Open Huggingface.co

Step 2 - Select Microsoft Phi-4 model

Select the option "phi-4-gguf" and open it (Figure 2).

Select Microsoft Phi-4 model
Figure 2 - Select Microsoft Phi-4 model

Step 3 - Download model file

Click on the "Files and versions" tab, select the "phi-4-q4.gguf" version and download it, you can download with the down arrow (Figure 3).

Download model file
Figure 3 - Download model file

Step 4 - Copy model file to C:\AIModels folder

You have already downloaded the phi-4-q4.gguf file, then place it in the C:\AIModels folder (Figure 4).

Copy model file to AIModels folder
Figure 4 - Copy model file to C:\AIModels folder

Setup model and create AI Chat bot (Video tutorial)

In this video, we will guide you through the process of building and configuring the Ozeki AI Server model, along with setting up a chatbot that can communicate with users in natural language. You will learn about the installation steps, key configurations, and essential settings needed to ensure smooth operation. This tutorial will provide a step-by-step walkthrough, helping you successfully set up and optimize your AI-powered chatbot.

Step 5 - Open Ozeki AI Server

Launch the Ozeki 10 app. If you don't already have it, you can download it here. Once opened, open the Ozeki AI Server (Figure 5).

Open Ozeki AI Server
Figure 5 - Open Ozeki AI Server

Step 6 - Create new GGUF model

Ozeki AI Server appeared on the screen. Let's create a new GGUF model. Click on "AI Models" at the top of the screen. Click on the blue "Create a new AI Model" button. On the right side you will see different options, select the "GGUF" menu
(Figure 6).

Create new GGUF model
Figure 6 - Create new GGUF model

Step 7 - Select model file

After selecting the "GGUF" menu, select the "General" tab, under Indentification rename it to "phi4_Model_1" select the "C:\AIModels\phi-4-q4.gguf" Model file then click "Ok" (Figure 7).

Select model file
Figure 7 - Select model file

Step 8 - Create new AI Chatbot

At the top of the screen, select "AI bots". Press the blue "Create new AI Chat Bot" button, then select "AI Chat" on the right (Figure 8).

Create new AI Chatbot
Figure 8 - Create new AI Chatbot

Step 9 - Select model and create chatbot

Next, in the "AI Model" section, select the previously created "phi4_Model_1" and click "OK" (Figure 9).

Select model and create chatbot
Figure 9 - Select model and create chatbot

Step 10 - Enable Chatbot

To enable the chatbot, turn on the switch at "Status" and click on AI_Bot_1 (Figure 10).

Enable Chatbot
Figure 10 - Enable Chatbot

Step 11 - Conversation with AI model

By selecting AI_Bot_1 under the "Chat" tab, you can start a conversation with the chatbot (Figure 11).

Conversation with AI model
Figure 11 - Conversation with AI model

More information