Instructions to use RichardErkhov/PipableAI_-_pip-SQL-1B-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use RichardErkhov/PipableAI_-_pip-SQL-1B-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 RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
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 RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
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 RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
Use Docker
docker model run hf.co/RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use RichardErkhov/PipableAI_-_pip-SQL-1B-gguf with Ollama:
ollama run hf.co/RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use RichardErkhov/PipableAI_-_pip-SQL-1B-gguf with Docker Model Runner:
docker model run hf.co/RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
- Lemonade
How to use RichardErkhov/PipableAI_-_pip-SQL-1B-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull RichardErkhov/PipableAI_-_pip-SQL-1B-gguf:Q4_K_M
Run and chat with the model
lemonade run user.PipableAI_-_pip-SQL-1B-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Quantization made by Richard Erkhov.
pip-SQL-1B - GGUF
- Model creator: https://huggingface.co/PipableAI/
- Original model: https://huggingface.co/PipableAI/pip-SQL-1B/
| Name | Quant method | Size |
|---|---|---|
| pip-SQL-1B.Q2_K.gguf | Q2_K | 0.52GB |
| pip-SQL-1B.IQ3_XS.gguf | IQ3_XS | 0.57GB |
| pip-SQL-1B.IQ3_S.gguf | IQ3_S | 0.6GB |
| pip-SQL-1B.Q3_K_S.gguf | Q3_K_S | 0.6GB |
| pip-SQL-1B.IQ3_M.gguf | IQ3_M | 0.63GB |
| pip-SQL-1B.Q3_K.gguf | Q3_K | 0.66GB |
| pip-SQL-1B.Q3_K_M.gguf | Q3_K_M | 0.66GB |
| pip-SQL-1B.Q3_K_L.gguf | Q3_K_L | 0.69GB |
| pip-SQL-1B.IQ4_XS.gguf | IQ4_XS | 0.7GB |
| pip-SQL-1B.Q4_0.gguf | Q4_0 | 0.72GB |
| pip-SQL-1B.IQ4_NL.gguf | IQ4_NL | 0.73GB |
| pip-SQL-1B.Q4_K_S.gguf | Q4_K_S | 0.76GB |
| pip-SQL-1B.Q4_K.gguf | Q4_K | 0.81GB |
| pip-SQL-1B.Q4_K_M.gguf | Q4_K_M | 0.81GB |
| pip-SQL-1B.Q4_1.gguf | Q4_1 | 0.8GB |
| pip-SQL-1B.Q5_0.gguf | Q5_0 | 0.87GB |
| pip-SQL-1B.Q5_K_S.gguf | Q5_K_S | 0.89GB |
| pip-SQL-1B.Q5_K.gguf | Q5_K | 0.93GB |
| pip-SQL-1B.Q5_K_M.gguf | Q5_K_M | 0.93GB |
| pip-SQL-1B.Q5_1.gguf | Q5_1 | 0.95GB |
| pip-SQL-1B.Q6_K.gguf | Q6_K | 1.09GB |
| pip-SQL-1B.Q8_0.gguf | Q8_0 | 1.33GB |
Original model description:
license: mit language: - en metrics: - accuracy pipeline_tag: text-generation widget: - text: "CREATE TABLE radio(age VARCHAR, radio_id VARCHAR, frequency VARCHAR, wavelength VARCHAR); CREATE TABLE radio_faults(radio_id VARCHAR, fault_description VARCHAR)Get the radio id and defect descriptions of radios that have wavelength greater than 30 ?" example_title: "example1" - text: "CREATE TABLE system(JobID: String,GID: String, UID: String, Start:Time(yyyy/mm/dd), End: Time,ElapsedRaw: Time, CPUTimeRAW: Time,NCPUS: Number,NNodes: Number, NodeList: List, State:String, Timelimit: Time);Get UID and job id for Jobs that started on Jan 20 , 2023" example_title: "example2" - text: "CREATE TABLE department (Department_ID number, Name text, Creation text, Ranking number, Budget_in_Billions number, Num_Employees number) which has Department_ID as primary key abd CREATE TABLE head (head_ID number, name text, born_state text, age number) which has head_ID as primary key and CREATE TABLE management (department_ID number, head_ID number, temporary_acting text) which has department_ID as primary key" example_title: "example3" tags: - code - sql - text2sql - instruction_tuned - jax - pytorch - 1b - expert datasets: - PipableAI/spider-bird
Pipable’s pipSQL
Please refer to https://huggingface.co/PipableAI/pipSQL-1.3b for our state of the art model, that gives better performance than chatgpt and claude on sql tasks on a lot of benchmarks.
Pipable’s pipSQL is a model distilled from llama 1b to generate sql queries given prompt and schema. We used a unique pipeline which involved the model working on two objectives alternatively ----
- Maximizing the log prob of all tokens in the sequence (including the prompt tokens)
- Minimizng the difference between the true value and the predicted maximum value of the output tokens i.e generated tokens for the sql query slice of the entire sequence.
License
The model's new weights along with all other assets involved with it are open sourced under mit license.
How to Use
text = """<schema>{schema}</schema>
<question>{question}</question>
<sql>"""
pytorch
from transformers import AutoModelForCasualLM, AutoTokenizer
device = "cuda"
model = AutoModelForCausalLM.from_pretrained("PipableAI/pipSQL1b")
tokenizer = AutoTokenizer.from_pretrained("PipableAI/pipSQL1b")
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True).split('<sql>')[1].split('</sql>')[0])
flax
from transformers import FlaxAutoModelForCasualLM, AutoTokenizer
model = FlaxAutoModelForCausalLM.from_pretrained("PipableAI/pipSQL1b" , from_pt=True)
tokenizer = AutoTokenizer.from_pretrained("PipableAI/pipSQL1b")
The PipableAI team
Avi Kothari, Pratham Gupta, Ritvik Aryan Kalra, Rohan Bhatial, Soham Acharya
- Downloads last month
- 289
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit