Instructions to use tensorblock/prem-1B-SQL-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tensorblock/prem-1B-SQL-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="tensorblock/prem-1B-SQL-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("tensorblock/prem-1B-SQL-GGUF", dtype="auto") - llama-cpp-python
How to use tensorblock/prem-1B-SQL-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="tensorblock/prem-1B-SQL-GGUF", filename="prem-1B-SQL-Q2_K.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use tensorblock/prem-1B-SQL-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/prem-1B-SQL-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/prem-1B-SQL-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/prem-1B-SQL-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf tensorblock/prem-1B-SQL-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/prem-1B-SQL-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf tensorblock/prem-1B-SQL-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/prem-1B-SQL-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf tensorblock/prem-1B-SQL-GGUF:Q2_K
Use Docker
docker model run hf.co/tensorblock/prem-1B-SQL-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use tensorblock/prem-1B-SQL-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tensorblock/prem-1B-SQL-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/prem-1B-SQL-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/tensorblock/prem-1B-SQL-GGUF:Q2_K
- SGLang
How to use tensorblock/prem-1B-SQL-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/prem-1B-SQL-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/prem-1B-SQL-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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/prem-1B-SQL-GGUF" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tensorblock/prem-1B-SQL-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use tensorblock/prem-1B-SQL-GGUF with Ollama:
ollama run hf.co/tensorblock/prem-1B-SQL-GGUF:Q2_K
- Unsloth Studio new
How to use tensorblock/prem-1B-SQL-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/prem-1B-SQL-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/prem-1B-SQL-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/prem-1B-SQL-GGUF to start chatting
- Docker Model Runner
How to use tensorblock/prem-1B-SQL-GGUF with Docker Model Runner:
docker model run hf.co/tensorblock/prem-1B-SQL-GGUF:Q2_K
- Lemonade
How to use tensorblock/prem-1B-SQL-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull tensorblock/prem-1B-SQL-GGUF:Q2_K
Run and chat with the model
lemonade run user.prem-1B-SQL-GGUF-Q2_K
List all available models
lemonade list
Remove .gguf files (keep Q2_K.gguf)
Browse files- prem-1B-SQL-Q3_K_L.gguf +0 -3
- prem-1B-SQL-Q3_K_M.gguf +0 -3
- prem-1B-SQL-Q3_K_S.gguf +0 -3
- prem-1B-SQL-Q4_0.gguf +0 -3
- prem-1B-SQL-Q4_K_M.gguf +0 -3
- prem-1B-SQL-Q4_K_S.gguf +0 -3
- prem-1B-SQL-Q5_0.gguf +0 -3
- prem-1B-SQL-Q5_K_M.gguf +0 -3
- prem-1B-SQL-Q5_K_S.gguf +0 -3
- prem-1B-SQL-Q6_K.gguf +0 -3
- prem-1B-SQL-Q8_0.gguf +0 -3
prem-1B-SQL-Q3_K_L.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:1bbc1660bb10810a371fa7b34d177070cb181c886d01521dfe2a60553d0f5146
|
| 3 |
-
size 744455744
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q3_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8b6221f68947654489f1e161bc350582fd9293e5d310fcd8be190f5678d374d2
|
| 3 |
-
size 704134720
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q3_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:0c3b5391e5720effa73e96f0f8f1b8b6eec025ad1cb6fb357d0439ead85ba6d1
|
| 3 |
-
size 641826368
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q4_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:f6dd070972e3f4c42c964ca440f1a9bd2e601cc91108014132069030019b07af
|
| 3 |
-
size 775937600
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q4_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:083e313c3d6da05d6c8811e37508b888105ff8bce1a10feb036a2302de45bddd
|
| 3 |
-
size 873455168
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q4_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:8d2a2679096657a07120a04972dbb503c27d31157b827359fe013dacfb0fa20d
|
| 3 |
-
size 813964864
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q5_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:6968f9f1cda5585fa03d5a85245b5a93bb962a92a18a4135500e850d356e1e9c
|
| 3 |
-
size 935976512
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q5_K_M.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:276e9678a128dde872051170d1f35fe5399863a6de33bee9cedeab17b15688fd
|
| 3 |
-
size 1001840192
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q5_K_S.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:d5355b437328e87a3820291cf2c233e7c60ee57df32d960886f995e6918113d0
|
| 3 |
-
size 952884800
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q6_K.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:ce21929b879f69fa065350841a5d21ac04fbe51ed457716c6554ceb50944ab77
|
| 3 |
-
size 1171537472
|
|
|
|
|
|
|
|
|
|
|
|
prem-1B-SQL-Q8_0.gguf
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:62226c3880891f6f560e1d3a259611e949d7d869cdc324fb1f35ab86a57f5076
|
| 3 |
-
size 1432092224
|
|
|
|
|
|
|
|
|
|
|
|