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
add: RTX 4090 benchmark receipt (Dense, bnb-8bit, bnb-4bit, HXQ 2D VQ)
Browse files- zamba2_7b_comparison.json +71 -0
zamba2_7b_comparison.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"experiment": "WO-BNB-BASELINE-01",
|
| 3 |
+
"model": "Zamba2-7B-Instruct",
|
| 4 |
+
"eval_params": {
|
| 5 |
+
"dataset": "wikitext/wikitext-2-raw-v1/test",
|
| 6 |
+
"max_length": 2048,
|
| 7 |
+
"stride": 512,
|
| 8 |
+
"speed_iters": 100,
|
| 9 |
+
"speed_seq_len": 512
|
| 10 |
+
},
|
| 11 |
+
"configs": {
|
| 12 |
+
"dense_bf16": {
|
| 13 |
+
"name": "Dense BF16",
|
| 14 |
+
"ppl": 3.7216,
|
| 15 |
+
"n_tokens": 334660,
|
| 16 |
+
"n_chunks": 651,
|
| 17 |
+
"vram_load_mb": 14032.0,
|
| 18 |
+
"vram_peak_eval_mb": 16173.8,
|
| 19 |
+
"vram_peak_speed_mb": 14396.5,
|
| 20 |
+
"tokens_per_sec": 4385.2,
|
| 21 |
+
"speed_test_elapsed_s": 11.68,
|
| 22 |
+
"config_elapsed_s": 297.3
|
| 23 |
+
},
|
| 24 |
+
"bnb_8bit": {
|
| 25 |
+
"name": "bnb 8-bit (LLM.int8)",
|
| 26 |
+
"ppl": 3.7335,
|
| 27 |
+
"n_tokens": 334660,
|
| 28 |
+
"n_chunks": 651,
|
| 29 |
+
"vram_load_mb": 7831.3,
|
| 30 |
+
"vram_peak_eval_mb": 10011.6,
|
| 31 |
+
"vram_peak_speed_mb": 8188.0,
|
| 32 |
+
"tokens_per_sec": 2165.3,
|
| 33 |
+
"speed_test_elapsed_s": 23.65,
|
| 34 |
+
"config_elapsed_s": 334.3
|
| 35 |
+
},
|
| 36 |
+
"bnb_4bit_nf4": {
|
| 37 |
+
"name": "bnb 4-bit NF4",
|
| 38 |
+
"ppl": 3.8916,
|
| 39 |
+
"n_tokens": 334660,
|
| 40 |
+
"n_chunks": 651,
|
| 41 |
+
"vram_load_mb": 5106.6,
|
| 42 |
+
"vram_peak_eval_mb": 7240.4,
|
| 43 |
+
"vram_peak_speed_mb": 5590.6,
|
| 44 |
+
"tokens_per_sec": 3468.4,
|
| 45 |
+
"speed_test_elapsed_s": 14.76,
|
| 46 |
+
"config_elapsed_s": 332.6
|
| 47 |
+
},
|
| 48 |
+
"hxq_2dvq_k4096": {
|
| 49 |
+
"name": "HXQ 2D VQ k=4096",
|
| 50 |
+
"ppl": 3.8454,
|
| 51 |
+
"n_tokens": 334660,
|
| 52 |
+
"n_chunks": 651,
|
| 53 |
+
"vram_load_mb": 14040.1,
|
| 54 |
+
"vram_peak_eval_mb": 16173.8,
|
| 55 |
+
"vram_peak_speed_mb": 14396.5,
|
| 56 |
+
"tokens_per_sec": 4384.5,
|
| 57 |
+
"speed_test_elapsed_s": 11.68,
|
| 58 |
+
"config_elapsed_s": 343.0
|
| 59 |
+
}
|
| 60 |
+
},
|
| 61 |
+
"cost": {
|
| 62 |
+
"wall_time_s": 1311.822,
|
| 63 |
+
"cpu_time_s": 1440.214,
|
| 64 |
+
"peak_memory_mb": 16490.8,
|
| 65 |
+
"python_version": "3.10.12",
|
| 66 |
+
"hostname": "74efa4ce-5ef6-427c-b27b-336ce89875b5",
|
| 67 |
+
"timestamp_start": "2026-04-01T21:29:26",
|
| 68 |
+
"timestamp_end": "2026-04-01T21:51:18",
|
| 69 |
+
"gpu": "NVIDIA GeForce RTX 4090"
|
| 70 |
+
}
|
| 71 |
+
}
|