Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
metrics:
|
| 6 |
+
- accuracy
|
| 7 |
+
pipeline_tag: text-generation
|
| 8 |
+
widget:
|
| 9 |
+
- text: <schema>CREATE TABLE radio(age VARCHAR, radio_id VARCHAR, frequency VARCHAR,
|
| 10 |
+
wavelength VARCHAR); CREATE TABLE radio_faults(radio_id VARCHAR, fault_description
|
| 11 |
+
VARCHAR)</schema><question>Get the radio id and defect descriptions of radios
|
| 12 |
+
that have wavelength greater than 30 ?</question><sql>
|
| 13 |
+
example_title: example1
|
| 14 |
+
- text: '<schema>CREATE TABLE system(JobID: String,GID: String, UID: String, Start:Time(yyyy/mm/dd),
|
| 15 |
+
End: Time,ElapsedRaw: Time, CPUTimeRAW: Time,NCPUS: Number,NNodes: Number, NodeList:
|
| 16 |
+
List, State:String, Timelimit: Time);</schema><question>Get UID and job id for
|
| 17 |
+
Jobs that started on Jan 20 , 2023</question><sql>'
|
| 18 |
+
example_title: example2
|
| 19 |
+
- text: <schema>CREATE TABLE department (Department_ID number, Name text, Creation
|
| 20 |
+
text, Ranking number, Budget_in_Billions number, Num_Employees number) which has
|
| 21 |
+
Department_ID as primary key abd CREATE TABLE head (head_ID number, name text,
|
| 22 |
+
born_state text, age number) which has head_ID as primary key and CREATE TABLE
|
| 23 |
+
management (department_ID number, head_ID number, temporary_acting text) which
|
| 24 |
+
has department_ID as primary key</schema><question>
|
| 25 |
+
example_title: example3
|
| 26 |
+
tags:
|
| 27 |
+
- code
|
| 28 |
+
- sql
|
| 29 |
+
- text2sql
|
| 30 |
+
- instruction_tuned
|
| 31 |
+
- jax
|
| 32 |
+
- pytorch
|
| 33 |
+
- 1b
|
| 34 |
+
- expert
|
| 35 |
+
- llama-cpp
|
| 36 |
+
- gguf-my-repo
|
| 37 |
+
datasets:
|
| 38 |
+
- PipableAI/spider-bird
|
| 39 |
+
base_model: PipableAI/pip-SQL-1B
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
# marroyo777/pip-SQL-1B-Q4_K_M-GGUF
|
| 43 |
+
This model was converted to GGUF format from [`PipableAI/pip-SQL-1B`](https://huggingface.co/PipableAI/pip-SQL-1B) using llama.cpp via the ggml.ai's [GGUF-my-repo](https://huggingface.co/spaces/ggml-org/gguf-my-repo) space.
|
| 44 |
+
Refer to the [original model card](https://huggingface.co/PipableAI/pip-SQL-1B) for more details on the model.
|
| 45 |
+
|
| 46 |
+
## Use with llama.cpp
|
| 47 |
+
Install llama.cpp through brew (works on Mac and Linux)
|
| 48 |
+
|
| 49 |
+
```bash
|
| 50 |
+
brew install llama.cpp
|
| 51 |
+
|
| 52 |
+
```
|
| 53 |
+
Invoke the llama.cpp server or the CLI.
|
| 54 |
+
|
| 55 |
+
### CLI:
|
| 56 |
+
```bash
|
| 57 |
+
llama-cli --hf-repo marroyo777/pip-SQL-1B-Q4_K_M-GGUF --hf-file pip-sql-1b-q4_k_m-imat.gguf -p "The meaning to life and the universe is"
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
### Server:
|
| 61 |
+
```bash
|
| 62 |
+
llama-server --hf-repo marroyo777/pip-SQL-1B-Q4_K_M-GGUF --hf-file pip-sql-1b-q4_k_m-imat.gguf -c 2048
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
Note: You can also use this checkpoint directly through the [usage steps](https://github.com/ggerganov/llama.cpp?tab=readme-ov-file#usage) listed in the Llama.cpp repo as well.
|
| 66 |
+
|
| 67 |
+
Step 1: Clone llama.cpp from GitHub.
|
| 68 |
+
```
|
| 69 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 70 |
+
```
|
| 71 |
+
|
| 72 |
+
Step 2: Move into the llama.cpp folder and build it with `LLAMA_CURL=1` flag along with other hardware-specific flags (for ex: LLAMA_CUDA=1 for Nvidia GPUs on Linux).
|
| 73 |
+
```
|
| 74 |
+
cd llama.cpp && LLAMA_CURL=1 make
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
Step 3: Run inference through the main binary.
|
| 78 |
+
```
|
| 79 |
+
./llama-cli --hf-repo marroyo777/pip-SQL-1B-Q4_K_M-GGUF --hf-file pip-sql-1b-q4_k_m-imat.gguf -p "The meaning to life and the universe is"
|
| 80 |
+
```
|
| 81 |
+
or
|
| 82 |
+
```
|
| 83 |
+
./llama-server --hf-repo marroyo777/pip-SQL-1B-Q4_K_M-GGUF --hf-file pip-sql-1b-q4_k_m-imat.gguf -c 2048
|
| 84 |
+
```
|