Instructions to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="EchoLabs33/Zamba2-7B-Instruct-v2-GGUF", filename="zamba2-7b-instruct-v2-q4_0.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0 # Run inference directly in the terminal: llama cli -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0 # Run inference directly in the terminal: llama cli -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
Use Docker
docker model run hf.co/EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
- LM Studio
- Jan
- vLLM
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF 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-v2-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EchoLabs33/Zamba2-7B-Instruct-v2-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
- Ollama
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with Ollama:
ollama run hf.co/EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
- Unsloth Studio
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for EchoLabs33/Zamba2-7B-Instruct-v2-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for EchoLabs33/Zamba2-7B-Instruct-v2-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for EchoLabs33/Zamba2-7B-Instruct-v2-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with Docker Model Runner:
docker model run hf.co/EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
- Lemonade
How to use EchoLabs33/Zamba2-7B-Instruct-v2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull EchoLabs33/Zamba2-7B-Instruct-v2-GGUF:Q4_0
Run and chat with the model
lemonade run user.Zamba2-7B-Instruct-v2-GGUF-Q4_0
List all available models
lemonade list
Zamba2 7B Instruct v2 - GGUF
GGUF conversions of Zyphra/Zamba2-7B-instruct-v2 for use with llama.cpp.
Architecture
Zamba2 is a hybrid Mamba-2 + shared Transformer architecture by Zyphra.
- 7B parameters, 81 layers (13 hybrid attention blocks, 2 shared transformers cycling even/odd)
- Hidden size: 3584, attention hidden: 7168
- SSM: d_state=64, d_conv=4, ngroups=2
- Requires llama.cpp with Zamba2 support (PR #21412)
Available Quantizations
| Quant | Size | BPW | Prompt tok/s | Gen tok/s | Hardware |
|---|---|---|---|---|---|
| Q4_0 | 5.9 GB | 4.53 | 160.2 | 15.2 | RTX 4090 |
| Q8_0 | 11 GB | 8.51 | 147.7 | 14.0 | RTX 4090 |
Sample Output (Q4_0)
Q: What is the capital of France and why is it significant?
A: The capital of France is Paris, a city that holds significant historical, cultural, and economic importance. Paris, often referred to as the "City of Light" or "City of Love," is not only the heart of France but also a global hub for art, fashion, gastronomy, and culture. Paris is renowned for its iconic landmarks such as the Eiffel Tower, the Louvre Museum, and Notre-Dame Cathedral, which attract millions of visitors each year.
Usage
# Build llama.cpp with Zamba2 support
git clone https://github.com/echo313unfolding/llama.cpp -b zamba2-support
cd llama.cpp && cmake -B build -DGGML_CUDA=ON && cmake --build build -j
# Run
./build/bin/llama-cli -m zamba2-7b-instruct-v2-q4_0.gguf \
-p "<|im_start|>user\nWhat is quantum computing?<|im_end|>\n<|im_start|>assistant\n" \
-n 256 -ngl 999 -e --no-conversation
Conversion Details
Converted from HF safetensors using a custom Zamba2-to-GGUF converter:
- Mamba-2 SSM layers: A_log to A conversion, conv1d squeeze, dt projection
- 2 shared transformer blocks with per-layer LoRA unfolding (W_eff = W_shared + B @ A)
- Per-layer
n_head_kvarray (0 for Mamba layers, 32 for attention layers) - Group norm reshape for ngroups=2 (GGML column-major convention)
- BPE tokenizer (v2 format)
- F32 master, quantized with
llama-quantize
Credits
- Downloads last month
- 46
4-bit
8-bit