Instructions to use Habibur2/Phi-3.5-mini-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Habibur2/Phi-3.5-mini-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Habibur2/Phi-3.5-mini-GGUF", filename="phi-3.5-mini-q4_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - llama-cpp-python
How to use Habibur2/Phi-3.5-mini-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Habibur2/Phi-3.5-mini-GGUF", filename="phi-3.5-mini-q4_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Habibur2/Phi-3.5-mini-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Habibur2/Phi-3.5-mini-GGUF:Q4_0
Use Docker
docker model run hf.co/Habibur2/Phi-3.5-mini-GGUF:Q4_0
- LM Studio
- Jan
- vLLM
How to use Habibur2/Phi-3.5-mini-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Habibur2/Phi-3.5-mini-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Habibur2/Phi-3.5-mini-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Habibur2/Phi-3.5-mini-GGUF:Q4_0
- Ollama
How to use Habibur2/Phi-3.5-mini-GGUF with Ollama:
ollama run hf.co/Habibur2/Phi-3.5-mini-GGUF:Q4_0
- Unsloth Studio
How to use Habibur2/Phi-3.5-mini-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Habibur2/Phi-3.5-mini-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Habibur2/Phi-3.5-mini-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Habibur2/Phi-3.5-mini-GGUF to start chatting
- Docker Model Runner
How to use Habibur2/Phi-3.5-mini-GGUF with Docker Model Runner:
docker model run hf.co/Habibur2/Phi-3.5-mini-GGUF:Q4_0
- Lemonade
How to use Habibur2/Phi-3.5-mini-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Habibur2/Phi-3.5-mini-GGUF:Q4_0
Run and chat with the model
lemonade run user.Phi-3.5-mini-GGUF-Q4_0
List all available models
lemonade list
Phi-3.5 Mini Instruct (GGUF Quantized)
This repository contains the GGUF quantized version of the Microsoft Phi-3.5 Mini Instruct model. It is optimized for low-resource devices (like mobile phones and older laptops) while maintaining high reasoning capabilities.
Model Creator: Microsoft
Quantized By: Habibur Rahman (Aasif)
Quantization Format: GGUF (Q4_0)
π Usage
You can run this model easily using the llama-cpp-python library.
1. Installation
First, install the necessary library. Ensure you have GPU support enabled for faster inference.
pip install llama-cpp-python huggingface_hub
- Python Code Example
Here is a simple script to download and run the model:
from huggingface_hub import hf_hub_download
from llama_cpp import Llama
# Download the GGUF model
model_path = hf_hub_download(
repo_id="Habibur2/Phi-3.5-mini-GGUF",
filename="phi-3.5-mini-q4_0.gguf"
)
# Load the model
# Set n_gpu_layers=-1 for full GPU usage (Requires CUDA)
# Set n_gpu_layers=0 if you only want to use CPU
llm = Llama(
model_path=model_path,
n_ctx=2048, # Context window
n_threads=4, # Number of CPU threads
n_gpu_layers=-1 # Offload all layers to GPU
)
# Run Inference
output = llm.create_chat_completion(
messages=[
{"role": "system", "content": "You are a helpful AI assistant."},
{"role": "user", "content": "Who is the founder of Microsoft?"}
],
max_tokens=512,
temperature=0.7
)
print(output['choices'][0]['message']['content'])
βοΈ Model Details Feature,Details Original Model,Phi-3.5 Mini Instruct Parameters,3.8 Billion Quantization,Q4_0 (4-bit) File Size,~2.18 GB Recommended RAM,4 GB+
π¨βπ» About the Author
Quantized and uploaded by Md Habibur Rahman. This model is intended for educational purposes and hackathon projects focusing on Edge AI and SLM (Small Language Models).
- Downloads last month
- 37
4-bit
Model tree for Habibur2/Phi-3.5-mini-GGUF
Base model
microsoft/Phi-3.5-mini-instruct