Instructions to use VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit") model = AutoModelForCausalLM.from_pretrained("VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit", 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/Qwen3.8-27B-text2sql-DynQuant-3bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit" # 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/Qwen3.8-27B-text2sql-DynQuant-3bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit
- SGLang
How to use VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit 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/Qwen3.8-27B-text2sql-DynQuant-3bit" \ --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/Qwen3.8-27B-text2sql-DynQuant-3bit", "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/Qwen3.8-27B-text2sql-DynQuant-3bit" \ --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/Qwen3.8-27B-text2sql-DynQuant-3bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit with Docker Model Runner:
docker model run hf.co/VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit
Qwen3.8-27B-text2sql-DynQuant-3bit
Qwen/Qwen3.8-27B, fine-tuned for text-to-SQL with QLoRA and then quantized with DynQuant to 2.999 bits per weight (9.41 GiB on disk).
DynQuant gives every module its own width, driven by two signals measured during the fine-tune: how much activation mass each weight sees, and how unstable its gradient is across optimizer steps. Modules the training dynamics say are load-bearing keep their bits; the rest pay for them.
Read this first
This architecture has a floor budget of 4.0196 bits -- the narrowest average width at which every module can still be given the minimum its role requires. That is measured, not assumed: it is the narrowest budget in this campaign's sweep that breached no floor.
This arm was exported at 2.999 bits, 1.02 bits below it. So it is not an allocation within the architecture's limits; it is a measurement of what overriding those limits costs. The table further down names every floor it broke. The score was measured exactly as every other arm's was -- what it is a score of is a deliberately over-compressed model.
For the smallest arm that breaks nothing, use the 4.02-bit budget instead.
Results
Execution accuracy on the held-out validation split of spider, gretel, wikisql, 400 problems, greedy decode.
| Model | Bits | Size | Accuracy | vs bf16 | p |
|---|---|---|---|---|---|
| bf16 (unquantized) | 16 | -- | 85.50% | -- | -- |
| this checkpoint | 2.999 | 9.41 GiB | 79.50% | -6.00 | 1.93e-05 |
The comparison is paired: both arms answered the same problems in the same order, so the difference is a McNemar test on the per-problem outcomes rather than two independent accuracies subtracted.
Decode budget was 1024 new tokens, and 0 generations reached it without finishing. A short decode budget scores a model that deliberates as though it were wrong, so this is reported rather than assumed.
What the allocator did
498 modules were quantized at group size 128, scored by the rank_product allocator.
| Width | Modules | Parameters | Share |
|---|---|---|---|
| 2-bit | 112 | 6,878,658,560 | 25.58% |
| 3-bit | 290 | 19,991,101,440 | 74.33% |
| 8-bit | 96 | 23,592,960 | 0.09% |
Floors
Each role carries a minimum width below which that role is known to break -- an embedding, an LM head, an attention projection and an MLP gate do not tolerate the same compression. When a budget cannot pay for every floor, DynQuant breaks the cheapest ones and reports every one it broke, rather than quietly lowering a floor until the arithmetic works.
310 modules were allocated below the floor their role requires:
| Role | Modules | Parameters | Floor | Given |
|---|---|---|---|---|
mlp.gate |
64 | 5,704,253,440 | 4b | 2b/3b |
lin_attn.qkv |
48 | 2,516,582,400 | 4b | 2b/3b |
mlp.down |
18 | 1,604,321,280 | 3b | 2b |
mlp.up |
18 | 1,604,321,280 | 3b | 2b |
lin_attn.z |
48 | 1,509,949,440 | 4b | 2b/3b |
lin_attn.out |
48 | 1,509,949,440 | 4b | 2b/3b |
lm_head |
1 | 1,271,398,400 | 8b | 3b |
embedding |
1 | 1,271,398,400 | 4b | 3b |
attn.q_gate |
16 | 1,006,632,960 | 4b | 2b/3b |
attn.o |
16 | 503,316,480 | 4b | 2b/3b |
attn.k |
16 | 83,886,080 | 4b | 2b/3b |
attn.v |
16 | 83,886,080 | 4b | 2b/3b |
Use it
pip install "dynquant[hf]"
from transformers import AutoModelForCausalLM, AutoTokenizer
import dynquant
# Both lines are needed. transformers has no entry-point discovery for
# quantization methods, so without the registration call it skips the
# quantization it does not recognise and hands back a randomly initialised
# model -- fluent-looking output, no exception, no non-zero exit.
dynquant.register_hf_quantizer()
model = AutoModelForCausalLM.from_pretrained("VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit")
That path is measured rather than assumed: this repo was pulled from the Hub and loaded with the released wheel on torch 2.13, and the graph that came back was checked to hold 498 DynQuant modules at the widths in the table above.
Serving
vllm serve VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit does not work, and the failure belongs here rather than in your terminal:
ValueError: There is no module or parameter named 'embed_tokens.offsets' in Qwen3_5Model
vLLM builds this architecture's input embedding without offering it to a quantization plugin at all, so a packed model.embed_tokens has nowhere to land. It is not a flag you are missing and it is not the plugin failing to register: on vLLM 0.27.1 the DynQuant plugin loads, the engine reports quantization=dynquant, and then this raises.
That one tensor is the whole gap. Re-exported with the input embedding in the compute dtype and the other 497 quantized modules left exactly as they are, this arm serves on vLLM 0.27.1 and answers correctly -- so nothing else in the allocation is in the way. That export is not what is published here. Until it is, use the transformers path above.
How it was made
Base:
Qwen/Qwen3.8-27B, text tower onlyRegime: qlora, LoRA rank 32
Data: 9,999 conversations from
spider,gretel,wikisql,create-context, 350,799 supervised tokensSteps: 625 at effective batch 16, lr 0.0001, final train loss 0.0963
Signals: collected from 546 modules during the fine-tune itself, with no extra forward or backward pass
DynQuant: 0.5.2
Contamination: the training split was matched against every evaluation item and 601 examples were dropped for colliding with one. No source overlaps an evaluation task after that.
Citation
The method has no published paper yet, so these cite the code and these weights.
@software{dynquant,
author = {Kamboj, Vikrampal},
title = {{DynQuant}: dynamic-signal quantization for large language models},
version = {0.5.2},
url = {https://github.com/kambojvikram/dynquant},
year = {2026}
}
@misc{qwen3_8_27b_text2sql_dynquant_3bit,
author = {Kamboj, Vikrampal},
title = {Qwen3.8-27B-text2sql-DynQuant-3bit},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit}}
}
Limitations
Fine-tuned and evaluated on text-to-SQL. General-purpose ability was not measured, and quantization is not free elsewhere.
Only the base model's text tower was trained and quantized. This checkpoint does not carry the vision path.
The score is execution accuracy on the datasets named above, against their own schemas. Accuracy on your schemas is a different measurement.
310 modules sit below their role's floor; the table above says which.
- Downloads last month
- 279
Model tree for VikramPal/Qwen3.8-27B-text2sql-DynQuant-3bit
Base model
Qwen/Qwen3.8-27B