Instructions to use LoudAI/Mistral-7B-Instruct-SQL-ian with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LoudAI/Mistral-7B-Instruct-SQL-ian with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LoudAI/Mistral-7B-Instruct-SQL-ian") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LoudAI/Mistral-7B-Instruct-SQL-ian") model = AutoModelForCausalLM.from_pretrained("LoudAI/Mistral-7B-Instruct-SQL-ian", 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 LoudAI/Mistral-7B-Instruct-SQL-ian with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LoudAI/Mistral-7B-Instruct-SQL-ian" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LoudAI/Mistral-7B-Instruct-SQL-ian", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LoudAI/Mistral-7B-Instruct-SQL-ian
- SGLang
How to use LoudAI/Mistral-7B-Instruct-SQL-ian 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 "LoudAI/Mistral-7B-Instruct-SQL-ian" \ --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": "LoudAI/Mistral-7B-Instruct-SQL-ian", "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 "LoudAI/Mistral-7B-Instruct-SQL-ian" \ --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": "LoudAI/Mistral-7B-Instruct-SQL-ian", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LoudAI/Mistral-7B-Instruct-SQL-ian with Docker Model Runner:
docker model run hf.co/LoudAI/Mistral-7B-Instruct-SQL-ian
kubwa(LoudAI) commited on
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,11 +15,16 @@ This model is a fine-tuned version of mistralai/Mistral-7B-Instruct-v0.3. https:
|
|
| 15 |
- **Developed by:** kubwa
|
| 16 |
- **Base Model Name:** mistralai/Mistral-7B-Instruct-v0.3
|
| 17 |
- **Base Model URL:** [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
- **Dataset Name:** gretelai/synthetic_text_to_sql
|
| 19 |
- **Dataset URL:** [synthetic_text_to_sql](https://huggingface.co/datasets/gretelai/synthetic_text_to_sql)
|
| 20 |
- **Dataset Description:** gretelai/synthetic_text_to_sql is a rich dataset of high quality synthetic Text-to-SQL samples, designed and generated using Gretel Navigator, and released under Apache 2.0.
|
| 21 |
-
|
| 22 |
-
-
|
| 23 |
## Prompt Template
|
| 24 |
|
| 25 |
```
|
|
@@ -91,3 +96,8 @@ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
|
| 91 |
This result shows that John Doe sold a total of 270 cubic units of timber, while Jane Smith sold 180 cubic units. The result is sorted by the total volume in descending order.
|
| 92 |
```
|
| 93 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
- **Developed by:** kubwa
|
| 16 |
- **Base Model Name:** mistralai/Mistral-7B-Instruct-v0.3
|
| 17 |
- **Base Model URL:** [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3)
|
| 18 |
+
- **Base Model Description:** The Mistral-7B-Instruct-v0.3 Large Language Model (LLM) is an instruct fine-tuned version of the Mistral-7B-v0.3.
|
| 19 |
+
Mistral-7B-v0.3 has the following changes compared to Mistral-7B-v0.2
|
| 20 |
+
|
| 21 |
+
- Extended vocabulary to 32768
|
| 22 |
+
- Supports v3 Tokenizer
|
| 23 |
+
- Supports function calling
|
| 24 |
- **Dataset Name:** gretelai/synthetic_text_to_sql
|
| 25 |
- **Dataset URL:** [synthetic_text_to_sql](https://huggingface.co/datasets/gretelai/synthetic_text_to_sql)
|
| 26 |
- **Dataset Description:** gretelai/synthetic_text_to_sql is a rich dataset of high quality synthetic Text-to-SQL samples, designed and generated using Gretel Navigator, and released under Apache 2.0.
|
| 27 |
+
|
|
|
|
| 28 |
## Prompt Template
|
| 29 |
|
| 30 |
```
|
|
|
|
| 96 |
This result shows that John Doe sold a total of 270 cubic units of timber, while Jane Smith sold 180 cubic units. The result is sorted by the total volume in descending order.
|
| 97 |
```
|
| 98 |
|
| 99 |
+
## Hardware and Software
|
| 100 |
+
- **Training Hardware:** 4 Tesla V100-PCIE-32GB GPUs
|
| 101 |
+
|
| 102 |
+
## License
|
| 103 |
+
- Apache-2.0
|