barozp/ZAYA1-8B-BNB
ZAYA1-8B — bitsandbytes Quantizations
bitsandbytes quantizations of Zyphra/ZAYA1-8B.
Note: ZAYA1-8B uses a custom sparse MoE architecture (ZayaForCausalLM) that is not yet supported by llama.cpp. GGUF files will be added once support lands (issue #22776). In the meantime, these bitsandbytes quantizations provide a working alternative.Available Files
About ZAYA1-8B
ZAYA1-8B is a small mixture of experts language model with 760M active parameters and 8.4B total parameters trained end-to-end by Zyphra. It sets a new standard of intelligence efficiency for its parameter count through a combination of novel architecture and innovations in pretraining and post-training.
ZAYA1-8B excels at detailed long-form reasoning, especially for mathematical and coding tasks. Due to its small total parameter count, it can also be deployed on-device for local LLM applications.
- Technical report: https://www.zyphra.com/zaya1-8b-technical-report
- Blog post: https://www.zyphra.com/post/zaya1-8b
- Pretraining base: Zyphra/ZAYA1-reasoning-base
Performance


In-class comparison
Scaling comparison against larger models
All numbers from the Zyphra evaluation harness. Models ordered by total parameter count.
Download
HuggingFace's inference widget and one-click download are not available for this repo.ZayaForCausalLMrequires Zyphra's customtransformersfork — use the commands below.
Download a specific quantization
# NF4 (4-bit) — recommended
huggingface-cli download barozp/ZAYA1-8B-BNB --include "NF4/*" --local-dir ./ZAYA1-8B-NF4
# NF4 with double quantization
huggingface-cli download barozp/ZAYA1-8B-BNB --include "NF4-DQ/*" --local-dir ./ZAYA1-8B-NF4-DQ
# INT8 (8-bit)
huggingface-cli download barozp/ZAYA1-8B-BNB --include "INT8/*" --local-dir ./ZAYA1-8B-INT8Download everything
huggingface-cli download barozp/ZAYA1-8B-BNB --local-dir ./ZAYA1-8B-BNBUsage
Zyphra's custom transformers fork is required to load ZayaForCausalLM:
pip install "transformers @ git+https://github.com/Zyphra/transformers.git@zaya1"
pip install bitsandbytes>=0.43.0 accelerateLoad NF4 (4-bit)
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.bfloat16,
)
tokenizer = AutoTokenizer.from_pretrained("barozp/ZAYA1-8B-BNB", subfolder="NF4",
trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("barozp/ZAYA1-8B-BNB", subfolder="NF4",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True)Load INT8 (8-bit)
bnb_config = BitsAndBytesConfig(load_in_8bit=True)
tokenizer = AutoTokenizer.from_pretrained("barozp/ZAYA1-8B-BNB", subfolder="INT8",
trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("barozp/ZAYA1-8B-BNB", subfolder="INT8",
quantization_config=bnb_config,
device_map="auto",
trust_remote_code=True)Inference
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "What is the sum of the first 100 prime numbers?"},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
output = model.generate(input_ids, max_new_tokens=512)
print(tokenizer.decode(output[0][input_ids.shape[-1]:], skip_special_tokens=True))Quantization Details
- Source: Zyphra/ZAYA1-8B (BF16 safetensors)
- Method: bitsandbytes
- Quantized by: barozp
- GGUF status: Pending llama.cpp support — issue #22776
Original Model Prerequisites
# vLLM (recommended for serving)
pip install "vllm @ git+https://github.com/Zyphra/vllm.git@zaya1"
# Transformers
pip install "transformers @ git+https://github.com/Zyphra/transformers.git@zaya1"License
Apache 2.0 — same as the original model.
