Instructions to use tensorblock/starcoder2-3b-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/starcoder2-3b-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/starcoder2-3b-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/starcoder2-3b-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/starcoder2-3b-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/starcoder2-3b-GGUF", filename="starcoder2-3b-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-3b-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-3b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-3b-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-3b-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-3b-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-3b-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/starcoder2-3b-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-3b-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/starcoder2-3b-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/starcoder2-3b-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/starcoder2-3b-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/starcoder2-3b-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-3b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/starcoder2-3b-GGUF:Q2_K
- SGLang
How to use tensorblock/starcoder2-3b-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-3b-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-3b-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-3b-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-3b-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/starcoder2-3b-GGUF with Ollama:
ollama run hf.co/tensorblock/starcoder2-3b-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/starcoder2-3b-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-3b-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-3b-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-3b-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/starcoder2-3b-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/starcoder2-3b-GGUF:Q2_K
- Lemonade
How to use tensorblock/starcoder2-3b-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/starcoder2-3b-GGUF:Q2_K
Run and chat with the model
lemonade run user.starcoder2-3b-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- starcoder2-3b-Q3_K_L.gguf +0 -3
- starcoder2-3b-Q3_K_S.gguf +0 -3
- starcoder2-3b-Q4_0.gguf +0 -3
- starcoder2-3b-Q4_K_M.gguf +0 -3
- starcoder2-3b-Q4_K_S.gguf +0 -3
- starcoder2-3b-Q5_0.gguf +0 -3
- starcoder2-3b-Q5_K_M.gguf +0 -3
- starcoder2-3b-Q5_K_S.gguf +0 -3
- starcoder2-3b-Q6_K.gguf +0 -3
- starcoder2-3b-Q8_0.gguf +0 -3
starcoder2-3b-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:640bd290b258a12698a4ab03861ef872eb56a9ead57b43bdeeb7ede1893d7158
|
| 3 |
-
size 1737573824
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:699d28fde4f5144c91b9875a9b1cce684048bda2ec4775ac4404c8faecc9762b
|
| 3 |
-
size 1366537664
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:757e4b1ec0254ba80636093d586234f63ecbcf01bb67bf6dbb64076d1676a294
|
| 3 |
-
size 1748817344
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f8bc27f0dca19a6c61fcd873aaa4966d53664041b8d1e2050f20080375633e91
|
| 3 |
-
size 1887905216
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d48ae62f3d8ef360624bd097e4c529aa70ceb1ebeaa3c757f6f84ffad9a26845
|
| 3 |
-
size 1763366336
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a17172d6fda349b0edd0a214736b1baa6323d7f3b024d46fd80f34a4adeb16e2
|
| 3 |
-
size 2108609984
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:10c202bac9c66d043e8dedbd3a75bed543688ea7cd74febf6569e14df0825708
|
| 3 |
-
size 2180261312
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:9f86209549cdb0dd03b1ae944ff341db0ee537bff03d6530c3b1965e0c82a07b
|
| 3 |
-
size 2108609984
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:66f2c995258e2bf7f26963e53ad2f310b12875cc853196e2d0b620c425586d85
|
| 3 |
-
size 2490889664
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-3b-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b47f93f04ffb77b0c37608ba8a57ebeea1aa13a7ac214dbd6709090a8d8e6374
|
| 3 |
-
size 3224556992
|
|
|
|
|
|
|
|
|
|
|
|