Text Generation
Transformers
TensorBoard
Safetensors
trl
sft
Generated from Trainer
text2text-generation
Instructions to use singhjagpreet/text_to_sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use singhjagpreet/text_to_sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="singhjagpreet/text_to_sql")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("singhjagpreet/text_to_sql", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use singhjagpreet/text_to_sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "singhjagpreet/text_to_sql" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhjagpreet/text_to_sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/singhjagpreet/text_to_sql
- SGLang
How to use singhjagpreet/text_to_sql 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 "singhjagpreet/text_to_sql" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhjagpreet/text_to_sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "singhjagpreet/text_to_sql" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "singhjagpreet/text_to_sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use singhjagpreet/text_to_sql with Docker Model Runner:
docker model run hf.co/singhjagpreet/text_to_sql
add widget
Browse files
README.md
CHANGED
|
@@ -9,6 +9,20 @@ base_model: google/gemma-2b
|
|
| 9 |
model-index:
|
| 10 |
- name: text_to_sql
|
| 11 |
results: []
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
---
|
| 13 |
|
| 14 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
|
|
|
| 9 |
model-index:
|
| 10 |
- name: text_to_sql
|
| 11 |
results: []
|
| 12 |
+
metrics:
|
| 13 |
+
- bleu
|
| 14 |
+
pipeline_tag: text2text-generation
|
| 15 |
+
inference:
|
| 16 |
+
parameters:
|
| 17 |
+
do_sample: false
|
| 18 |
+
max_length: 200
|
| 19 |
+
widget:
|
| 20 |
+
- text: "CREATE TABLE stadium (\n stadium_id number,\n location text,\n name text,\n capacity number,\n)\n\n-- Using valid SQLite, answer the following questions for the tables provided above.\n\n-- how many stadiums in total?\n\nSELECT"
|
| 21 |
+
example_title: "Number stadiums"
|
| 22 |
+
- text: "CREATE TABLE work_orders ( ID NUMBER, CREATED_AT TEXT, COST FLOAT, INVOICE_AMOUNT FLOAT, IS_DUE BOOLEAN, IS_OPEN BOOLEAN, IS_OVERDUE BOOLEAN, COUNTRY_NAME TEXT, )\n\n-- Using valid SQLite, answer the following questions for the tables provided above.\n\n-- how many work orders are open?\n\nSELECT"
|
| 23 |
+
example_title: "Open work orders"
|
| 24 |
+
- text: "CREATE TABLE stadium ( stadium_id number, location text, name text, capacity number, highest number, lowest number, average number )\n\nCREATE TABLE singer ( singer_id number, name text, country text, song_name text, song_release_year text, age number, is_male others )\n\nCREATE TABLE concert ( concert_id number, concert_name text, theme text, stadium_id text, year text )\n\nCREATE TABLE singer_in_concert ( concert_id number, singer_id text )\n\n-- Using valid SQLite, answer the following questions for the tables provided above.\n\n-- What is the maximum, the average, and the minimum capacity of stadiums ?\n\nSELECT"
|
| 25 |
+
example_title: "Stadium capacity"
|
| 26 |
---
|
| 27 |
|
| 28 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|