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
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -25,6 +25,33 @@ model-index:
|
|
| 25 |
- name: Perplexity
|
| 26 |
type: perplexity
|
| 27 |
value: 3.8454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
---
|
| 29 |
|
| 30 |
# Zamba2-7B-Instruct-HXQ
|
|
@@ -51,6 +78,18 @@ All numbers from a single session, same GPU, same WikiText-2 test set (50 chunks
|
|
| 51 |
- **Better quality than bnb 4-bit** (5.02 vs 5.07 PPL) at comparable VRAM
|
| 52 |
- **No calibration data required** -- unlike GPTQ, AWQ, or bnb, HXQ compresses from weights alone
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
## Install and Run
|
| 55 |
|
| 56 |
```bash
|
|
|
|
| 25 |
- name: Perplexity
|
| 26 |
type: perplexity
|
| 27 |
value: 3.8454
|
| 28 |
+
- task:
|
| 29 |
+
type: text-generation
|
| 30 |
+
dataset:
|
| 31 |
+
name: HellaSwag
|
| 32 |
+
type: hellaswag
|
| 33 |
+
metrics:
|
| 34 |
+
- name: acc_norm
|
| 35 |
+
type: acc_norm
|
| 36 |
+
value: 0.8106
|
| 37 |
+
- task:
|
| 38 |
+
type: text-generation
|
| 39 |
+
dataset:
|
| 40 |
+
name: ARC-Challenge
|
| 41 |
+
type: ai2_arc
|
| 42 |
+
metrics:
|
| 43 |
+
- name: acc_norm
|
| 44 |
+
type: acc_norm
|
| 45 |
+
value: 0.5811
|
| 46 |
+
- task:
|
| 47 |
+
type: text-generation
|
| 48 |
+
dataset:
|
| 49 |
+
name: ARC-Easy
|
| 50 |
+
type: ai2_arc
|
| 51 |
+
metrics:
|
| 52 |
+
- name: acc_norm
|
| 53 |
+
type: acc_norm
|
| 54 |
+
value: 0.8190
|
| 55 |
---
|
| 56 |
|
| 57 |
# Zamba2-7B-Instruct-HXQ
|
|
|
|
| 78 |
- **Better quality than bnb 4-bit** (5.02 vs 5.07 PPL) at comparable VRAM
|
| 79 |
- **No calibration data required** -- unlike GPTQ, AWQ, or bnb, HXQ compresses from weights alone
|
| 80 |
|
| 81 |
+
## Downstream Task Evaluation (lm-eval-harness v0.4.11)
|
| 82 |
+
|
| 83 |
+
Same GPU (RTX 3090), same harness, same settings. All metrics are `acc_norm`.
|
| 84 |
+
|
| 85 |
+
| Task | Dense BF16 | HXQ 2D VQ | Delta |
|
| 86 |
+
|------|-----------|-----------|-------|
|
| 87 |
+
| **HellaSwag** | 80.79% | 81.06% | +0.27% |
|
| 88 |
+
| **ARC-Challenge** | 59.39% | 58.11% | -1.28% |
|
| 89 |
+
| **ARC-Easy** | 83.21% | 81.90% | -1.31% |
|
| 90 |
+
|
| 91 |
+
Compression preserves task performance within noise. HellaSwag (commonsense reasoning) is slightly *better* under compression. ARC drops are within 1.3%.
|
| 92 |
+
|
| 93 |
## Install and Run
|
| 94 |
|
| 95 |
```bash
|