Add ONNX export for sqlcoder-7b-2
Browse filesFiles changed (11)
- .gitattributes+2
- README.mdAdded+61
- config.jsonAdded+29
- generation_config.jsonAdded+6
- model.onnxAdded+3
- model.onnx_dataAdded+3
- model_fp16.onnxAdded+3
- model_fp16.onnx_dataAdded+3
- special_tokens_map.jsonAdded+33
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+88
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines333435363732 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textmodel.onnx_data filter=lfs diff=lfs merge=lfs -textmodel_fp16.onnx_data filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061---license: otherbase_model: defog/sqlcoder-7b-2base_model_relation: quantizedlibrary_name: onnxpipeline_tag: text-generationtags:- onnx- onnxruntime- quantizedquantized_by: liodon-ai---
# sqlcoder-7b-2 β ONNX
ONNX export of [defog/sqlcoder-7b-2](https://huggingface.co/defog/sqlcoder-7b-2), published by [Liodon AI](https://huggingface.co/liodon-ai).Exported with [optimum](https://github.com/huggingface/optimum) (`optimum.exporters.onnx.main_export`,task `text-generation-with-past`, so the graph exposes past-key-value inputs/outputs for KV-cachedautoregressive decoding).
## Files
| File | Size | Notes ||------|------|-------|| `model.onnx` | 26.96 GB | FP32, full precision || `model_fp16.onnx` | 14.55 GB | FP16, for GPU execution providers |
## Quick Start
```pythonimport onnxruntime as ortfrom transformers import AutoTokenizer
tok = AutoTokenizer.from_pretrained("liodon-ai/sqlcoder-7b-2-ONNX")sess = ort.InferenceSession("model_quantized.onnx", providers=["CPUExecutionProvider"])# past_key_values.*.key / .value inputs must be supplied (zero-length tensors# for the first forward pass) -- see optimum's ORTModelForCausalLM for a# ready-made wrapper that handles KV-cache bookkeeping automatically:# from optimum.onnxruntime import ORTModelForCausalLM# model = ORTModelForCausalLM.from_pretrained("liodon-ai/sqlcoder-7b-2-ONNX", file_name="model_quantized.onnx")```
## Source
- **Model**: [defog/sqlcoder-7b-2](https://huggingface.co/defog/sqlcoder-7b-2)- **License**: other
## Citation
```bibtex@misc{liodonai_sqlcoder_7b_2_onnx, title = {sqlcoder-7b-2 β ONNX}, author = {{Liodon AI}}, year = {2026}, howpublished = {\url{https://huggingface.co/liodon-ai/sqlcoder-7b-2-ONNX}}, note = {ONNX export of defog/sqlcoder-7b-2}}```
---*Exported by [Liodon AI](https://huggingface.co/liodon-ai)*1234567891011121314151617181920212223242526272829{ "architectures": [ "LlamaForCausalLM" ], "attention_bias": false, "attention_dropout": 0.0, "bos_token_id": 1, "dtype": "float32", "eos_token_id": 2, "head_dim": 128, "hidden_act": "silu", "hidden_size": 4096, "initializer_range": 0.02, "intermediate_size": 11008, "max_position_embeddings": 16384, "mlp_bias": false, "model_type": "llama", "num_attention_heads": 32, "num_hidden_layers": 32, "num_key_value_heads": 32, "pretraining_tp": 1, "rms_norm_eps": 1e-05, "rope_scaling": null, "rope_theta": 1000000, "tie_word_embeddings": false, "transformers_version": "4.57.6", "use_cache": true, "vocab_size": 32016}123456{ "_from_model_config": true, "bos_token_id": 1, "eos_token_id": 2, "transformers_version": "4.57.6"}123version https://git-lfs.github.com/spec/v1oid sha256:2862dd7285b835cc4a94c9f6566e1a0bb4926ee06a329fea87d5cc8f33d86845size 950975123version https://git-lfs.github.com/spec/v1oid sha256:351b6a28f08e58a6bbf97f50c730552cd38624fa9daf67ed353b04b9a68abd90size 26954187008123version https://git-lfs.github.com/spec/v1oid sha256:21cb1ec92d4dbbbca33d1c16a622b0b3b96d2fe052c14209289c4c0c7d3910f5size 961796123version https://git-lfs.github.com/spec/v1oid sha256:5029c9897db67b3971b3a2404a1903afd17bb2bad567e49935c9c98110eabe98size 14550835456123456789101112131415161718192021222324252627282930313233{ "additional_special_tokens": [ "β<PRE>", "β<MID>", "β<SUF>", "β<EOT>", "β<PRE>", "β<MID>", "β<SUF>", "β<EOT>" ], "bos_token": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eos_token": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788{ "add_bos_token": true, "add_eos_token": false, "added_tokens_decoder": { "0": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "1": { "content": "<s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "2": { "content": "</s>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32007": { "content": "β<PRE>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32008": { "content": "β<SUF>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32009": { "content": "β<MID>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "32010": { "content": "β<EOT>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "additional_special_tokens": [ "β<PRE>", "β<MID>", "β<SUF>", "β<EOT>", "β<PRE>", "β<MID>", "β<SUF>", "β<EOT>" ], "bos_token": "<s>", "clean_up_tokenization_spaces": false, "eos_token": "</s>", "eot_token": "β<EOT>", "extra_special_tokens": {}, "fill_token": "<FILL_ME>", "legacy": null, "middle_token": "β<MID>", "model_max_length": 1000000000000000019884624838656, "pad_token": null, "prefix_token": "β<PRE>", "sp_model_kwargs": {}, "suffix_token": "β<SUF>", "tokenizer_class": "CodeLlamaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}.gitattributes+2
README.mdAdded+61
config.jsonAdded+29
generation_config.jsonAdded+6
model.onnxAdded+3
model.onnx_dataAdded+3
model_fp16.onnxAdded+3
model_fp16.onnx_dataAdded+3
special_tokens_map.jsonAdded+33
tokenizer.jsonAdded
tokenizer_config.jsonAdded+88