Instructions to use IThinkUPC/SQLGenerator-AI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IThinkUPC/SQLGenerator-AI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IThinkUPC/SQLGenerator-AI")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("IThinkUPC/SQLGenerator-AI", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use IThinkUPC/SQLGenerator-AI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IThinkUPC/SQLGenerator-AI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IThinkUPC/SQLGenerator-AI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/IThinkUPC/SQLGenerator-AI
- SGLang
How to use IThinkUPC/SQLGenerator-AI 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 "IThinkUPC/SQLGenerator-AI" \ --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": "IThinkUPC/SQLGenerator-AI", "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 "IThinkUPC/SQLGenerator-AI" \ --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": "IThinkUPC/SQLGenerator-AI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use IThinkUPC/SQLGenerator-AI with Docker Model Runner:
docker model run hf.co/IThinkUPC/SQLGenerator-AI
Commit ·
5e65843
1
Parent(s): 4e89d8a
Update config.json
Browse files- config.json +22 -0
config.json
CHANGED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"base_model_name_or_path": "bigscience/bloom-1b7",
|
| 3 |
+
"bias": "none",
|
| 4 |
+
"enable_lora": [
|
| 5 |
+
true,
|
| 6 |
+
false,
|
| 7 |
+
true
|
| 8 |
+
],
|
| 9 |
+
"fan_in_fan_out": true,
|
| 10 |
+
"inference_mode": true,
|
| 11 |
+
"init_lora_weights": true,
|
| 12 |
+
"lora_alpha": 32,
|
| 13 |
+
"lora_dropout": 0.05,
|
| 14 |
+
"merge_weights": false,
|
| 15 |
+
"modules_to_save": null,
|
| 16 |
+
"peft_type": "LORA",
|
| 17 |
+
"r": 16,
|
| 18 |
+
"target_modules": [
|
| 19 |
+
"query_key_value"
|
| 20 |
+
],
|
| 21 |
+
"task_type": "CAUSAL_LM"
|
| 22 |
+
}
|