Instructions to use tensorblock/CodeLlama-7b-Python-hf-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tensorblock/CodeLlama-7b-Python-hf-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/CodeLlama-7b-Python-hf-GGUF", filename="CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/CodeLlama-7b-Python-hf-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
- Ollama
How to use tensorblock/CodeLlama-7b-Python-hf-GGUF with Ollama:
ollama run hf.co/tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-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/CodeLlama-7b-Python-hf-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/CodeLlama-7b-Python-hf-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
- Lemonade
How to use tensorblock/CodeLlama-7b-Python-hf-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/CodeLlama-7b-Python-hf-GGUF:Q2_K
Run and chat with the model
lemonade run user.CodeLlama-7b-Python-hf-GGUF-Q2_K
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -189,44 +189,70 @@ The files were quantized using machines provided by [TensorBlock](https://tensor
|
|
| 189 |
|
| 190 |
## Our projects
|
| 191 |
<table border="1" cellspacing="0" cellpadding="10">
|
| 192 |
-
<tr>
|
| 193 |
-
<th style="font-size: 25px;">Awesome MCP Servers</th>
|
| 194 |
-
<th style="font-size: 25px;">TensorBlock Studio</th>
|
| 195 |
-
</tr>
|
| 196 |
<tr>
|
| 197 |
-
<th
|
| 198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 199 |
</tr>
|
| 200 |
<tr>
|
| 201 |
<th>A comprehensive collection of Model Context Protocol (MCP) servers.</th>
|
| 202 |
<th>A lightweight, open, and extensible multi-LLM interaction studio.</th>
|
| 203 |
</tr>
|
| 204 |
-
<tr>
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
</tr>
|
| 230 |
</table>
|
| 231 |
## Prompt template
|
| 232 |
|
|
|
|
| 189 |
|
| 190 |
## Our projects
|
| 191 |
<table border="1" cellspacing="0" cellpadding="10">
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
<tr>
|
| 193 |
+
<th colspan="2" style="font-size: 25px;">Forge</th>
|
| 194 |
+
</tr>
|
| 195 |
+
<tr>
|
| 196 |
+
<th colspan="2">
|
| 197 |
+
<img src="https://imgur.com/faI5UKh.jpeg" alt="Forge Project" width="900"/>
|
| 198 |
+
</th>
|
| 199 |
+
</tr>
|
| 200 |
+
<tr>
|
| 201 |
+
<th colspan="2">An OpenAI-compatible multi-provider routing layer.</th>
|
| 202 |
+
</tr>
|
| 203 |
+
<tr>
|
| 204 |
+
<th colspan="2">
|
| 205 |
+
<a href="https://github.com/TensorBlock/forge" target="_blank" style="
|
| 206 |
+
display: inline-block;
|
| 207 |
+
padding: 8px 16px;
|
| 208 |
+
background-color: #FF7F50;
|
| 209 |
+
color: white;
|
| 210 |
+
text-decoration: none;
|
| 211 |
+
border-radius: 6px;
|
| 212 |
+
font-weight: bold;
|
| 213 |
+
font-family: sans-serif;
|
| 214 |
+
">🚀 Try it now! 🚀</a>
|
| 215 |
+
</th>
|
| 216 |
+
</tr>
|
| 217 |
+
|
| 218 |
+
<tr>
|
| 219 |
+
<th style="font-size: 25px;">Awesome MCP Servers</th>
|
| 220 |
+
<th style="font-size: 25px;">TensorBlock Studio</th>
|
| 221 |
+
</tr>
|
| 222 |
+
<tr>
|
| 223 |
+
<th><img src="https://imgur.com/2Xov7B7.jpeg" alt="MCP Servers" width="450"/></th>
|
| 224 |
+
<th><img src="https://imgur.com/pJcmF5u.jpeg" alt="Studio" width="450"/></th>
|
| 225 |
</tr>
|
| 226 |
<tr>
|
| 227 |
<th>A comprehensive collection of Model Context Protocol (MCP) servers.</th>
|
| 228 |
<th>A lightweight, open, and extensible multi-LLM interaction studio.</th>
|
| 229 |
</tr>
|
| 230 |
+
<tr>
|
| 231 |
+
<th>
|
| 232 |
+
<a href="https://github.com/TensorBlock/awesome-mcp-servers" target="_blank" style="
|
| 233 |
+
display: inline-block;
|
| 234 |
+
padding: 8px 16px;
|
| 235 |
+
background-color: #FF7F50;
|
| 236 |
+
color: white;
|
| 237 |
+
text-decoration: none;
|
| 238 |
+
border-radius: 6px;
|
| 239 |
+
font-weight: bold;
|
| 240 |
+
font-family: sans-serif;
|
| 241 |
+
">👀 See what we built 👀</a>
|
| 242 |
+
</th>
|
| 243 |
+
<th>
|
| 244 |
+
<a href="https://github.com/TensorBlock/TensorBlock-Studio" target="_blank" style="
|
| 245 |
+
display: inline-block;
|
| 246 |
+
padding: 8px 16px;
|
| 247 |
+
background-color: #FF7F50;
|
| 248 |
+
color: white;
|
| 249 |
+
text-decoration: none;
|
| 250 |
+
border-radius: 6px;
|
| 251 |
+
font-weight: bold;
|
| 252 |
+
font-family: sans-serif;
|
| 253 |
+
">👀 See what we built 👀</a>
|
| 254 |
+
</th>
|
| 255 |
+
</tr>
|
| 256 |
</table>
|
| 257 |
## Prompt template
|
| 258 |
|