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
Prompt Loss Inclusive Update
Browse files- .gitattributes +2 -0
- config.json +3 -2
- generation_config.json +1 -1
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
- pytorch_model.bin +2 -2
.gitattributes
CHANGED
|
@@ -34,3 +34,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
pytorch_model.bin filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
model-00001-of-00002.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
model-00002-of-00002.safetensors filter=lfs diff=lfs merge=lfs -text
|
config.json
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "PipableAI/pipSQL-1.3b",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
|
|
|
| 7 |
"bos_token_id": 32013,
|
| 8 |
"eos_token_id": 32021,
|
| 9 |
"hidden_act": "silu",
|
|
@@ -24,7 +25,7 @@
|
|
| 24 |
"rope_theta": 100000,
|
| 25 |
"tie_word_embeddings": false,
|
| 26 |
"torch_dtype": "float32",
|
| 27 |
-
"transformers_version": "4.
|
| 28 |
"use_cache": true,
|
| 29 |
"vocab_size": 32256
|
| 30 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "PipableAI/pipSQL-1.3b-test",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
| 6 |
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 32013,
|
| 9 |
"eos_token_id": 32021,
|
| 10 |
"hidden_act": "silu",
|
|
|
|
| 25 |
"rope_theta": 100000,
|
| 26 |
"tie_word_embeddings": false,
|
| 27 |
"torch_dtype": "float32",
|
| 28 |
+
"transformers_version": "4.37.2",
|
| 29 |
"use_cache": true,
|
| 30 |
"vocab_size": 32256
|
| 31 |
}
|
generation_config.json
CHANGED
|
@@ -2,5 +2,5 @@
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 32013,
|
| 4 |
"eos_token_id": 32021,
|
| 5 |
-
"transformers_version": "4.
|
| 6 |
}
|
|
|
|
| 2 |
"_from_model_config": true,
|
| 3 |
"bos_token_id": 32013,
|
| 4 |
"eos_token_id": 32021,
|
| 5 |
+
"transformers_version": "4.37.2"
|
| 6 |
}
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4986380064
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebf2907ceb71386a4530bdbd6ae52dd1747e18203f25e8b5b0d148cdd088fb99
|
| 3 |
size 4986380064
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 399532808
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ba75e73912ecb03ac6378ccd138e0144a7bbc11475d5037f2ecf123571bd4cea
|
| 3 |
size 399532808
|
pytorch_model.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9611d7a52de8783200f349d315284e8a78a10ad4039afc7f4d4c15d1ffac482
|
| 3 |
+
size 5385977238
|