Instructions to use tensorblock/phi-2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tensorblock/phi-2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/phi-2-GGUF", filename="phi-2-Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use tensorblock/phi-2-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/phi-2-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/phi-2-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf tensorblock/phi-2-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/phi-2-GGUF:Q2_K
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 tensorblock/phi-2-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/phi-2-GGUF:Q2_K
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 tensorblock/phi-2-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/phi-2-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/phi-2-GGUF:Q2_K
- LM Studio
- Jan
- Ollama
How to use tensorblock/phi-2-GGUF with Ollama:
ollama run hf.co/tensorblock/phi-2-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/phi-2-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 tensorblock/phi-2-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 tensorblock/phi-2-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for tensorblock/phi-2-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/phi-2-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/phi-2-GGUF:Q2_K
- Lemonade
How to use tensorblock/phi-2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/phi-2-GGUF:Q2_K
Run and chat with the model
lemonade run user.phi-2-GGUF-Q2_K
List all available models
lemonade list
Remove .gguf files (keep Q2_K.gguf)
Browse files- phi-2-Q3_K_L.gguf +0 -3
- phi-2-Q3_K_M.gguf +0 -3
- phi-2-Q3_K_S.gguf +0 -3
- phi-2-Q4_0.gguf +0 -3
- phi-2-Q4_K_M.gguf +0 -3
- phi-2-Q4_K_S.gguf +0 -3
- phi-2-Q5_0.gguf +0 -3
- phi-2-Q5_K_M.gguf +0 -3
- phi-2-Q5_K_S.gguf +0 -3
- phi-2-Q6_K.gguf +0 -3
- phi-2-Q8_0.gguf +0 -3
phi-2-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:340f906aa21921be6dbd33d471702055461f915668901a169b243a5b19235b12
|
| 3 |
-
size 1575230368
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q3_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:72ec700e0a8217b12c5c9be65be900fd507d8c1c8f5653a6cbb813a6e3ed5873
|
| 3 |
-
size 1426135968
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6b0dee54a1e218d78808ab3ceb4e02b6e808d8672f39ee7caf43975a5cc89017
|
| 3 |
-
size 1250827168
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:2c6a89ff9d61b3ae4afa4045de7dba608e67565c003d3bfbb164050d077e1768
|
| 3 |
-
size 1602468768
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ba75e23a235892d3a6c122108d5f1a6108f90d36d507f798f330b47b71778a86
|
| 3 |
-
size 1737636768
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a4d88305a75369c1a4331c9fc92aec40394713ae51abdc74c85ebc73ad4f01bf
|
| 3 |
-
size 1618852768
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:20b5bc573ea3cc1f15951a84b0293b2205720263294e5594394a2a9ecd4e4180
|
| 3 |
-
size 1933425568
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f25c41f7ddc0db90690b8281526b16b3c7a33d8c77533692158fb33efe14053e
|
| 3 |
-
size 2003057568
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1ecdd72a4eddbf4f29deb3df073cc7bcafc09c4db4a688965a030efdcff4a685
|
| 3 |
-
size 1933425568
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:23ee71e08f9540b2da1563be9f705aaa025c5b5e00e88be676f0f9734d6cde44
|
| 3 |
-
size 2285067168
|
|
|
|
|
|
|
|
|
|
|
|
phi-2-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:128570e8b4215f8297439c43c3bb5f65176805560b08901802a73cbfc32ac1d1
|
| 3 |
-
size 2958039968
|
|
|
|
|
|
|
|
|
|
|
|