File size: 1,892 Bytes
f60cd0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
license: other
base_model: defog/sqlcoder-7b-2
base_model_relation: quantized
library_name: onnx
pipeline_tag: text-generation
tags:
- onnx
- onnxruntime
- quantized
quantized_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-cached
autoregressive 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
```python
import onnxruntime as ort
from 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)*
|