gretelai/synthetic_text_to_sql
Viewer • Updated • 106k • 2.92k • 691
How to use sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL", device_map="auto")How to use sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL
How to use sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL" \
--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": "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL" \
--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": "sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL with Docker Model Runner:
docker model run hf.co/sindhusatish97/DeepSeek-R1-Distill-Qwen-14B-unsloth-bnb-4bit-Text2SQL
Just trained this model as I was experimenting with finetuning DeepSeek R1
This qwen2 model was trained 2x faster with Unsloth and Huggingface's TRL library.
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-14B