Text Generation
Transformers
Safetensors
kambo
dynquant
quantized
3-bit
text-to-sql
code
mixture-of-experts
Mixture of Experts
hybrid-architecture
conversational
custom_code
Instructions to use VikramPal/kambo-v1-sql-code-DynQuant-3bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VikramPal/kambo-v1-sql-code-DynQuant-3bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="VikramPal/kambo-v1-sql-code-DynQuant-3bit", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("VikramPal/kambo-v1-sql-code-DynQuant-3bit", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use VikramPal/kambo-v1-sql-code-DynQuant-3bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "VikramPal/kambo-v1-sql-code-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/kambo-v1-sql-code-DynQuant-3bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/VikramPal/kambo-v1-sql-code-DynQuant-3bit
- SGLang
How to use VikramPal/kambo-v1-sql-code-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/kambo-v1-sql-code-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/kambo-v1-sql-code-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/kambo-v1-sql-code-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/kambo-v1-sql-code-DynQuant-3bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use VikramPal/kambo-v1-sql-code-DynQuant-3bit with Docker Model Runner:
docker model run hf.co/VikramPal/kambo-v1-sql-code-DynQuant-3bit
Download dynquant_allocation.json from VikramPal/kambo-v1-sql-code-DynQuant-3bit: direct link, hf CLI and curl.
- Browser
- Download file 9.47 kB
-
https://huggingface.co/VikramPal/kambo-v1-sql-code-DynQuant-3bit/resolve/main/dynquant_allocation.json
- Command line
-
hf download hf://VikramPal/kambo-v1-sql-code-DynQuant-3bit/dynquant_allocation.json
-
curl -L -o dynquant_allocation.json https://huggingface.co/VikramPal/kambo-v1-sql-code-DynQuant-3bit/resolve/main/dynquant_allocation.json
9.47 kB
| { | |
| "schema": "dynquant_allocation_v1", | |
| "dynquant_core": "0.5.3", | |
| "model": "runs/ft/model", | |
| "stats": "runs/ft/stats", | |
| "allocator": "sensitivity", | |
| "group_size": 128, | |
| "map_key": "3.25", | |
| "map": { | |
| "target_label": "3.25 avg bits", | |
| "average_bits": 3.249502780629039, | |
| "nbytes": 686943744, | |
| "group_size": 128, | |
| "pricing": { | |
| "measured_modules": 133, | |
| "proxied_modules": 72, | |
| "measured_params": 331743232, | |
| "proxied_params": 1358954496, | |
| "proxied_share": 0.803783239010776, | |
| "scale": 1.1908850493541702e-17 | |
| }, | |
| "histogram": { | |
| "2": 35, | |
| "3": 26, | |
| "4": 117, | |
| "8": 27 | |
| }, | |
| "violations": [ | |
| { | |
| "name": "model.embed_tokens", | |
| "role": "embedding", | |
| "floor_bits": 8, | |
| "assigned_bits": 4, | |
| "num_params": 155582464 | |
| }, | |
| { | |
| "name": "model.layers.1.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 2, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.19.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.2.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 2, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.20.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 2, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.21.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.22.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.3.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.4.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.5.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.6.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| }, | |
| { | |
| "name": "model.layers.7.moe.w1", | |
| "role": "moe.expert.gate", | |
| "floor_bits": 4, | |
| "assigned_bits": 3, | |
| "num_params": 18874368 | |
| } | |
| ], | |
| "bits": { | |
| "model.embed_tokens": 4, | |
| "model.layers.0.conv.in_proj": 4, | |
| "model.layers.0.conv.out_proj": 8, | |
| "model.layers.0.moe.sw1": 4, | |
| "model.layers.0.moe.sw2": 4, | |
| "model.layers.0.moe.sw3": 4, | |
| "model.layers.0.moe.w1": 4, | |
| "model.layers.0.moe.w2": 2, | |
| "model.layers.0.moe.w3": 3, | |
| "model.layers.1.conv.in_proj": 4, | |
| "model.layers.1.conv.out_proj": 4, | |
| "model.layers.1.moe.sw1": 4, | |
| "model.layers.1.moe.sw2": 3, | |
| "model.layers.1.moe.sw3": 3, | |
| "model.layers.1.moe.w1": 2, | |
| "model.layers.1.moe.w2": 2, | |
| "model.layers.1.moe.w3": 2, | |
| "model.layers.10.conv.in_proj": 4, | |
| "model.layers.10.conv.out_proj": 4, | |
| "model.layers.10.moe.sw1": 4, | |
| "model.layers.10.moe.sw2": 4, | |
| "model.layers.10.moe.sw3": 4, | |
| "model.layers.10.moe.w1": 4, | |
| "model.layers.10.moe.w2": 3, | |
| "model.layers.10.moe.w3": 3, | |
| "model.layers.11.moe.sw1": 4, | |
| "model.layers.11.moe.sw2": 4, | |
| "model.layers.11.moe.sw3": 4, | |
| "model.layers.11.moe.w1": 4, | |
| "model.layers.11.moe.w2": 3, | |
| "model.layers.11.moe.w3": 3, | |
| "model.layers.11.self_attn.k_proj": 8, | |
| "model.layers.11.self_attn.o_proj": 8, | |
| "model.layers.11.self_attn.q_proj": 8, | |
| "model.layers.11.self_attn.v_proj": 8, | |
| "model.layers.12.conv.in_proj": 4, | |
| "model.layers.12.conv.out_proj": 4, | |
| "model.layers.12.moe.sw1": 4, | |
| "model.layers.12.moe.sw2": 4, | |
| "model.layers.12.moe.sw3": 4, | |
| "model.layers.12.moe.w1": 4, | |
| "model.layers.12.moe.w2": 3, | |
| "model.layers.12.moe.w3": 2, | |
| "model.layers.13.conv.in_proj": 4, | |
| "model.layers.13.conv.out_proj": 4, | |
| "model.layers.13.moe.sw1": 4, | |
| "model.layers.13.moe.sw2": 4, | |
| "model.layers.13.moe.sw3": 4, | |
| "model.layers.13.moe.w1": 4, | |
| "model.layers.13.moe.w2": 3, | |
| "model.layers.13.moe.w3": 3, | |
| "model.layers.14.conv.in_proj": 4, | |
| "model.layers.14.conv.out_proj": 4, | |
| "model.layers.14.moe.sw1": 4, | |
| "model.layers.14.moe.sw2": 8, | |
| "model.layers.14.moe.sw3": 4, | |
| "model.layers.14.moe.w1": 4, | |
| "model.layers.14.moe.w2": 3, | |
| "model.layers.14.moe.w3": 3, | |
| "model.layers.15.moe.sw1": 4, | |
| "model.layers.15.moe.sw2": 4, | |
| "model.layers.15.moe.sw3": 4, | |
| "model.layers.15.moe.w1": 4, | |
| "model.layers.15.moe.w2": 3, | |
| "model.layers.15.moe.w3": 3, | |
| "model.layers.15.self_attn.k_proj": 8, | |
| "model.layers.15.self_attn.o_proj": 8, | |
| "model.layers.15.self_attn.q_proj": 8, | |
| "model.layers.15.self_attn.v_proj": 8, | |
| "model.layers.16.conv.in_proj": 4, | |
| "model.layers.16.conv.out_proj": 4, | |
| "model.layers.16.moe.sw1": 4, | |
| "model.layers.16.moe.sw2": 4, | |
| "model.layers.16.moe.sw3": 4, | |
| "model.layers.16.moe.w1": 4, | |
| "model.layers.16.moe.w2": 2, | |
| "model.layers.16.moe.w3": 2, | |
| "model.layers.17.conv.in_proj": 4, | |
| "model.layers.17.conv.out_proj": 4, | |
| "model.layers.17.moe.sw1": 4, | |
| "model.layers.17.moe.sw2": 4, | |
| "model.layers.17.moe.sw3": 4, | |
| "model.layers.17.moe.w1": 4, | |
| "model.layers.17.moe.w2": 2, | |
| "model.layers.17.moe.w3": 2, | |
| "model.layers.18.conv.in_proj": 4, | |
| "model.layers.18.conv.out_proj": 4, | |
| "model.layers.18.moe.sw1": 4, | |
| "model.layers.18.moe.sw2": 8, | |
| "model.layers.18.moe.sw3": 4, | |
| "model.layers.18.moe.w1": 4, | |
| "model.layers.18.moe.w2": 2, | |
| "model.layers.18.moe.w3": 2, | |
| "model.layers.19.moe.sw1": 4, | |
| "model.layers.19.moe.sw2": 8, | |
| "model.layers.19.moe.sw3": 4, | |
| "model.layers.19.moe.w1": 3, | |
| "model.layers.19.moe.w2": 2, | |
| "model.layers.19.moe.w3": 2, | |
| "model.layers.19.self_attn.k_proj": 8, | |
| "model.layers.19.self_attn.o_proj": 8, | |
| "model.layers.19.self_attn.q_proj": 8, | |
| "model.layers.19.self_attn.v_proj": 8, | |
| "model.layers.2.conv.in_proj": 4, | |
| "model.layers.2.conv.out_proj": 4, | |
| "model.layers.2.moe.sw1": 4, | |
| "model.layers.2.moe.sw2": 4, | |
| "model.layers.2.moe.sw3": 4, | |
| "model.layers.2.moe.w1": 2, | |
| "model.layers.2.moe.w2": 2, | |
| "model.layers.2.moe.w3": 2, | |
| "model.layers.20.conv.in_proj": 4, | |
| "model.layers.20.conv.out_proj": 4, | |
| "model.layers.20.moe.sw1": 4, | |
| "model.layers.20.moe.sw2": 4, | |
| "model.layers.20.moe.sw3": 4, | |
| "model.layers.20.moe.w1": 2, | |
| "model.layers.20.moe.w2": 2, | |
| "model.layers.20.moe.w3": 2, | |
| "model.layers.21.conv.in_proj": 4, | |
| "model.layers.21.conv.out_proj": 4, | |
| "model.layers.21.moe.sw1": 4, | |
| "model.layers.21.moe.sw2": 4, | |
| "model.layers.21.moe.sw3": 4, | |
| "model.layers.21.moe.w1": 3, | |
| "model.layers.21.moe.w2": 2, | |
| "model.layers.21.moe.w3": 2, | |
| "model.layers.22.conv.in_proj": 4, | |
| "model.layers.22.conv.out_proj": 4, | |
| "model.layers.22.moe.sw1": 4, | |
| "model.layers.22.moe.sw2": 4, | |
| "model.layers.22.moe.sw3": 4, | |
| "model.layers.22.moe.w1": 3, | |
| "model.layers.22.moe.w2": 2, | |
| "model.layers.22.moe.w3": 2, | |
| "model.layers.23.moe.sw1": 8, | |
| "model.layers.23.moe.sw2": 8, | |
| "model.layers.23.moe.sw3": 8, | |
| "model.layers.23.moe.w1": 4, | |
| "model.layers.23.moe.w2": 2, | |
| "model.layers.23.moe.w3": 2, | |
| "model.layers.23.self_attn.k_proj": 8, | |
| "model.layers.23.self_attn.o_proj": 4, | |
| "model.layers.23.self_attn.q_proj": 4, | |
| "model.layers.23.self_attn.v_proj": 8, | |
| "model.layers.3.moe.sw1": 4, | |
| "model.layers.3.moe.sw2": 4, | |
| "model.layers.3.moe.sw3": 4, | |
| "model.layers.3.moe.w1": 3, | |
| "model.layers.3.moe.w2": 2, | |
| "model.layers.3.moe.w3": 2, | |
| "model.layers.3.self_attn.k_proj": 8, | |
| "model.layers.3.self_attn.o_proj": 4, | |
| "model.layers.3.self_attn.q_proj": 4, | |
| "model.layers.3.self_attn.v_proj": 8, | |
| "model.layers.4.conv.in_proj": 4, | |
| "model.layers.4.conv.out_proj": 4, | |
| "model.layers.4.moe.sw1": 4, | |
| "model.layers.4.moe.sw2": 4, | |
| "model.layers.4.moe.sw3": 4, | |
| "model.layers.4.moe.w1": 3, | |
| "model.layers.4.moe.w2": 2, | |
| "model.layers.4.moe.w3": 2, | |
| "model.layers.5.conv.in_proj": 4, | |
| "model.layers.5.conv.out_proj": 4, | |
| "model.layers.5.moe.sw1": 4, | |
| "model.layers.5.moe.sw2": 4, | |
| "model.layers.5.moe.sw3": 4, | |
| "model.layers.5.moe.w1": 3, | |
| "model.layers.5.moe.w2": 2, | |
| "model.layers.5.moe.w3": 2, | |
| "model.layers.6.conv.in_proj": 4, | |
| "model.layers.6.conv.out_proj": 4, | |
| "model.layers.6.moe.sw1": 4, | |
| "model.layers.6.moe.sw2": 4, | |
| "model.layers.6.moe.sw3": 4, | |
| "model.layers.6.moe.w1": 3, | |
| "model.layers.6.moe.w2": 2, | |
| "model.layers.6.moe.w3": 2, | |
| "model.layers.7.moe.sw1": 4, | |
| "model.layers.7.moe.sw2": 4, | |
| "model.layers.7.moe.sw3": 4, | |
| "model.layers.7.moe.w1": 3, | |
| "model.layers.7.moe.w2": 2, | |
| "model.layers.7.moe.w3": 2, | |
| "model.layers.7.self_attn.k_proj": 8, | |
| "model.layers.7.self_attn.o_proj": 8, | |
| "model.layers.7.self_attn.q_proj": 8, | |
| "model.layers.7.self_attn.v_proj": 8, | |
| "model.layers.8.conv.in_proj": 4, | |
| "model.layers.8.conv.out_proj": 4, | |
| "model.layers.8.moe.sw1": 4, | |
| "model.layers.8.moe.sw2": 4, | |
| "model.layers.8.moe.sw3": 4, | |
| "model.layers.8.moe.w1": 4, | |
| "model.layers.8.moe.w2": 3, | |
| "model.layers.8.moe.w3": 3, | |
| "model.layers.9.conv.in_proj": 4, | |
| "model.layers.9.conv.out_proj": 4, | |
| "model.layers.9.moe.sw1": 4, | |
| "model.layers.9.moe.sw2": 4, | |
| "model.layers.9.moe.sw3": 4, | |
| "model.layers.9.moe.w1": 4, | |
| "model.layers.9.moe.w2": 3, | |
| "model.layers.9.moe.w3": 3 | |
| } | |
| } | |
| } |