Instructions to use kristiannordby/llama3-sqlcoder-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kristiannordby/llama3-sqlcoder-ft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kristiannordby/llama3-sqlcoder-ft")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kristiannordby/llama3-sqlcoder-ft") model = AutoModelForCausalLM.from_pretrained("kristiannordby/llama3-sqlcoder-ft", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kristiannordby/llama3-sqlcoder-ft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kristiannordby/llama3-sqlcoder-ft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kristiannordby/llama3-sqlcoder-ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kristiannordby/llama3-sqlcoder-ft
- SGLang
How to use kristiannordby/llama3-sqlcoder-ft 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 "kristiannordby/llama3-sqlcoder-ft" \ --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": "kristiannordby/llama3-sqlcoder-ft", "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 "kristiannordby/llama3-sqlcoder-ft" \ --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": "kristiannordby/llama3-sqlcoder-ft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kristiannordby/llama3-sqlcoder-ft with Docker Model Runner:
docker model run hf.co/kristiannordby/llama3-sqlcoder-ft
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,6 +1,11 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
|
@@ -17,13 +22,13 @@ tags: []
|
|
| 17 |
|
| 18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
-
- **Funded by [optional]:**
|
| 22 |
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
-
- **Model type:** [
|
| 24 |
-
- **Language(s) (NLP):**
|
| 25 |
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:**
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
|
@@ -36,6 +41,7 @@ This is the model card of a 🤗 transformers model that has been pushed on the
|
|
| 36 |
## Uses
|
| 37 |
|
| 38 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
|
|
|
| 39 |
|
| 40 |
### Direct Use
|
| 41 |
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- text-to-sql
|
| 5 |
+
datasets:
|
| 6 |
+
- kristiannordby/function_call_sql
|
| 7 |
+
base_model:
|
| 8 |
+
- defog/sqlcoder-7b-2
|
| 9 |
---
|
| 10 |
|
| 11 |
# Model Card for Model ID
|
|
|
|
| 22 |
|
| 23 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 24 |
|
| 25 |
+
- **Developed by:** @kristiannordby
|
| 26 |
+
- **Funded by [optional]:** AI2C, USMA D/MATH
|
| 27 |
- **Shared by [optional]:** [More Information Needed]
|
| 28 |
+
- **Model type:** [Text-to-SQL]
|
| 29 |
+
- **Language(s) (NLP):** English, SQL
|
| 30 |
- **License:** [More Information Needed]
|
| 31 |
+
- **Finetuned from model [optional]:** Defog/sqlcoder-7b-2
|
| 32 |
|
| 33 |
### Model Sources [optional]
|
| 34 |
|
|
|
|
| 41 |
## Uses
|
| 42 |
|
| 43 |
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
| 44 |
+
This model was finetuned on an Army Aviation Question-SQL dataset.
|
| 45 |
|
| 46 |
### Direct Use
|
| 47 |
|