Text Generation
Transformers
Safetensors
English
zamba2
mamba
hybrid
compressed
hxq
helix-substrate
vector-quantization
helixcode
conversational
Instructions to use EchoLabs33/zamba2-7b-instruct-hxq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EchoLabs33/zamba2-7b-instruct-hxq with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EchoLabs33/zamba2-7b-instruct-hxq") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EchoLabs33/zamba2-7b-instruct-hxq") model = AutoModelForCausalLM.from_pretrained("EchoLabs33/zamba2-7b-instruct-hxq", 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 EchoLabs33/zamba2-7b-instruct-hxq with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EchoLabs33/zamba2-7b-instruct-hxq" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EchoLabs33/zamba2-7b-instruct-hxq", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/EchoLabs33/zamba2-7b-instruct-hxq
- SGLang
How to use EchoLabs33/zamba2-7b-instruct-hxq 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 "EchoLabs33/zamba2-7b-instruct-hxq" \ --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": "EchoLabs33/zamba2-7b-instruct-hxq", "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 "EchoLabs33/zamba2-7b-instruct-hxq" \ --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": "EchoLabs33/zamba2-7b-instruct-hxq", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use EchoLabs33/zamba2-7b-instruct-hxq with Docker Model Runner:
docker model run hf.co/EchoLabs33/zamba2-7b-instruct-hxq
| { | |
| "work_order": "WO-BUFFERED-FORWARD-01", | |
| "model": "Zamba2-7B-Instruct", | |
| "gpu": "RTX 3090 24GB", | |
| "results": [ | |
| { | |
| "config": "Dense BF16", | |
| "ppl": 4.8211, | |
| "tok_s": 1445.9, | |
| "vram_load_mb": 14032.0, | |
| "vram_peak_mb": 14686.0 | |
| }, | |
| { | |
| "config": "bnb 4-bit NF4", | |
| "ppl": 5.0664, | |
| "tok_s": 1579.4, | |
| "vram_load_mb": 5129.4, | |
| "vram_peak_mb": 5904.0 | |
| }, | |
| { | |
| "config": "HXQ 12-bit packed (buffered)", | |
| "ppl": 5.0153, | |
| "tok_s": 1763.7, | |
| "vram_load_mb": 5657.2, | |
| "vram_warmup_mb": 5864.6, | |
| "vram_peak_mb": 6510.7 | |
| }, | |
| { | |
| "config": "HXQ 12-bit packed (fused)", | |
| "ppl": 5.0228, | |
| "tok_s": 283.5, | |
| "vram_load_mb": 6079.5, | |
| "vram_peak_mb": 7108.9 | |
| } | |
| ], | |
| "cost": { | |
| "wall_time_s": -0.0, | |
| "hostname": "8552b21e-f647-40e8-ab36-30dc6fb62665", | |
| "timestamp": "2026-04-02T14:31:44" | |
| } | |
| } |