Instructions to use bartowski/Yi-9B-Coder-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bartowski/Yi-9B-Coder-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bartowski/Yi-9B-Coder-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bartowski/Yi-9B-Coder-GGUF", dtype="auto") - llama-cpp-python
How to use bartowski/Yi-9B-Coder-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="bartowski/Yi-9B-Coder-GGUF", filename="Yi-9B-Coder-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 bartowski/Yi-9B-Coder-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf bartowski/Yi-9B-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/Yi-9B-Coder-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 bartowski/Yi-9B-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf bartowski/Yi-9B-Coder-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 bartowski/Yi-9B-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf bartowski/Yi-9B-Coder-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 bartowski/Yi-9B-Coder-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf bartowski/Yi-9B-Coder-GGUF:Q4_K_M
Use Docker
docker model run hf.co/bartowski/Yi-9B-Coder-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use bartowski/Yi-9B-Coder-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bartowski/Yi-9B-Coder-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/Yi-9B-Coder-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bartowski/Yi-9B-Coder-GGUF:Q4_K_M
- SGLang
How to use bartowski/Yi-9B-Coder-GGUF with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "bartowski/Yi-9B-Coder-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/Yi-9B-Coder-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "bartowski/Yi-9B-Coder-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bartowski/Yi-9B-Coder-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use bartowski/Yi-9B-Coder-GGUF with Ollama:
ollama run hf.co/bartowski/Yi-9B-Coder-GGUF:Q4_K_M
- Unsloth Studio new
How to use bartowski/Yi-9B-Coder-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 bartowski/Yi-9B-Coder-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 bartowski/Yi-9B-Coder-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for bartowski/Yi-9B-Coder-GGUF to start chatting
- Docker Model Runner
How to use bartowski/Yi-9B-Coder-GGUF with Docker Model Runner:
docker model run hf.co/bartowski/Yi-9B-Coder-GGUF:Q4_K_M
- Lemonade
How to use bartowski/Yi-9B-Coder-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull bartowski/Yi-9B-Coder-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Yi-9B-Coder-GGUF-Q4_K_M
List all available models
lemonade list
Llamacpp quants
Browse files- .gitattributes +12 -0
- README.md +36 -0
- Yi-9B-Coder-Q2_K.gguf +3 -0
- Yi-9B-Coder-Q3_K_L.gguf +3 -0
- Yi-9B-Coder-Q3_K_M.gguf +3 -0
- Yi-9B-Coder-Q3_K_S.gguf +3 -0
- Yi-9B-Coder-Q4_0.gguf +3 -0
- Yi-9B-Coder-Q4_K_M.gguf +3 -0
- Yi-9B-Coder-Q4_K_S.gguf +3 -0
- Yi-9B-Coder-Q5_0.gguf +3 -0
- Yi-9B-Coder-Q5_K_M.gguf +3 -0
- Yi-9B-Coder-Q5_K_S.gguf +3 -0
- Yi-9B-Coder-Q6_K.gguf +3 -0
- Yi-9B-Coder-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 |
+
Yi-9B-Coder-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
Yi-9B-Coder-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
Yi-9B-Coder-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
Yi-9B-Coder-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
Yi-9B-Coder-Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
Yi-9B-Coder-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
Yi-9B-Coder-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
Yi-9B-Coder-Q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
Yi-9B-Coder-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
Yi-9B-Coder-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
Yi-9B-Coder-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
Yi-9B-Coder-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- code
|
| 4 |
+
- llama
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
license: other
|
| 8 |
+
license_name: yi-license
|
| 9 |
+
license_link: https://huggingface.co/01-ai/Yi-9B/blob/main/LICENSE
|
| 10 |
+
quantized_by: bartowski
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
## Llamacpp Quantizations of Yi-9B-Coder
|
| 14 |
+
|
| 15 |
+
Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b2405">b2405</a> for quantization.
|
| 16 |
+
|
| 17 |
+
Original model: https://huggingface.co/TechxGenus/Yi-9B-Coder
|
| 18 |
+
|
| 19 |
+
Download a file (not the whole branch) from below:
|
| 20 |
+
|
| 21 |
+
| Filename | Quant type | File Size | Description |
|
| 22 |
+
| -------- | ---------- | --------- | ----------- |
|
| 23 |
+
| [Yi-9B-Coder-Q8_0.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q8_0.gguf) | Q8_0 | 9.38GB | Extremely high quality, generally unneeded but max available quant. |
|
| 24 |
+
| [Yi-9B-Coder-Q6_K.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q6_K.gguf) | Q6_K | 7.24GB | Very high quality, near perfect, *recommended*. |
|
| 25 |
+
| [Yi-9B-Coder-Q5_K_M.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q5_K_M.gguf) | Q5_K_M | 6.25GB | High quality, very usable. |
|
| 26 |
+
| [Yi-9B-Coder-Q5_K_S.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q5_K_S.gguf) | Q5_K_S | 6.10GB | High quality, very usable. |
|
| 27 |
+
| [Yi-9B-Coder-Q5_0.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q5_0.gguf) | Q5_0 | 6.10GB | High quality, older format, generally not recommended. |
|
| 28 |
+
| [Yi-9B-Coder-Q4_K_M.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q4_K_M.gguf) | Q4_K_M | 5.32GB | Good quality, similar to 4.25 bpw. |
|
| 29 |
+
| [Yi-9B-Coder-Q4_K_S.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q4_K_S.gguf) | Q4_K_S | 5.07GB | Slightly lower quality with small space savings. |
|
| 30 |
+
| [Yi-9B-Coder-Q4_0.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q4_0.gguf) | Q4_0 | 5.03GB | Decent quality, older format, generally not recommended. |
|
| 31 |
+
| [Yi-9B-Coder-Q3_K_L.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q3_K_L.gguf) | Q3_K_L | 4.69GB | Lower quality but usable, good for low RAM availability. |
|
| 32 |
+
| [Yi-9B-Coder-Q3_K_M.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q3_K_M.gguf) | Q3_K_M | 4.32GB | Even lower quality. |
|
| 33 |
+
| [Yi-9B-Coder-Q3_K_S.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF//main/Yi-9B-Coder-Q3_K_S.gguf) | Q3_K_S | 3.89GB | Low quality, not recommended. |
|
| 34 |
+
| [Yi-9B-Coder-Q2_K.gguf](https://huggingface.co/bartowski/Yi-9B-Coder-GGUF/blob/main/Yi-9B-Coder-Q2_K.gguf) | Q2_K | 3.35GB | Extremely low quality, *not* recommended.
|
| 35 |
+
|
| 36 |
+
Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski
|
Yi-9B-Coder-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fdceae26dbdfc611cc2100c2787efa3c06ec22fba8e87fbafdd01c900edddd83
|
| 3 |
+
size 3354324736
|
Yi-9B-Coder-Q3_K_L.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69599fc57d4c28dfef40ba979f7659b7fd42d65dfb8d3499f9b31eed371c5f4a
|
| 3 |
+
size 4690751232
|
Yi-9B-Coder-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94707595f2566c67d9f1b6216a0130d304f6d717e4e620136d442e7ab69a5065
|
| 3 |
+
size 4324404992
|
Yi-9B-Coder-Q3_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:718acb38a520cd0fe4802caf1f022cc05cb0ac6e9cb1580588aa2097d7fbc3cf
|
| 3 |
+
size 3899207424
|
Yi-9B-Coder-Q4_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2d89dd2addb8177c60229c70ca2939fc1253e093c09e850fe0cc1b4a4ec78ff3
|
| 3 |
+
size 5036994304
|
Yi-9B-Coder-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1972d66e8506a486dfd0f6fe2e5d4be8c941c648c9685010d10a84ba45e24504
|
| 3 |
+
size 5328957184
|
Yi-9B-Coder-Q4_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9356c6be1bb8a7b36e2298c5a044a940d9cf67af2cd3294f04dbf3695484f0c4
|
| 3 |
+
size 5071859456
|
Yi-9B-Coder-Q5_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65982931a309d9bb910fa420169008a0aa4908155cfb6b44e35a328881a18f29
|
| 3 |
+
size 6107852544
|
Yi-9B-Coder-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec5c0145d45a2bebb2dd459006c2381839f1bdafe2b1066b714e33b1b308b313
|
| 3 |
+
size 6258257664
|
Yi-9B-Coder-Q5_K_S.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b47cd77f9f6b860ed39f68c8d82b837b4b5bb8f9769e83ef193188f58cb8537
|
| 3 |
+
size 6107852544
|
Yi-9B-Coder-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0d2743171804535d3a053e159d5d9cfa24ab08d99e8a7c377498e5e4ca91688
|
| 3 |
+
size 7245639424
|
Yi-9B-Coder-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:501164323acfc254aded2f829fc77c425885b6ee5678ffe403c3c47e196b9ba7
|
| 3 |
+
size 9383915264
|