Instructions to use richardr1126/spider-skeleton-wizard-coder-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use richardr1126/spider-skeleton-wizard-coder-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="richardr1126/spider-skeleton-wizard-coder-merged")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("richardr1126/spider-skeleton-wizard-coder-merged") model = AutoModelForCausalLM.from_pretrained("richardr1126/spider-skeleton-wizard-coder-merged") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use richardr1126/spider-skeleton-wizard-coder-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "richardr1126/spider-skeleton-wizard-coder-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "richardr1126/spider-skeleton-wizard-coder-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/richardr1126/spider-skeleton-wizard-coder-merged
- SGLang
How to use richardr1126/spider-skeleton-wizard-coder-merged 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 "richardr1126/spider-skeleton-wizard-coder-merged" \ --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": "richardr1126/spider-skeleton-wizard-coder-merged", "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 "richardr1126/spider-skeleton-wizard-coder-merged" \ --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": "richardr1126/spider-skeleton-wizard-coder-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use richardr1126/spider-skeleton-wizard-coder-merged with Docker Model Runner:
docker model run hf.co/richardr1126/spider-skeleton-wizard-coder-merged
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("richardr1126/spider-skeleton-wizard-coder-merged")
model = AutoModelForCausalLM.from_pretrained("richardr1126/spider-skeleton-wizard-coder-merged")Spider Skeleton Wizard Coder Summary
- This model was created by finetuning WizardLM/WizardCoder-15B-V1.0 on an enhanced Spider context training dataset: richardr1126/spider-skeleton-context-instruct.
- Finetuning was performed using QLoRa on 3x RTX6000 48GB.
- If you want just the QLoRa/LoRA adapter: richardr1126/spider-skeleton-wizard-coder-qlora
Running the GGML model
- The best way to run this model is to use the 4-bit GGML version on koboldcpp, with CuBlas support.
Spider Dataset
Spider is a large-scale complex and cross-domain semantic parsing and text-to-SQL dataset annotated by 11 Yale students The goal of the Spider challenge is to develop natural language interfaces to cross-domain databases.
This dataset was used to finetune this model.
Spider Skeleton WizardCoder - test-suite-sql-eval Results
With temperature set to 0.0, top_p set to 0.9, and top_k set to 0, the model achieves 61% execution accuracy on the Spider dev set.
Note:
- ChatGPT was evaluated with the default hyperparameters and with the system message
You are a sophisticated AI assistant capable of converting text into SQL queries. You can only output SQL, don't add any other text. - Both models were evaluated with
--plug_valueinevaluation.pyusing the Spider dev set with database context.--plug_value: If set, the gold value will be plugged into the predicted query. This is suitable if your model does not predict values. This is set toFalseby default.
Citations
@misc{luo2023wizardcoder,
title={WizardCoder: Empowering Code Large Language Models with Evol-Instruct},
author={Ziyang Luo and Can Xu and Pu Zhao and Qingfeng Sun and Xiubo Geng and Wenxiang Hu and Chongyang Tao and Jing Ma and Qingwei Lin and Daxin Jiang},
year={2023},
}
@article{yu2018spider,
title={Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
author={Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and others},
journal={arXiv preprint arXiv:1809.08887},
year={2018}
}
@article{dettmers2023qlora,
title={QLoRA: Efficient Finetuning of Quantized LLMs},
author={Dettmers, Tim and Pagnoni, Artidoro and Holtzman, Ari and Zettlemoyer, Luke},
journal={arXiv preprint arXiv:2305.14314},
year={2023}
}
Disclaimer
The resources, including code, data, and model weights, associated with this project are restricted for academic research purposes only and cannot be used for commercial purposes. The content produced by any version of WizardCoder is influenced by uncontrollable variables such as randomness, and therefore, the accuracy of the output cannot be guaranteed by this project. This project does not accept any legal liability for the content of the model output, nor does it assume responsibility for any losses incurred due to the use of associated resources and output results.
- Downloads last month
- 14
Model tree for richardr1126/spider-skeleton-wizard-coder-merged
Datasets used to train richardr1126/spider-skeleton-wizard-coder-merged
richardr1126/spider-skeleton-context-instruct
Space using richardr1126/spider-skeleton-wizard-coder-merged 1
Papers for richardr1126/spider-skeleton-wizard-coder-merged
QLoRA: Efficient Finetuning of Quantized LLMs
Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task
Evaluation results
- Test Suite SQL Eval - Execution Accuracy on Spider Dev w/ Database Contextself-reported0.610
- Test Suite SQL Eval - Exact Matching Accuracy on Spider Dev w/ Database Contextself-reported0.568
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="richardr1126/spider-skeleton-wizard-coder-merged")