Instructions to use Zyphra/ZAYA1-reasoning-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zyphra/ZAYA1-reasoning-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zyphra/ZAYA1-reasoning-base") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Zyphra/ZAYA1-reasoning-base", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Zyphra/ZAYA1-reasoning-base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zyphra/ZAYA1-reasoning-base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zyphra/ZAYA1-reasoning-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Zyphra/ZAYA1-reasoning-base
- SGLang
How to use Zyphra/ZAYA1-reasoning-base 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 "Zyphra/ZAYA1-reasoning-base" \ --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": "Zyphra/ZAYA1-reasoning-base", "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 "Zyphra/ZAYA1-reasoning-base" \ --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": "Zyphra/ZAYA1-reasoning-base", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Zyphra/ZAYA1-reasoning-base with Docker Model Runner:
docker model run hf.co/Zyphra/ZAYA1-reasoning-base
| { | |
| "activation_func": "swiglu", | |
| "activation_func_fp8_input_store": false, | |
| "add_bias_linear": false, | |
| "apply_rope_fusion": true, | |
| "architectures": [ | |
| "ZayaForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bias_activation_fusion": true, | |
| "bos_token_id": 2, | |
| "cca": true, | |
| "cca_num_q_heads": [ | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0, | |
| 8, | |
| 0 | |
| ], | |
| "dtype": "bfloat16", | |
| "eos_token_id": 1, | |
| "ffn_hidden_size_list": [ | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096, | |
| 0, | |
| 4096 | |
| ], | |
| "fused_add_norm": false, | |
| "gated_linear_unit": true, | |
| "hidden_size": 2048, | |
| "kv_channels": 128, | |
| "lm_head_bias": false, | |
| "max_position_embeddings": 32768, | |
| "model_type": "zaya", | |
| "moe_router_topk": 1, | |
| "norm_epsilon": 1e-05, | |
| "normalization": "RMSNorm", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 120, | |
| "num_key_value_heads": 2, | |
| "num_query_groups_list": [ | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0, | |
| 2, | |
| 0 | |
| ], | |
| "pad_token_id": 0, | |
| "residual_in_fp32": false, | |
| "partial_rotary_factor": 0.5, | |
| "rope_scaling": false, | |
| "rope_theta": 1000000, | |
| "scale_residual_merge": true, | |
| "sliding_window": null, | |
| "zaya_high_prec": true, | |
| "zaya_layers": [ | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16, | |
| "a", | |
| 16 | |
| ], | |
| "zaya_mlp_expansion": [ | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256, | |
| 0, | |
| 256 | |
| ], | |
| "zaya_use_eda": true, | |
| "zaya_use_mod": true, | |
| "transformers_version": "4.57.1", | |
| "use_cache": true, | |
| "vocab_size": 262272 | |
| } | |