Instructions to use llmware/slim-sql-tool with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/slim-sql-tool with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("llmware/slim-sql-tool", dtype="auto") - llama-cpp-python
How to use llmware/slim-sql-tool with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="llmware/slim-sql-tool", filename="slim-sql.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 llmware/slim-sql-tool 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 llmware/slim-sql-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-sql-tool
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf llmware/slim-sql-tool # Run inference directly in the terminal: llama cli -hf llmware/slim-sql-tool
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 llmware/slim-sql-tool # Run inference directly in the terminal: ./llama-cli -hf llmware/slim-sql-tool
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 llmware/slim-sql-tool # Run inference directly in the terminal: ./build/bin/llama-cli -hf llmware/slim-sql-tool
Use Docker
docker model run hf.co/llmware/slim-sql-tool
- LM Studio
- Jan
- Ollama
How to use llmware/slim-sql-tool with Ollama:
ollama run hf.co/llmware/slim-sql-tool
- Unsloth Studio
How to use llmware/slim-sql-tool 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 llmware/slim-sql-tool 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 llmware/slim-sql-tool to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for llmware/slim-sql-tool to start chatting
- Atomic Chat new
- Docker Model Runner
How to use llmware/slim-sql-tool with Docker Model Runner:
docker model run hf.co/llmware/slim-sql-tool
- Lemonade
How to use llmware/slim-sql-tool with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull llmware/slim-sql-tool
Run and chat with the model
lemonade run user.slim-sql-tool-{{QUANT_TAG}}List all available models
lemonade list
| { | |
| "model_name": "slim-sql-tool", | |
| "model_ft_base": "slim-sql", | |
| "quantization": "4Q_K_M GGUF", | |
| "model_base": "llama", | |
| "model_type": "llama", | |
| "tokenizer": "llmware/slim-sql", | |
| "tokenizer_local": "tokenizer_tl.json", | |
| "parameters": "1.1 billion", | |
| "description": "slim-sql is a text-to-sql model.", | |
| "prompt_wrapper": "human_bot", | |
| "prompt_format": "<human> {table_schema} \n {question} \n<bot>:", | |
| "output_format": "{sql}", | |
| "primary_keys": [], | |
| "output_values": [], | |
| "publisher": "llmware", | |
| "release_date": "february 2024", | |
| "test_set": [ | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "Which customers are VIP customers?", | |
| "answer": "SELECT * FROM customers WHERE vip_customer='yes'" | |
| }, | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "What is the annual spend for customer Rachel Michaels?", | |
| "answer": "SELECT annual_spend FROM customers WHERE customer_name='Rachel Michaels'" | |
| }, | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "How many customers spend more than $1000 per year?", | |
| "answer": "SELECT COUNT(*) FROM customers WHERE annual_spend > $1000" | |
| }, | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "Who are the customers with gold customer level?", | |
| "answer": "SELECT customer_name FROM customers WHERE customer_level = 'gold'" | |
| }, | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "Which customer has account number 9382035?", | |
| "answer": "SELECT * FROM customers WHERE account_number = 9382035" | |
| }, | |
| { | |
| "context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)", | |
| "query": "What is the account number of customer Susanna Jones?", | |
| "answer": "SELECT account_number FROM customers WHERE customer_name='Susanna Jones'" | |
| }, | |
| { | |
| "context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)", | |
| "query": "How many pages are in the human resources library?", | |
| "answer": "SELECT pages FROM library WHERE library_name = 'human resources'" | |
| }, | |
| { | |
| "context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)", | |
| "query": "Which libraries have more than 1000 images?", | |
| "answer": "SELECT * FROM library WHERE images > 1000" | |
| }, | |
| { | |
| "context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)", | |
| "query": "How many blocks are in the finance library?", | |
| "answer": "SELECT blocks FROM library WHERE library_name = 'finance library'" | |
| }, | |
| { | |
| "context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)", | |
| "query": "What is a list of all of the libraries?", | |
| "answer": "SELECT * FROM library" | |
| }, | |
| { | |
| "context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)", | |
| "query": "Which library has unique_doc_id of 8329?", | |
| "answer": "SELECT * FROM library WHERE unique_doc_id = 8329" | |
| } | |
| ] | |
| } |