Upload 2 files
Browse files- README.md +34 -3
- config.json +105 -35
README.md
CHANGED
|
@@ -1,3 +1,34 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
inference: false
|
| 4 |
+
base_model: llmware/slim-sql-1b-v0
|
| 5 |
+
base_model_relation: quantized
|
| 6 |
+
tags: [green, p1, llmware-fx, ov, emerald]
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# slim-sql-npu-ov
|
| 10 |
+
|
| 11 |
+
**slim-sql-npu-ov** is a small specialized function calling model that takes as input a table schema and a natural language query, and outputs a SQL statement that corresponds to the query, and can be run against a database table. This is a very small text-to-sql model designed for reasonable accuracy on single tables and relatively straightforward queries, and for easy integration into multi-step processes.
|
| 12 |
+
|
| 13 |
+
This is an OpenVino int4 quantized version of slim-sql-1b-v0, providing a very fast, very small inference implementation, optimized for AI PCs using Intel NPU.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
### Model Description
|
| 17 |
+
|
| 18 |
+
- **Developed by:** llmware
|
| 19 |
+
- **Model type:** tinyllama
|
| 20 |
+
- **Parameters:** 1.1 billion
|
| 21 |
+
- **Model Parent:** llmware/slim-sql-1b-v0
|
| 22 |
+
- **Language(s) (NLP):** English
|
| 23 |
+
- **License:** Apache 2.0
|
| 24 |
+
- **Uses:** Text-to-SQL conversion
|
| 25 |
+
- **RAG Benchmark Accuracy Score:** NA
|
| 26 |
+
- **Quantization:** int4
|
| 27 |
+
|
| 28 |
+
## Model Card Contact
|
| 29 |
+
|
| 30 |
+
[llmware on github](https://www.github.com/llmware-ai/llmware)
|
| 31 |
+
|
| 32 |
+
[llmware on hf](https://www.huggingface.co/llmware)
|
| 33 |
+
|
| 34 |
+
[llmware website](https://www.llmware.ai)
|
config.json
CHANGED
|
@@ -1,35 +1,105 @@
|
|
| 1 |
-
{
|
| 2 |
-
"_name_or_path": "llmware/slim-sql-
|
| 3 |
-
"aib_version": "",
|
| 4 |
-
"architectures": [
|
| 5 |
-
"LlamaForCausalLM"
|
| 6 |
-
],
|
| 7 |
-
"attention_bias": false,
|
| 8 |
-
"attention_dropout": 0.0,
|
| 9 |
-
"bos_token_id": 1,
|
| 10 |
-
"eos_token_id": 2,
|
| 11 |
-
"
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
-
"
|
| 16 |
-
"
|
| 17 |
-
"
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"
|
| 21 |
-
"
|
| 22 |
-
"
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
"
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
"
|
| 33 |
-
"
|
| 34 |
-
"
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "llmware/slim-sql-ov",
|
| 3 |
+
"aib_version": "",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"LlamaForCausalLM"
|
| 6 |
+
],
|
| 7 |
+
"attention_bias": false,
|
| 8 |
+
"attention_dropout": 0.0,
|
| 9 |
+
"bos_token_id": 1,
|
| 10 |
+
"eos_token_id": 2,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 5632,
|
| 15 |
+
"max_position_embeddings": 2048,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 32,
|
| 19 |
+
"num_hidden_layers": 22,
|
| 20 |
+
"num_key_value_heads": 4,
|
| 21 |
+
"pretraining_tp": 1,
|
| 22 |
+
"rms_norm_eps": 1e-05,
|
| 23 |
+
"rope_scaling": null,
|
| 24 |
+
"rope_theta": 10000.0,
|
| 25 |
+
"tie_word_embeddings": false,
|
| 26 |
+
"trained": "custom training",
|
| 27 |
+
"training_dataset": "",
|
| 28 |
+
"transformers_version": "4.41.2",
|
| 29 |
+
"use_cache": true,
|
| 30 |
+
"vocab_size": 32000,
|
| 31 |
+
"prompt_wrapper": "human_bot",
|
| 32 |
+
"description": "slim-sql is a text-to-sql model.",
|
| 33 |
+
"prompt_format": "<human> {table_schema} \n {question} \n<bot>:",
|
| 34 |
+
"output_format": "{sql}",
|
| 35 |
+
"tokenizer_local": "tokenizer_tl.json",
|
| 36 |
+
"tokenizer_config": {"bos_id":[1], "bos_token":["<s>"], "eos_id":[2],"eos_token":["</s>"]},
|
| 37 |
+
"model_parent": "llmware/slim-sql-1b-v0",
|
| 38 |
+
"description": "Text-to-SQL model from llmware - finetuned on tiny-llama - 1.1 parameter base",
|
| 39 |
+
"quantization": "int4",
|
| 40 |
+
"model_family": "OVGenModel",
|
| 41 |
+
"parameters": 1.1,
|
| 42 |
+
"primary_keys": ["sql"],
|
| 43 |
+
"output_values": ["{{sql statement}}"],
|
| 44 |
+
"publisher": "llmware",
|
| 45 |
+
"release_date": "september 2024",
|
| 46 |
+
"function_call": "sql",
|
| 47 |
+
"test_params": ["sql"],
|
| 48 |
+
"test_set": [
|
| 49 |
+
{
|
| 50 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 51 |
+
"query": "Which customers are VIP customers?",
|
| 52 |
+
"answer": "SELECT * FROM customers WHERE vip_customer='yes'"
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 56 |
+
"query": "What is the annual spend for customer Rachel Michaels?",
|
| 57 |
+
"answer": "SELECT annual_spend FROM customers WHERE customer_name='Rachel Michaels'"
|
| 58 |
+
},
|
| 59 |
+
{
|
| 60 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 61 |
+
"query": "How many customers spend more than $1000 per year?",
|
| 62 |
+
"answer": "SELECT COUNT(*) FROM customers WHERE annual_spend > $1000"
|
| 63 |
+
},
|
| 64 |
+
{
|
| 65 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 66 |
+
"query": "Who are the customers with gold customer level?",
|
| 67 |
+
"answer": "SELECT customer_name FROM customers WHERE customer_level = 'gold'"
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 71 |
+
"query": "Which customer has account number 9382035?",
|
| 72 |
+
"answer": "SELECT * FROM customers WHERE account_number = 9382035"
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"context": "CREATE TABLE customers (customer_name text, account_number integer,customer_level text, vip_customer text, annual_spend text, user_name text)",
|
| 76 |
+
"query": "What is the account number of customer Susanna Jones?",
|
| 77 |
+
"answer": "SELECT account_number FROM customers WHERE customer_name='Susanna Jones'"
|
| 78 |
+
},
|
| 79 |
+
{
|
| 80 |
+
"context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)",
|
| 81 |
+
"query": "How many pages are in the human resources library?",
|
| 82 |
+
"answer": "SELECT pages FROM library WHERE library_name = 'human resources'"
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)",
|
| 86 |
+
"query": "Which libraries have more than 1000 images?",
|
| 87 |
+
"answer": "SELECT * FROM library WHERE images > 1000"
|
| 88 |
+
},
|
| 89 |
+
{
|
| 90 |
+
"context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)",
|
| 91 |
+
"query": "How many blocks are in the finance library?",
|
| 92 |
+
"answer": "SELECT blocks FROM library WHERE library_name = 'finance library'"
|
| 93 |
+
},
|
| 94 |
+
{
|
| 95 |
+
"context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)",
|
| 96 |
+
"query": "What is a list of all of the libraries?",
|
| 97 |
+
"answer": "SELECT * FROM library"
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"context": "CREATE TABLE library (library_name text, unique_doc_id integer, documents integer, blocks integer, images integer, pages integer, tables integer, account_name text)",
|
| 101 |
+
"query": "Which library has unique_doc_id of 8329?",
|
| 102 |
+
"answer": "SELECT * FROM library WHERE unique_doc_id = 8329"
|
| 103 |
+
}
|
| 104 |
+
]
|
| 105 |
+
}
|