Instructions to use support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ") model = AutoModelForCausalLM.from_pretrained("support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ
- SGLang
How to use support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ 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 "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ" \ --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": "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ", "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 "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ" \ --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": "support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ with Docker Model Runner:
docker model run hf.co/support-pvelocity/Code-Llama-2-13B-instruct-text2sql-GPTQ
Commit ·
3383f0d
1
Parent(s): 9cc215b
Update README.md
Browse files
README.md
CHANGED
|
@@ -53,7 +53,6 @@ This model is governed by a custom commercial license from Code Llama. For detai
|
|
| 53 |
|
| 54 |
You can use the Code-Llama-2-13B-instruct-text2sql-GPTQ model to generate SQL queries from natural language questions, as demonstrated in the following code snippet:
|
| 55 |
```python
|
| 56 |
-
import torch
|
| 57 |
from transformers import AutoTokenizer
|
| 58 |
from auto_gptq import AutoGPTQForCausalLM
|
| 59 |
|
|
|
|
| 53 |
|
| 54 |
You can use the Code-Llama-2-13B-instruct-text2sql-GPTQ model to generate SQL queries from natural language questions, as demonstrated in the following code snippet:
|
| 55 |
```python
|
|
|
|
| 56 |
from transformers import AutoTokenizer
|
| 57 |
from auto_gptq import AutoGPTQForCausalLM
|
| 58 |
|