Instructions to use tensorblock/code_gpt2_mini_model-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use tensorblock/code_gpt2_mini_model-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/code_gpt2_mini_model-GGUF", filename="code_gpt2_mini_model-Q2_K.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use tensorblock/code_gpt2_mini_model-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf tensorblock/code_gpt2_mini_model-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/code_gpt2_mini_model-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf tensorblock/code_gpt2_mini_model-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf tensorblock/code_gpt2_mini_model-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/code_gpt2_mini_model-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/code_gpt2_mini_model-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/code_gpt2_mini_model-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/code_gpt2_mini_model-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/code_gpt2_mini_model-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/code_gpt2_mini_model-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/code_gpt2_mini_model-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/code_gpt2_mini_model-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/tensorblock/code_gpt2_mini_model-GGUF:Q2_K
- Ollama
How to use tensorblock/code_gpt2_mini_model-GGUF with Ollama:
ollama run hf.co/tensorblock/code_gpt2_mini_model-GGUF:Q2_K
- Unsloth Studio
How to use tensorblock/code_gpt2_mini_model-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/code_gpt2_mini_model-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/code_gpt2_mini_model-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/code_gpt2_mini_model-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use tensorblock/code_gpt2_mini_model-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/code_gpt2_mini_model-GGUF:Q2_K
- Lemonade
How to use tensorblock/code_gpt2_mini_model-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/code_gpt2_mini_model-GGUF:Q2_K
Run and chat with the model
lemonade run user.code_gpt2_mini_model-GGUF-Q2_K
List all available models
lemonade list
Keep Q2_K/Q3_K_M gguf only
Browse files- code_gpt2_mini_model-Q3_K_L.gguf +0 -3
- code_gpt2_mini_model-Q3_K_S.gguf +0 -3
- code_gpt2_mini_model-Q4_0.gguf +0 -3
- code_gpt2_mini_model-Q4_K_M.gguf +0 -3
- code_gpt2_mini_model-Q4_K_S.gguf +0 -3
- code_gpt2_mini_model-Q5_0.gguf +0 -3
- code_gpt2_mini_model-Q5_K_M.gguf +0 -3
- code_gpt2_mini_model-Q5_K_S.gguf +0 -3
- code_gpt2_mini_model-Q6_K.gguf +0 -3
- code_gpt2_mini_model-Q8_0.gguf +0 -3
code_gpt2_mini_model-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d639097c3b967957cdc58b8f0a85f16f6548f09fdbe7d7cec2f163421b304b28
|
| 3 |
-
size 102093312
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6b038d8adcea61c2b398d94f6ef61c951a46dc63e1e0c7ac61e13cc0a2ecccd3
|
| 3 |
-
size 90149376
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:5f59ddf8a17f9a3b086b996b3bf26a2c189dec983a88f4fecfd4aafb4b1a1fec
|
| 3 |
-
size 106555968
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:691e19ba20065240e31aecd240ff24a233509c122dc35977d967638d86f1657b
|
| 3 |
-
size 112859712
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:633dc74dcfab713cdf9f984777e9e1bf11c936e72214c3ab1bb85dd6ba66d6b9
|
| 3 |
-
size 106850880
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:769706dce505f9aa8bd74f73ea2b4d692bf377bd46a1c578b6ef6e0bee5f0b14
|
| 3 |
-
size 121997472
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:cf08d408cac0df9f6dfdba1018c1e55abbae5d23b9fd082b6d72d089ba6e9e54
|
| 3 |
-
size 126697632
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:71b62389b6de5effe7d2763e6e1878958efdd8df79f09ec2523b6c7c633b35d2
|
| 3 |
-
size 121997472
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:49fe4501d8afa5974e2c02f1c7eebc28f48fdf9a7d5cebf14c3c3f28c4d0a969
|
| 3 |
-
size 138404064
|
|
|
|
|
|
|
|
|
|
|
|
code_gpt2_mini_model-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:b264558ae87228868192751c39fc785cc928e6d35bdfe0ba0ba804cafa176842
|
| 3 |
-
size 177669792
|
|
|
|
|
|
|
|
|
|
|
|