Text Generation
Transformers
PyTorch
Safetensors
JAX
English
llama
sql
code
text2sql
instruction_tuned
basemodel
text-generation-inference
conversational
Instructions to use PipableAI/pip-sql-1.3b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PipableAI/pip-sql-1.3b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PipableAI/pip-sql-1.3b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PipableAI/pip-sql-1.3b") model = AutoModelForCausalLM.from_pretrained("PipableAI/pip-sql-1.3b") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use PipableAI/pip-sql-1.3b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PipableAI/pip-sql-1.3b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PipableAI/pip-sql-1.3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PipableAI/pip-sql-1.3b
- SGLang
How to use PipableAI/pip-sql-1.3b 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 "PipableAI/pip-sql-1.3b" \ --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": "PipableAI/pip-sql-1.3b", "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 "PipableAI/pip-sql-1.3b" \ --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": "PipableAI/pip-sql-1.3b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PipableAI/pip-sql-1.3b with Docker Model Runner:
docker model run hf.co/PipableAI/pip-sql-1.3b
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,14 +14,17 @@ tags:
|
|
| 14 |
- basemodel
|
| 15 |
- jax
|
| 16 |
- pytorch
|
| 17 |
-
- tensorflow
|
| 18 |
- text-generation-inference
|
| 19 |
library_name: transformers
|
| 20 |
pipeline_tag: text-generation
|
| 21 |
widget:
|
| 22 |
-
- text:
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
---
|
| 26 |
# pipSQL-1.3b
|
| 27 |
|
|
@@ -189,4 +192,4 @@ SELECT T1.customer_first_name , T1.customer_middle_initial , T1.customer_last_
|
|
| 189 |
```
|
| 190 |
|
| 191 |
### Team
|
| 192 |
-
Avi Kothari, Pratham Gupta, Ritvik Aryan Kalra, Rohan Bhatial, Soham Acharya
|
|
|
|
| 14 |
- basemodel
|
| 15 |
- jax
|
| 16 |
- pytorch
|
|
|
|
| 17 |
- text-generation-inference
|
| 18 |
library_name: transformers
|
| 19 |
pipeline_tag: text-generation
|
| 20 |
widget:
|
| 21 |
+
- text: >-
|
| 22 |
+
<schema>CREATE TABLE system(JobID: String,GID: String, UID: String,
|
| 23 |
+
Start:Time(yyyy/mm/dd), End: Time,ElapsedRaw: Time, CPUTimeRAW: Time,NCPUS:
|
| 24 |
+
Number,NNodes: Number, NodeList: List, State:String, Timelimit:
|
| 25 |
+
Time);</schema><question>Get UID and job id for Jobs that started on Jan 20
|
| 26 |
+
, 2023 ended on feb 14 2023 and has job id 20</question><sql>
|
| 27 |
+
example_title: example
|
| 28 |
---
|
| 29 |
# pipSQL-1.3b
|
| 30 |
|
|
|
|
| 192 |
```
|
| 193 |
|
| 194 |
### Team
|
| 195 |
+
Avi Kothari, Pratham Gupta, Ritvik Aryan Kalra, Rohan Bhatial, Soham Acharya
|