Text Generation
Transformers
Safetensors
mistral
text-to-sql
sft
bf16
dynquant
conversational
text-generation-inference
Instructions to use VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16") model = AutoModelForCausalLM.from_pretrained("VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16
- SGLang
How to use VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16 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 "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16" \ --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": "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16" \ --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": "VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16 with Docker Model Runner:
docker model run hf.co/VikramPal/mistral-7b-instruct-v0.3-text2sql-bf16
bf16: weights and card from the text-to-SQL panel
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ license_link: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3
|
|
| 14 |
|
| 15 |
# Mistral-7B-Instruct-v0.3 text-to-SQL, bf16
|
| 16 |
|
| 17 |
-
mistralai/Mistral-7B-Instruct-v0.3 fine-tuned on text-to-SQL, merged and left in bf16. It is the ceiling arm of a panel of
|
| 18 |
|
| 19 |
## What this is
|
| 20 |
|
|
@@ -22,6 +22,7 @@ mistralai/Mistral-7B-Instruct-v0.3 fine-tuned on text-to-SQL, merged and left in
|
|
| 22 |
|---|---|
|
| 23 |
| base model | [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) |
|
| 24 |
| fine-tune | lora r=32, 2.0 epoch over 39,531 text-to-SQL conversations |
|
|
|
|
| 25 |
| training data | `gretelai/synthetic_text_to_sql`, `Salesforce/wikisql`, `b-mc2/sql-create-context` |
|
| 26 |
| quantization | none -- this is the bf16 fine-tune every quantized arm was made from |
|
| 27 |
| size on disk | 13.500 GiB (16.0000 bits per parameter) |
|
|
@@ -40,6 +41,8 @@ Execution match on 2,454 held-out text-to-SQL problems: the generated query is r
|
|
| 40 |
| gptq_3b | 6.68% | 2.858 GiB | 3.3869 |
|
| 41 |
| awq_3b | 74.16% | 2.858 GiB | 3.3869 |
|
| 42 |
| dq_3b | 75.22% | 2.857 GiB | 3.3859 |
|
|
|
|
|
|
|
| 43 |
|
| 44 |
This arm, by evaluation source:
|
| 45 |
|
|
@@ -64,7 +67,7 @@ McNemar exact over the per-item hits, so every row is a paired test on the same
|
|
| 64 |
|
| 65 |
## What is not claimed
|
| 66 |
|
| 67 |
-
- **The
|
| 68 |
- **Storage, measured; throughput, not.** The number reported here is bytes on disk and execution match. This card makes no claim about decode speed or peak VRAM against an fp16 baseline, because this panel did not measure either.
|
| 69 |
- **One task.** Execution match on held-out text-to-SQL is what was scored. It says nothing about how this arm behaves on anything else, and a quantization that holds one task can lose another.
|
| 70 |
|
|
|
|
| 14 |
|
| 15 |
# Mistral-7B-Instruct-v0.3 text-to-SQL, bf16
|
| 16 |
|
| 17 |
+
mistralai/Mistral-7B-Instruct-v0.3 fine-tuned on text-to-SQL, merged and left in bf16. It is the ceiling arm of a panel of 9 arms: every quantized arm below was made from this checkpoint and allocated the same byte budget, so their accuracies differ by method and not by size.
|
| 18 |
|
| 19 |
## What this is
|
| 20 |
|
|
|
|
| 22 |
|---|---|
|
| 23 |
| base model | [mistralai/Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) |
|
| 24 |
| fine-tune | lora r=32, 2.0 epoch over 39,531 text-to-SQL conversations |
|
| 25 |
+
| the adapter it merged | [VikramPal/mistral-7b-instruct-v0.3-text2sql-lora](https://huggingface.co/VikramPal/mistral-7b-instruct-v0.3-text2sql-lora) |
|
| 26 |
| training data | `gretelai/synthetic_text_to_sql`, `Salesforce/wikisql`, `b-mc2/sql-create-context` |
|
| 27 |
| quantization | none -- this is the bf16 fine-tune every quantized arm was made from |
|
| 28 |
| size on disk | 13.500 GiB (16.0000 bits per parameter) |
|
|
|
|
| 41 |
| gptq_3b | 6.68% | 2.858 GiB | 3.3869 |
|
| 42 |
| awq_3b | 74.16% | 2.858 GiB | 3.3869 |
|
| 43 |
| dq_3b | 75.22% | 2.857 GiB | 3.3859 |
|
| 44 |
+
| gptq_3b_asym_noao | 76.08% | 2.858 GiB | 3.3869 |
|
| 45 |
+
| gptq_3b_asym | 3.99% | 2.858 GiB | 3.3869 |
|
| 46 |
|
| 47 |
This arm, by evaluation source:
|
| 48 |
|
|
|
|
| 67 |
|
| 68 |
## What is not claimed
|
| 69 |
|
| 70 |
+
- **The arms above are not all the same scheme.** In this panel GPTQ runs symmetric with no activation reordering, asymmetric with no activation reordering, and asymmetric with group activation reordering; AWQ runs asymmetric with no activation reordering. DynQuant's quantizer is asymmetric and does not reorder columns, which is a property of the method rather than a recipe flag, so the panel records no scheme for its arms. Where a comparison above pairs a symmetric arm against an asymmetric one its delta spans two differences at once -- how the bits were allocated, and whether a zero point was stored per group -- so a large gap between those two arms is not on its own evidence about allocation. The comparison that isolates it is in this panel: `gptq_3b` and `gptq_3b_asym_noao` are the same method at the same byte anchor and differ in the scheme alone, so the difference between those two rows is the scheme and nothing else.
|
| 71 |
- **Storage, measured; throughput, not.** The number reported here is bytes on disk and execution match. This card makes no claim about decode speed or peak VRAM against an fp16 baseline, because this panel did not measure either.
|
| 72 |
- **One task.** Execution match on held-out text-to-SQL is what was scored. It says nothing about how this arm behaves on anything else, and a quantization that holds one task can lose another.
|
| 73 |
|