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
Upload folder using huggingface_hub
Browse files- README.md +5 -11
- phi-2-Q2_K.gguf +2 -2
- phi-2-Q3_K_L.gguf +2 -2
- phi-2-Q3_K_M.gguf +2 -2
- phi-2-Q3_K_S.gguf +2 -2
- phi-2-Q4_0.gguf +2 -2
- phi-2-Q4_K_M.gguf +2 -2
- phi-2-Q4_K_S.gguf +2 -2
- phi-2-Q5_0.gguf +2 -2
- phi-2-Q5_K_M.gguf +2 -2
- phi-2-Q5_K_S.gguf +2 -2
- phi-2-Q6_K.gguf +2 -2
- phi-2-Q8_0.gguf +2 -2
README.md
CHANGED
|
@@ -1,15 +1,11 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
- en
|
| 6 |
-
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
-
- nlp
|
| 9 |
-
- code
|
| 10 |
- TensorBlock
|
| 11 |
- GGUF
|
| 12 |
-
base_model:
|
| 13 |
---
|
| 14 |
|
| 15 |
<div style="width: auto; margin-left: auto; margin-right: auto">
|
|
@@ -23,13 +19,12 @@ base_model: microsoft/phi-2
|
|
| 23 |
</div>
|
| 24 |
</div>
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
-
This repo contains GGUF format model files for [
|
| 29 |
|
| 30 |
The files were quantized using machines provided by [TensorBlock](https://tensorblock.co/), and they are compatible with llama.cpp as of [commit b4011](https://github.com/ggerganov/llama.cpp/commit/a6744e43e80f4be6398fc7733a01642c846dce1d).
|
| 31 |
|
| 32 |
-
|
| 33 |
<div style="text-align: left; margin: 20px 0;">
|
| 34 |
<a href="https://tensorblock.co/waitlist/client" style="display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold;">
|
| 35 |
Run them on the TensorBlock client using your local machine ↗
|
|
@@ -38,7 +33,6 @@ The files were quantized using machines provided by [TensorBlock](https://tensor
|
|
| 38 |
|
| 39 |
## Prompt template
|
| 40 |
|
| 41 |
-
|
| 42 |
```
|
| 43 |
|
| 44 |
```
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
license_name: microsoft-research-license
|
| 4 |
+
license_link: LICENSE
|
|
|
|
|
|
|
| 5 |
tags:
|
|
|
|
|
|
|
| 6 |
- TensorBlock
|
| 7 |
- GGUF
|
| 8 |
+
base_model: susnato/phi-2
|
| 9 |
---
|
| 10 |
|
| 11 |
<div style="width: auto; margin-left: auto; margin-right: auto">
|
|
|
|
| 19 |
</div>
|
| 20 |
</div>
|
| 21 |
|
| 22 |
+
## susnato/phi-2 - GGUF
|
| 23 |
|
| 24 |
+
This repo contains GGUF format model files for [susnato/phi-2](https://huggingface.co/susnato/phi-2).
|
| 25 |
|
| 26 |
The files were quantized using machines provided by [TensorBlock](https://tensorblock.co/), and they are compatible with llama.cpp as of [commit b4011](https://github.com/ggerganov/llama.cpp/commit/a6744e43e80f4be6398fc7733a01642c846dce1d).
|
| 27 |
|
|
|
|
| 28 |
<div style="text-align: left; margin: 20px 0;">
|
| 29 |
<a href="https://tensorblock.co/waitlist/client" style="display: inline-block; padding: 10px 20px; background-color: #007bff; color: white; text-decoration: none; border-radius: 5px; font-weight: bold;">
|
| 30 |
Run them on the TensorBlock client using your local machine ↗
|
|
|
|
| 33 |
|
| 34 |
## Prompt template
|
| 35 |
|
|
|
|
| 36 |
```
|
| 37 |
|
| 38 |
```
|
phi-2-Q2_K.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7cdd6b914c0e5452036743d9da147b14e579ffeb092a9c4c6da3288f988c9328
|
| 3 |
+
size 1109719968
|
phi-2-Q3_K_L.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:340f906aa21921be6dbd33d471702055461f915668901a169b243a5b19235b12
|
| 3 |
+
size 1575230368
|
phi-2-Q3_K_M.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:72ec700e0a8217b12c5c9be65be900fd507d8c1c8f5653a6cbb813a6e3ed5873
|
| 3 |
+
size 1426135968
|
phi-2-Q3_K_S.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b0dee54a1e218d78808ab3ceb4e02b6e808d8672f39ee7caf43975a5cc89017
|
| 3 |
+
size 1250827168
|
phi-2-Q4_0.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2c6a89ff9d61b3ae4afa4045de7dba608e67565c003d3bfbb164050d077e1768
|
| 3 |
+
size 1602468768
|
phi-2-Q4_K_M.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba75e23a235892d3a6c122108d5f1a6108f90d36d507f798f330b47b71778a86
|
| 3 |
+
size 1737636768
|
phi-2-Q4_K_S.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4d88305a75369c1a4331c9fc92aec40394713ae51abdc74c85ebc73ad4f01bf
|
| 3 |
+
size 1618852768
|
phi-2-Q5_0.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:20b5bc573ea3cc1f15951a84b0293b2205720263294e5594394a2a9ecd4e4180
|
| 3 |
+
size 1933425568
|
phi-2-Q5_K_M.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f25c41f7ddc0db90690b8281526b16b3c7a33d8c77533692158fb33efe14053e
|
| 3 |
+
size 2003057568
|
phi-2-Q5_K_S.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1ecdd72a4eddbf4f29deb3df073cc7bcafc09c4db4a688965a030efdcff4a685
|
| 3 |
+
size 1933425568
|
phi-2-Q6_K.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:23ee71e08f9540b2da1563be9f705aaa025c5b5e00e88be676f0f9734d6cde44
|
| 3 |
+
size 2285067168
|
phi-2-Q8_0.gguf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:128570e8b4215f8297439c43c3bb5f65176805560b08901802a73cbfc32ac1d1
|
| 3 |
+
size 2958039968
|