Instructions to use NumbersStation/nsql-llama-2-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NumbersStation/nsql-llama-2-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NumbersStation/nsql-llama-2-7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NumbersStation/nsql-llama-2-7B") model = AutoModelForCausalLM.from_pretrained("NumbersStation/nsql-llama-2-7B") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NumbersStation/nsql-llama-2-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NumbersStation/nsql-llama-2-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NumbersStation/nsql-llama-2-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NumbersStation/nsql-llama-2-7B
- SGLang
How to use NumbersStation/nsql-llama-2-7B 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 "NumbersStation/nsql-llama-2-7B" \ --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": "NumbersStation/nsql-llama-2-7B", "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 "NumbersStation/nsql-llama-2-7B" \ --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": "NumbersStation/nsql-llama-2-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NumbersStation/nsql-llama-2-7B with Docker Model Runner:
docker model run hf.co/NumbersStation/nsql-llama-2-7B
Adding `safetensors` variant of this model
#22 opened 2 months ago
by
SFconvertbot
Adding `safetensors` variant of this model
#21 opened 4 months ago
by
SFconvertbot
Adding `safetensors` variant of this model
#20 opened about 2 years ago
by
SFconvertbot
Save and load the nsql-llama-2-7B model
#18 opened over 2 years ago
by
Or111
Train on larger Llama-2 models, and comparison to Sqlcoder
#17 opened over 2 years ago
by
buddyroo30
Model Query is truncated in sagemaker
1
#16 opened over 2 years ago
by
vikkum
Query for week on week calculation is not even close to the expected output
1
#15 opened over 2 years ago
by
rusum
Where can we find the GGUF version of this model?
4
#14 opened over 2 years ago
by
AayushShah
This model is totally failed on unknown database.
7
#13 opened over 2 years ago
by
mohitgoswami
Can I support Chinese questions?
1
#12 opened over 2 years ago
by
sqlboy
Running with SQL Server
#11 opened over 2 years ago
by
phenomforever
Quantize version
👍 1
5
#10 opened over 2 years ago
by
baconnier
Reproducing Spider Eval scores
4
#9 opened over 2 years ago
by
baasitsh
Support for MySQL?
3
#8 opened over 2 years ago
by
buddyroo30
The score of this model on spider and WikiSQL
5
#7 opened over 2 years ago
by
GZL11
training script
3
#5 opened over 2 years ago
by
gchoueiter
Sagemaker Deployment Failing in ml.g5.2xlarge instance
7
#4 opened over 2 years ago
by
rishisaraf11
Why prompt and schema is generated as part of model output?
24
#3 opened almost 3 years ago
by
Aiforfun