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
Update README.md
Browse files
README.md
CHANGED
|
@@ -87,44 +87,70 @@ The files were quantized using machines provided by [TensorBlock](https://tensor
|
|
| 87 |
|
| 88 |
## Our projects
|
| 89 |
<table border="1" cellspacing="0" cellpadding="10">
|
| 90 |
-
<tr>
|
| 91 |
-
<th style="font-size: 25px;">Awesome MCP Servers</th>
|
| 92 |
-
<th style="font-size: 25px;">TensorBlock Studio</th>
|
| 93 |
-
</tr>
|
| 94 |
<tr>
|
| 95 |
-
<th
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
</tr>
|
| 98 |
<tr>
|
| 99 |
<th>A comprehensive collection of Model Context Protocol (MCP) servers.</th>
|
| 100 |
<th>A lightweight, open, and extensible multi-LLM interaction studio.</th>
|
| 101 |
</tr>
|
| 102 |
-
<tr>
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
</tr>
|
| 128 |
</table>
|
| 129 |
## Prompt template
|
| 130 |
|
|
|
|
| 87 |
|
| 88 |
## Our projects
|
| 89 |
<table border="1" cellspacing="0" cellpadding="10">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
<tr>
|
| 91 |
+
<th colspan="2" style="font-size: 25px;">Forge</th>
|
| 92 |
+
</tr>
|
| 93 |
+
<tr>
|
| 94 |
+
<th colspan="2">
|
| 95 |
+
<img src="https://imgur.com/faI5UKh.jpeg" alt="Forge Project" width="900"/>
|
| 96 |
+
</th>
|
| 97 |
+
</tr>
|
| 98 |
+
<tr>
|
| 99 |
+
<th colspan="2">An OpenAI-compatible multi-provider routing layer.</th>
|
| 100 |
+
</tr>
|
| 101 |
+
<tr>
|
| 102 |
+
<th colspan="2">
|
| 103 |
+
<a href="https://github.com/TensorBlock/forge" target="_blank" style="
|
| 104 |
+
display: inline-block;
|
| 105 |
+
padding: 8px 16px;
|
| 106 |
+
background-color: #FF7F50;
|
| 107 |
+
color: white;
|
| 108 |
+
text-decoration: none;
|
| 109 |
+
border-radius: 6px;
|
| 110 |
+
font-weight: bold;
|
| 111 |
+
font-family: sans-serif;
|
| 112 |
+
">π Try it now! π</a>
|
| 113 |
+
</th>
|
| 114 |
+
</tr>
|
| 115 |
+
|
| 116 |
+
<tr>
|
| 117 |
+
<th style="font-size: 25px;">Awesome MCP Servers</th>
|
| 118 |
+
<th style="font-size: 25px;">TensorBlock Studio</th>
|
| 119 |
+
</tr>
|
| 120 |
+
<tr>
|
| 121 |
+
<th><img src="https://imgur.com/2Xov7B7.jpeg" alt="MCP Servers" width="450"/></th>
|
| 122 |
+
<th><img src="https://imgur.com/pJcmF5u.jpeg" alt="Studio" width="450"/></th>
|
| 123 |
</tr>
|
| 124 |
<tr>
|
| 125 |
<th>A comprehensive collection of Model Context Protocol (MCP) servers.</th>
|
| 126 |
<th>A lightweight, open, and extensible multi-LLM interaction studio.</th>
|
| 127 |
</tr>
|
| 128 |
+
<tr>
|
| 129 |
+
<th>
|
| 130 |
+
<a href="https://github.com/TensorBlock/awesome-mcp-servers" target="_blank" style="
|
| 131 |
+
display: inline-block;
|
| 132 |
+
padding: 8px 16px;
|
| 133 |
+
background-color: #FF7F50;
|
| 134 |
+
color: white;
|
| 135 |
+
text-decoration: none;
|
| 136 |
+
border-radius: 6px;
|
| 137 |
+
font-weight: bold;
|
| 138 |
+
font-family: sans-serif;
|
| 139 |
+
">π See what we built π</a>
|
| 140 |
+
</th>
|
| 141 |
+
<th>
|
| 142 |
+
<a href="https://github.com/TensorBlock/TensorBlock-Studio" target="_blank" style="
|
| 143 |
+
display: inline-block;
|
| 144 |
+
padding: 8px 16px;
|
| 145 |
+
background-color: #FF7F50;
|
| 146 |
+
color: white;
|
| 147 |
+
text-decoration: none;
|
| 148 |
+
border-radius: 6px;
|
| 149 |
+
font-weight: bold;
|
| 150 |
+
font-family: sans-serif;
|
| 151 |
+
">π See what we built π</a>
|
| 152 |
+
</th>
|
| 153 |
+
</tr>
|
| 154 |
</table>
|
| 155 |
## Prompt template
|
| 156 |
|