Instructions to use tensorblock/gpt2-medium-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tensorblock/gpt2-medium-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/gpt2-medium-GGUF", filename="gpt2-medium-Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tensorblock/gpt2-medium-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/gpt2-medium-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/gpt2-medium-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/gpt2-medium-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/gpt2-medium-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/gpt2-medium-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/gpt2-medium-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/gpt2-medium-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/gpt2-medium-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/gpt2-medium-GGUF:Q2_K
- LM Studio
- Jan
- Ollama
How to use tensorblock/gpt2-medium-GGUF with Ollama:
ollama run hf.co/tensorblock/gpt2-medium-GGUF:Q2_K
- Unsloth Studio
How to use tensorblock/gpt2-medium-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/gpt2-medium-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/gpt2-medium-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/gpt2-medium-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/gpt2-medium-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/gpt2-medium-GGUF:Q2_K
- Lemonade
How to use tensorblock/gpt2-medium-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/gpt2-medium-GGUF:Q2_K
Run and chat with the model
lemonade run user.gpt2-medium-GGUF-Q2_K
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +12 -0
- README.md +71 -0
- gpt2-medium-Q2_K.gguf +3 -0
- gpt2-medium-Q3_K_L.gguf +3 -0
- gpt2-medium-Q3_K_M.gguf +3 -0
- gpt2-medium-Q3_K_S.gguf +3 -0
- gpt2-medium-Q4_0.gguf +3 -0
- gpt2-medium-Q4_K_M.gguf +3 -0
- gpt2-medium-Q4_K_S.gguf +3 -0
- gpt2-medium-Q5_0.gguf +3 -0
- gpt2-medium-Q5_K_M.gguf +3 -0
- gpt2-medium-Q5_K_S.gguf +3 -0
- gpt2-medium-Q6_K.gguf +3 -0
- gpt2-medium-Q8_0.gguf +3 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,15 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
gpt2-medium-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gpt2-medium-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
gpt2-medium-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
gpt2-medium-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
gpt2-medium-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
gpt2-medium-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
gpt2-medium-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
gpt2-medium-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
gpt2-medium-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
gpt2-medium-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
gpt2-medium-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
gpt2-medium-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language: en
|
| 3 |
+
license: mit
|
| 4 |
+
base_model: openai-community/gpt2-medium
|
| 5 |
+
tags:
|
| 6 |
+
- TensorBlock
|
| 7 |
+
- GGUF
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
<div style="width: auto; margin-left: auto; margin-right: auto">
|
| 11 |
+
<img src="https://i.imgur.com/jC7kdl8.jpeg" alt="TensorBlock" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
| 12 |
+
</div>
|
| 13 |
+
<div style="display: flex; justify-content: space-between; width: 100%;">
|
| 14 |
+
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
| 15 |
+
<p style="margin-top: 0.5em; margin-bottom: 0em;">
|
| 16 |
+
Feedback and support: TensorBlock's <a href="https://x.com/tensorblock_aoi">Twitter/X</a>, <a href="https://t.me/TensorBlock">Telegram Group</a> and <a href="https://x.com/tensorblock_aoi">Discord server</a>
|
| 17 |
+
</p>
|
| 18 |
+
</div>
|
| 19 |
+
</div>
|
| 20 |
+
|
| 21 |
+
## openai-community/gpt2-medium - GGUF
|
| 22 |
+
|
| 23 |
+
This repo contains GGUF format model files for [openai-community/gpt2-medium](https://huggingface.co/openai-community/gpt2-medium).
|
| 24 |
+
|
| 25 |
+
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).
|
| 26 |
+
|
| 27 |
+
## Prompt template
|
| 28 |
+
|
| 29 |
+
```
|
| 30 |
+
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
## Model file specification
|
| 34 |
+
|
| 35 |
+
| Filename | Quant type | File Size | Description |
|
| 36 |
+
| -------- | ---------- | --------- | ----------- |
|
| 37 |
+
| [gpt2-medium-Q2_K.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q2_K.gguf) | Q2_K | 0.166 GB | smallest, significant quality loss - not recommended for most purposes |
|
| 38 |
+
| [gpt2-medium-Q3_K_S.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q3_K_S.gguf) | Q3_K_S | 0.188 GB | very small, high quality loss |
|
| 39 |
+
| [gpt2-medium-Q3_K_M.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q3_K_M.gguf) | Q3_K_M | 0.213 GB | very small, high quality loss |
|
| 40 |
+
| [gpt2-medium-Q3_K_L.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q3_K_L.gguf) | Q3_K_L | 0.227 GB | small, substantial quality loss |
|
| 41 |
+
| [gpt2-medium-Q4_0.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q4_0.gguf) | Q4_0 | 0.231 GB | legacy; small, very high quality loss - prefer using Q3_K_M |
|
| 42 |
+
| [gpt2-medium-Q4_K_S.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q4_K_S.gguf) | Q4_K_S | 0.233 GB | small, greater quality loss |
|
| 43 |
+
| [gpt2-medium-Q4_K_M.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q4_K_M.gguf) | Q4_K_M | 0.252 GB | medium, balanced quality - recommended |
|
| 44 |
+
| [gpt2-medium-Q5_0.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q5_0.gguf) | Q5_0 | 0.272 GB | legacy; medium, balanced quality - prefer using Q4_K_M |
|
| 45 |
+
| [gpt2-medium-Q5_K_S.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q5_K_S.gguf) | Q5_K_S | 0.272 GB | large, low quality loss - recommended |
|
| 46 |
+
| [gpt2-medium-Q5_K_M.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q5_K_M.gguf) | Q5_K_M | 0.288 GB | large, very low quality loss - recommended |
|
| 47 |
+
| [gpt2-medium-Q6_K.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q6_K.gguf) | Q6_K | 0.316 GB | very large, extremely low quality loss |
|
| 48 |
+
| [gpt2-medium-Q8_0.gguf](https://huggingface.co/tensorblock/gpt2-medium-GGUF/tree/main/gpt2-medium-Q8_0.gguf) | Q8_0 | 0.407 GB | very large, extremely low quality loss - not recommended |
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
## Downloading instruction
|
| 52 |
+
|
| 53 |
+
### Command line
|
| 54 |
+
|
| 55 |
+
Firstly, install Huggingface Client
|
| 56 |
+
|
| 57 |
+
```shell
|
| 58 |
+
pip install -U "huggingface_hub[cli]"
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
Then, downoad the individual model file the a local directory
|
| 62 |
+
|
| 63 |
+
```shell
|
| 64 |
+
huggingface-cli download tensorblock/gpt2-medium-GGUF --include "gpt2-medium-Q2_K.gguf" --local-dir MY_LOCAL_DIR
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
If you wanna download multiple model files with a pattern (e.g., `*Q4_K*gguf`), you can try:
|
| 68 |
+
|
| 69 |
+
```shell
|
| 70 |
+
huggingface-cli download tensorblock/gpt2-medium-GGUF --local-dir MY_LOCAL_DIR --local-dir-use-symlinks False --include='*Q4_K*gguf'
|
| 71 |
+
```
|
gpt2-medium-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f39336ace732d05ce8b441f3fd08c1d7c73f1e5dbad01a21f72aa766cf38b8a
|
| 3 |
+
size 178236064
|
gpt2-medium-Q3_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:06aa0a8543077a2aa7c2c2a9c4cfb54cf46866cfeefb045d64057581bd45ff5d
|
| 3 |
+
size 243821440
|
gpt2-medium-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb8303823d203cb0551bcd3e307718d382382b5f12c8d6bd0374eda9896f85a6
|
| 3 |
+
size 228617088
|
gpt2-medium-Q3_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:069ffb9d25ac065cc076d78fa2a82e49e44b461638e368a1dbb8f6db6142b156
|
| 3 |
+
size 201354112
|
gpt2-medium-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4d7d3da808c61fc1fa6ea2dad797504ba275e8392baaf3594af34b9a0a734f9f
|
| 3 |
+
size 248297088
|
gpt2-medium-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:be8f94db64ddd4636f70899eb767a4cbe7852025cf5f2dc54313f86613dd1adb
|
| 3 |
+
size 270710400
|
gpt2-medium-Q4_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fcd3ecac96d3658ff619e766a1eca185e115f4b25efdefa53abad86017ef697a
|
| 3 |
+
size 249869952
|
gpt2-medium-Q5_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02f599375450fe65ff00efdaf0372bae892c9d30840b405c05a55e55ea534db3
|
| 3 |
+
size 292478720
|
gpt2-medium-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:02d5218f3df0b6dbdd9f994dedf9181c343ecdcc9fab2c8851b3c2348367b5b8
|
| 3 |
+
size 309190400
|
gpt2-medium-Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:12d504874cfe7fd2c6ddf8ac7e306bc11bec8c690bf9743816cb3894e531fd89
|
| 3 |
+
size 292478720
|
gpt2-medium-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a13966df715ea45402998280236bfd8f029cac6424ba48716b3e1fe7fde016f5
|
| 3 |
+
size 339421728
|
gpt2-medium-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb994b75e16aef2ad0a1c92bd5a160a4601b14d257e5e1a2e80cc6e2ff71f667
|
| 3 |
+
size 437487328
|