Instructions to use tensorblock/Yi-Coder-9B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/Yi-Coder-9B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/Yi-Coder-9B-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/Yi-Coder-9B-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/Yi-Coder-9B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/Yi-Coder-9B-GGUF", filename="Yi-Coder-9B-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/Yi-Coder-9B-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/Yi-Coder-9B-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/Yi-Coder-9B-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/Yi-Coder-9B-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/Yi-Coder-9B-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/Yi-Coder-9B-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/Yi-Coder-9B-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/Yi-Coder-9B-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/Yi-Coder-9B-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/Yi-Coder-9B-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/Yi-Coder-9B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/Yi-Coder-9B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/Yi-Coder-9B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/Yi-Coder-9B-GGUF:Q2_K
- SGLang
How to use tensorblock/Yi-Coder-9B-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 "tensorblock/Yi-Coder-9B-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": "tensorblock/Yi-Coder-9B-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 "tensorblock/Yi-Coder-9B-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": "tensorblock/Yi-Coder-9B-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/Yi-Coder-9B-GGUF with Ollama:
ollama run hf.co/tensorblock/Yi-Coder-9B-GGUF:Q2_K
- Unsloth Studio
How to use tensorblock/Yi-Coder-9B-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/Yi-Coder-9B-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/Yi-Coder-9B-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/Yi-Coder-9B-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/Yi-Coder-9B-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/Yi-Coder-9B-GGUF:Q2_K
- Lemonade
How to use tensorblock/Yi-Coder-9B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/Yi-Coder-9B-GGUF:Q2_K
Run and chat with the model
lemonade run user.Yi-Coder-9B-GGUF-Q2_K
List all available models
lemonade list
Remove .gguf files (keep Q2_K.gguf)
Browse files- Yi-Coder-9B-Q3_K_L.gguf +0 -3
- Yi-Coder-9B-Q3_K_M.gguf +0 -3
- Yi-Coder-9B-Q3_K_S.gguf +0 -3
- Yi-Coder-9B-Q4_0.gguf +0 -3
- Yi-Coder-9B-Q4_K_M.gguf +0 -3
- Yi-Coder-9B-Q4_K_S.gguf +0 -3
- Yi-Coder-9B-Q5_0.gguf +0 -3
- Yi-Coder-9B-Q5_K_M.gguf +0 -3
- Yi-Coder-9B-Q5_K_S.gguf +0 -3
- Yi-Coder-9B-Q6_K.gguf +0 -3
- Yi-Coder-9B-Q8_0.gguf +0 -3
Yi-Coder-9B-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b76d1c6dad7bca7cb67adb73a164cd93ba37f4fd90262f56bda918ff7fa6093f
|
| 3 |
-
size 4690751552
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q3_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:208a7e91eee4369e1f7737757b058b9a7e7e0a9fb54df2fc746cdadc77115a1d
|
| 3 |
-
size 4324405312
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7da3b91fd04fb2e4643fa9bd8262425863484f89e4f9a24c30640f664f6c6a18
|
| 3 |
-
size 3899207744
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d10ad8a02c7767079e79a32960559d44cde15fc8104d5ebf78c6d70f4352aea2
|
| 3 |
-
size 5036994624
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c23f2f0abaf041eab9434f5c9d4ef281834070dc1469de7bb380ca18920f196c
|
| 3 |
-
size 5328957504
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5bc07dd0ba7b9d660c853f5652a65ebb04d4c89198a862e5dd5d412e558b9d6a
|
| 3 |
-
size 5071859776
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:edc4b2343a0546ef19f3f4feb47135710eb8240a525e327886ce881b0ff09a28
|
| 3 |
-
size 6107852864
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a9fba1eea131b8482c596da9f7347ae2f6dd3ff57aa9631b84556a592b9b4ca7
|
| 3 |
-
size 6258257984
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9aaa2ba1a6c625abb803e71ba673199e3a78fdda38ea44c6b43804c3405cbbd0
|
| 3 |
-
size 6107852864
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a343c1347149bad834c2301e4c4239b9572844e5cad25549b4af6e9a2e9d1618
|
| 3 |
-
size 7245639744
|
|
|
|
|
|
|
|
|
|
|
|
Yi-Coder-9B-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6ca0a87eff9d551a6faf2c6b97878091380646c849ce2fe4c453890ea3fb0656
|
| 3 |
-
size 9383915584
|
|
|
|
|
|
|
|
|
|
|
|