Instructions to use tensorblock/starcoder2-7b-instruct-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/starcoder2-7b-instruct-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/starcoder2-7b-instruct-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/starcoder2-7b-instruct-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/starcoder2-7b-instruct-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/starcoder2-7b-instruct-GGUF", filename="starcoder2-7b-instruct-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-instruct-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-instruct-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-7b-instruct-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-instruct-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/starcoder2-7b-instruct-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-instruct-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/starcoder2-7b-instruct-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-instruct-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/starcoder2-7b-instruct-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-instruct-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-instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
- SGLang
How to use tensorblock/starcoder2-7b-instruct-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-instruct-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-instruct-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-instruct-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-instruct-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use tensorblock/starcoder2-7b-instruct-GGUF with Ollama:
ollama run hf.co/tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/starcoder2-7b-instruct-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-instruct-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-instruct-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-instruct-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/starcoder2-7b-instruct-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
- Lemonade
How to use tensorblock/starcoder2-7b-instruct-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/starcoder2-7b-instruct-GGUF:Q2_K
Run and chat with the model
lemonade run user.starcoder2-7b-instruct-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- starcoder2-7b-instruct-Q3_K_L.gguf +0 -3
- starcoder2-7b-instruct-Q3_K_S.gguf +0 -3
- starcoder2-7b-instruct-Q4_0.gguf +0 -3
- starcoder2-7b-instruct-Q4_K_M.gguf +0 -3
- starcoder2-7b-instruct-Q4_K_S.gguf +0 -3
- starcoder2-7b-instruct-Q5_0.gguf +0 -3
- starcoder2-7b-instruct-Q5_K_M.gguf +0 -3
- starcoder2-7b-instruct-Q5_K_S.gguf +0 -3
- starcoder2-7b-instruct-Q6_K.gguf +0 -3
- starcoder2-7b-instruct-Q8_0.gguf +0 -3
starcoder2-7b-instruct-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:54ffe452c8e84a1660181c7652e24f6a2c92cffac7bdd736bf8b44ec874b5a18
|
| 3 |
-
size 4074061056
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:4420d0f5af5f18f4f462e527fe251d6ca6c65a33686c2ebede1f1e1ec14ec60d
|
| 3 |
-
size 3178708224
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f919827617cef60f72db106a10384ca4acb6424f31b25f507f935ccae1a1aafb
|
| 3 |
-
size 4101192960
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:30690d0c6642762af4b8c76a4d2ba4232249063da469008cfbf3f4efcbc629e3
|
| 3 |
-
size 4461280512
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:20aaba13dbc29062785d3d5960d2985d18738c33d6f7cab6c39f5125944a94f4
|
| 3 |
-
size 4144839936
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:bae347f85164d853dea44b5fbfeb762a380ec321ad1b9bffb8de88d6a00a4427
|
| 3 |
-
size 4969413888
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a998c8d9075a4cebdd030c5ee0acaf3e3817625f3ec5e397681e8c6ae158bcca
|
| 3 |
-
size 5154913536
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:eeca97c7d7f2d1597b591ba505898c3fa0a75fcff77b96797034b87e69dd52fa
|
| 3 |
-
size 4969413888
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:de00e86852d11dd1496c00babae0d7a3eb1641cecafeae588e4d7c4dea55fcb4
|
| 3 |
-
size 5891898624
|
|
|
|
|
|
|
|
|
|
|
|
starcoder2-7b-instruct-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:a0f5d5f221b934678734beaae9cf05607bee4aa4056d1a107406a1f93c6db45c
|
| 3 |
-
size 7628930304
|
|
|
|
|
|
|
|
|
|
|
|