Instructions to use tensorblock/starcoder2-7b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/starcoder2-7b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/starcoder2-7b-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/starcoder2-7b-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/starcoder2-7b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/starcoder2-7b-GGUF", filename="starcoder2-7b-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-7b-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-7b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-7b-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-7b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-7b-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-7b-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/starcoder2-7b-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-7b-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/starcoder2-7b-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/starcoder2-7b-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/starcoder2-7b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/starcoder2-7b-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-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/starcoder2-7b-GGUF:Q2_K
- SGLang
How to use tensorblock/starcoder2-7b-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-7b-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-7b-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-7b-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-7b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/starcoder2-7b-GGUF with Ollama:
ollama run hf.co/tensorblock/starcoder2-7b-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/starcoder2-7b-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-7b-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-7b-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-7b-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/starcoder2-7b-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/starcoder2-7b-GGUF:Q2_K
- Lemonade
How to use tensorblock/starcoder2-7b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/starcoder2-7b-GGUF:Q2_K
Run and chat with the model
lemonade run user.starcoder2-7b-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- starcoder2-7b-Q3_K_L.gguf +0 -3
- starcoder2-7b-Q3_K_S.gguf +0 -3
- starcoder2-7b-Q4_0.gguf +0 -3
- starcoder2-7b-Q4_K_M.gguf +0 -3
- starcoder2-7b-Q4_K_S.gguf +0 -3
- starcoder2-7b-Q5_0.gguf +0 -3
- starcoder2-7b-Q5_K_M.gguf +0 -3
- starcoder2-7b-Q5_K_S.gguf +0 -3
- starcoder2-7b-Q6_K.gguf +0 -3
- starcoder2-7b-Q8_0.gguf +0 -3
starcoder2-7b-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:752083abecf8bf2957e26de1c4d12280784d7c3fca67b94e4b682941065f9202
|
| 3 |
-
size 4074060992
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bfdd5f71c4c23101fa1ef415b133ec245835b9982a8d9e1b20e5c8cb70d4fd2a
|
| 3 |
-
size 3178708160
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7bd9101526e273e29ab63307750a04270edf73c936940340b90fe9f64130a1e5
|
| 3 |
-
size 4101192896
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:c7811e6837d67a1c836c5da806d4ab09cca01149bb30c399bc355273d29e66bf
|
| 3 |
-
size 4461280448
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f11d643b3f273e438963796a94c9024d3a2ffea83c1e70870b1d2c9648d2e1c1
|
| 3 |
-
size 4144839872
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:26700fce1a1bcd06a77f41a41b3f4ddf192259c8e6c8536ca2eea0c9841d4489
|
| 3 |
-
size 4969413824
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:7d5b96abf37c6caa845308e62bf0825c29fcef6066e9729e99c425bc198604de
|
| 3 |
-
size 5154913472
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:83df6433b16426a8d7b05c34cb774ed76e59b1b164d647465585b41bbe76aa88
|
| 3 |
-
size 4969413824
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5e96b2888e5cef8e710938d5a7825990c77e8e58bb83ddf8440c48feefa4f228
|
| 3 |
-
size 5891898560
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ec2a8c7048d3ecd33702fa4ef95ed3bfc3c554b20f8f8c42cd122e688d62c386
|
| 3 |
-
size 7628930240
|
|
|
|
|
|
|
|
|
|
|
|