Instructions to use AlessandroW/Phi-3-mini-128k-instruct-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AlessandroW/Phi-3-mini-128k-instruct-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AlessandroW/Phi-3-mini-128k-instruct-gguf", filename="Phi-3-mini-128k-instruct-Q4_K_M.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 AlessandroW/Phi-3-mini-128k-instruct-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
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 AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
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 AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
Use Docker
docker model run hf.co/AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use AlessandroW/Phi-3-mini-128k-instruct-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AlessandroW/Phi-3-mini-128k-instruct-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": "AlessandroW/Phi-3-mini-128k-instruct-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
- Ollama
How to use AlessandroW/Phi-3-mini-128k-instruct-gguf with Ollama:
ollama run hf.co/AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
- Unsloth Studio
How to use AlessandroW/Phi-3-mini-128k-instruct-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 AlessandroW/Phi-3-mini-128k-instruct-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 AlessandroW/Phi-3-mini-128k-instruct-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AlessandroW/Phi-3-mini-128k-instruct-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use AlessandroW/Phi-3-mini-128k-instruct-gguf with Docker Model Runner:
docker model run hf.co/AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
- Lemonade
How to use AlessandroW/Phi-3-mini-128k-instruct-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AlessandroW/Phi-3-mini-128k-instruct-gguf:Q4_K_M
Run and chat with the model
lemonade run user.Phi-3-mini-128k-instruct-gguf-Q4_K_M
List all available models
lemonade list
Model Summary
This repo provides the GGUF format for the Phi-3-Mini-128K-Instruct.
For more details check out the original model at microsoft/Phi-3-mini-128k-instruct.
The Phi-3-Mini-128K-Instruct is a 3.8 billion-parameter, lightweight, state-of-the-art open model trained using the Phi-3 datasets. This dataset includes both synthetic data and filtered publicly available website data, with an emphasis on high-quality and reasoning-dense properties. The model belongs to the Phi-3 family with the Mini version in two variants 4K and 128K which is the context length (in tokens) that it can support.
After initial training, the model underwent a post-training process that involved supervised fine-tuning and direct preference optimization to enhance its ability to follow instructions and adhere to safety measures. When evaluated against benchmarks that test common sense, language understanding, mathematics, coding, long-term context, and logical reasoning, the Phi-3 Mini-128K-Instruct demonstrated robust and state-of-the-art performance among models with fewer than 13 billion parameters. Resources and Technical Documentation:
Resources and Technical Documentation:
- Phi-3 Microsoft Blog
- Phi-3 Technical Report
- Phi-3 on Azure AI Studio
- Phi-3 on Hugging Face
- Phi-3 ONNX: 4K and 128K
This repo provides GGUF files and Llamafiles (d228e01d) for the Phi-3 Mini-128K-Instruct model.
| Name | Quant method | Bits | Size | Use case |
|---|---|---|---|---|
| Phi-3-mini-128k-instruct-Q4_K_M.gguf | Q4_K_M | 4 | 2.39 GB | medium, balanced quality - recommended |
| Phi-3-mini-128k-instruct-Q4_K_M.llamafile | Q4_K_M | 4 | 2.4 GB | medium, balanced quality - recommended |
| Phi-3-mini-128k-instruct-f16.gguf | None | 16 | 7.64 GB | minimal quality loss |
| Phi-3-mini-128k-instruct-f16.llamafile | None | 16 | 7.65 GB | minimal quality loss |
Note: When using the llamafile version make sure to specify the context size, e.g., ./Phi-3-mini-128k-instruct-Q4_K_M.llamafile -c 0 -p "your prompt".
License
The model is licensed under the MIT license.
- Downloads last month
- 69
4-bit
16-bit
Model tree for AlessandroW/Phi-3-mini-128k-instruct-gguf
Base model
microsoft/Phi-3-mini-128k-instruct