Instructions to use cssupport/t5-small-awesome-text-to-sql with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cssupport/t5-small-awesome-text-to-sql with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cssupport/t5-small-awesome-text-to-sql")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("cssupport/t5-small-awesome-text-to-sql") model = AutoModelForSeq2SeqLM.from_pretrained("cssupport/t5-small-awesome-text-to-sql") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use cssupport/t5-small-awesome-text-to-sql with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cssupport/t5-small-awesome-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": "cssupport/t5-small-awesome-text-to-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/cssupport/t5-small-awesome-text-to-sql
- SGLang
How to use cssupport/t5-small-awesome-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 "cssupport/t5-small-awesome-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": "cssupport/t5-small-awesome-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 "cssupport/t5-small-awesome-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": "cssupport/t5-small-awesome-text-to-sql", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use cssupport/t5-small-awesome-text-to-sql with Docker Model Runner:
docker model run hf.co/cssupport/t5-small-awesome-text-to-sql
Update README.md
Browse files
README.md
CHANGED
|
@@ -37,38 +37,6 @@ Contact us for more info: support@cloudsummary.com
|
|
| 37 |
|
| 38 |
Please refer [t5-small](https://huggingface.co/t5-small) for Model Sources.
|
| 39 |
|
| 40 |
-
## Uses
|
| 41 |
-
|
| 42 |
-
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 43 |
-
|
| 44 |
-
[More Information Needed]
|
| 45 |
-
|
| 46 |
-
### Direct Use
|
| 47 |
-
|
| 48 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 49 |
-
Could used in application where natural language is to be converted into SQL queries.
|
| 50 |
-
[More Information Needed]
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
### Out-of-Scope Use
|
| 55 |
-
|
| 56 |
-
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 57 |
-
|
| 58 |
-
[More Information Needed]
|
| 59 |
-
|
| 60 |
-
## Bias, Risks, and Limitations
|
| 61 |
-
|
| 62 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 63 |
-
|
| 64 |
-
[More Information Needed]
|
| 65 |
-
|
| 66 |
-
### Recommendations
|
| 67 |
-
|
| 68 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 69 |
-
|
| 70 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 71 |
-
|
| 72 |
## How to Get Started with the Model
|
| 73 |
|
| 74 |
Use the code below to get started with the model.
|
|
@@ -113,6 +81,40 @@ print(f"The generated SQL query is: {generated_sql}")
|
|
| 113 |
```
|
| 114 |
|
| 115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 116 |
## Technical Specifications
|
| 117 |
|
| 118 |
### Model Architecture and Objective
|
|
|
|
| 37 |
|
| 38 |
Please refer [t5-small](https://huggingface.co/t5-small) for Model Sources.
|
| 39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
## How to Get Started with the Model
|
| 41 |
|
| 42 |
Use the code below to get started with the model.
|
|
|
|
| 81 |
```
|
| 82 |
|
| 83 |
|
| 84 |
+
## Uses
|
| 85 |
+
|
| 86 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 87 |
+
|
| 88 |
+
[More Information Needed]
|
| 89 |
+
|
| 90 |
+
### Direct Use
|
| 91 |
+
|
| 92 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
| 93 |
+
Could used in application where natural language is to be converted into SQL queries.
|
| 94 |
+
[More Information Needed]
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
### Out-of-Scope Use
|
| 99 |
+
|
| 100 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
| 101 |
+
|
| 102 |
+
[More Information Needed]
|
| 103 |
+
|
| 104 |
+
## Bias, Risks, and Limitations
|
| 105 |
+
|
| 106 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
| 107 |
+
|
| 108 |
+
[More Information Needed]
|
| 109 |
+
|
| 110 |
+
### Recommendations
|
| 111 |
+
|
| 112 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 113 |
+
|
| 114 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
|
| 118 |
## Technical Specifications
|
| 119 |
|
| 120 |
### Model Architecture and Objective
|