Instructions to use tensorblock/starcoder2-chat-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/starcoder2-chat-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/starcoder2-chat-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/starcoder2-chat-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/starcoder2-chat-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/starcoder2-chat-GGUF", filename="starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-chat-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/starcoder2-chat-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-chat-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/starcoder2-chat-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/starcoder2-chat-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/starcoder2-chat-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/starcoder2-chat-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/starcoder2-chat-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/starcoder2-chat-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/starcoder2-chat-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/starcoder2-chat-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/starcoder2-chat-GGUF:Q2_K
- SGLang
How to use tensorblock/starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/starcoder2-chat-GGUF with Ollama:
ollama run hf.co/tensorblock/starcoder2-chat-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-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/starcoder2-chat-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/starcoder2-chat-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/starcoder2-chat-GGUF:Q2_K
- Lemonade
How to use tensorblock/starcoder2-chat-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/starcoder2-chat-GGUF:Q2_K
Run and chat with the model
lemonade run user.starcoder2-chat-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- starcoder2-chat-Q3_K_L.gguf +0 -3
- starcoder2-chat-Q3_K_S.gguf +0 -3
- starcoder2-chat-Q4_0.gguf +0 -3
- starcoder2-chat-Q4_K_M.gguf +0 -3
- starcoder2-chat-Q4_K_S.gguf +0 -3
- starcoder2-chat-Q5_0.gguf +0 -3
- starcoder2-chat-Q5_K_M.gguf +0 -3
- starcoder2-chat-Q5_K_S.gguf +0 -3
- starcoder2-chat-Q6_K.gguf +0 -3
- starcoder2-chat-Q8_0.gguf +0 -3
starcoder2-chat-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:94abae7e68cb0a71d25d24dca2b98d0d1e30795b40831a4a46a84398e74c4a6f
|
| 3 |
-
size 4074061376
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c57e7f554c586bc56c1180f10d5eea4fa75d26701180154b3c60b1d1031ab80f
|
| 3 |
-
size 3178708544
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:2cf1ca8659cc69d0a65f9395b3f01afb63763bed553675fcc0a78d2cc233b92e
|
| 3 |
-
size 4101193280
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:43d5fe4fbd4876d9f4cb70a7a0a5bf997ed5c5273a09f4f63fe72b695acd2c46
|
| 3 |
-
size 4461280832
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d8a2a538f73b54ba9c6ecaf084ad3791c88c8b20e422c8d281e504e4ed50b16c
|
| 3 |
-
size 4144840256
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9d1a5785f7564bb4dc78f3ded3840bf20b9ca19f5a468b760fe5f3a851a46ec5
|
| 3 |
-
size 4969414208
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b4a1f5979accbd10e53caf4f4c1dc84eaa8d2440ee40d502113415b9bdb8d2b8
|
| 3 |
-
size 5154913856
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a1e516d3745043875c6f00278cb1cf3d8688814fac94cbee8691dccaff3648d4
|
| 3 |
-
size 4969414208
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9aa326377cc9d4720f1232cc0c2c0d5a6ac8cf468d1b8a305888c6ca1c844772
|
| 3 |
-
size 5891898944
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-chat-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c0f2eee1af9397fe2311115ad3135db51f54a436b83311326428f5a4a343c2e9
|
| 3 |
-
size 7628930624
|
|
|
|
|
|
|
|
|
|
|
|