Instructions to use josephmayo/ZAYA1-8B-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josephmayo/ZAYA1-8B-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="josephmayo/ZAYA1-8B-Coder") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("josephmayo/ZAYA1-8B-Coder") model = AutoModelForCausalLM.from_pretrained("josephmayo/ZAYA1-8B-Coder", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use josephmayo/ZAYA1-8B-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josephmayo/ZAYA1-8B-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josephmayo/ZAYA1-8B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/josephmayo/ZAYA1-8B-Coder
- SGLang
How to use josephmayo/ZAYA1-8B-Coder 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 "josephmayo/ZAYA1-8B-Coder" \ --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": "josephmayo/ZAYA1-8B-Coder", "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 "josephmayo/ZAYA1-8B-Coder" \ --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": "josephmayo/ZAYA1-8B-Coder", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use josephmayo/ZAYA1-8B-Coder with Docker Model Runner:
docker model run hf.co/josephmayo/ZAYA1-8B-Coder
Update model card with technical eval details
Browse files
README.md
CHANGED
|
@@ -4,13 +4,13 @@ library_name: transformers
|
|
| 4 |
tags:
|
| 5 |
- zaya
|
| 6 |
- lora
|
| 7 |
-
-
|
| 8 |
- merged
|
| 9 |
---
|
| 10 |
|
| 11 |
-
# ZAYA1-8B
|
| 12 |
|
| 13 |
-
Merged
|
| 14 |
|
| 15 |
## Evaluation Gate
|
| 16 |
|
|
@@ -18,11 +18,47 @@ The adapter was evaluated against the base model on 50 Python coding prompts wit
|
|
| 18 |
|
| 19 |
- Base average: 2.36 / 10
|
| 20 |
- LoRA average: 4.76 / 10
|
|
|
|
|
|
|
|
|
|
| 21 |
- Improved prompts: 39 / 50
|
| 22 |
-
- Full-scale improvement: 24.00%
|
| 23 |
- Merge threshold: 20.00%
|
| 24 |
- Merge decision: true
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
Evaluation artifacts are included under `eval/`:
|
| 27 |
|
| 28 |
- `eval/eval_summary.json`
|
|
@@ -30,4 +66,14 @@ Evaluation artifacts are included under `eval/`:
|
|
| 30 |
- `eval/base_outputs.jsonl`
|
| 31 |
- `eval/lora_outputs.jsonl`
|
| 32 |
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- zaya
|
| 6 |
- lora
|
| 7 |
+
- coder
|
| 8 |
- merged
|
| 9 |
---
|
| 10 |
|
| 11 |
+
# ZAYA1-8B Coder
|
| 12 |
|
| 13 |
+
Merged Coder model from `Zyphra/ZAYA1-8B` and `josephmayo/ZAYA1-8B-Coder-LoRA`. This repo contains the adapter merged into the base weights as normal safetensors shards.
|
| 14 |
|
| 15 |
## Evaluation Gate
|
| 16 |
|
|
|
|
| 18 |
|
| 19 |
- Base average: 2.36 / 10
|
| 20 |
- LoRA average: 4.76 / 10
|
| 21 |
+
- Absolute score delta: +2.40 / 10
|
| 22 |
+
- Full-scale lift: 24.00%
|
| 23 |
+
- Relative lift over base average: 101.69%
|
| 24 |
- Improved prompts: 39 / 50
|
|
|
|
| 25 |
- Merge threshold: 20.00%
|
| 26 |
- Merge decision: true
|
| 27 |
|
| 28 |
+
Full-scale lift is the required notebook metric:
|
| 29 |
+
|
| 30 |
+
```text
|
| 31 |
+
((lora_avg - base_avg) / 10) * 100
|
| 32 |
+
((4.76 - 2.36) / 10) * 100 = 24.00%
|
| 33 |
+
```
|
| 34 |
+
|
| 35 |
+
## Scoring Heuristic
|
| 36 |
+
|
| 37 |
+
Each response was scored out of 10:
|
| 38 |
+
|
| 39 |
+
- `def` present: 2 points
|
| 40 |
+
- `class` present: 1 point
|
| 41 |
+
- `return` present: 1 point
|
| 42 |
+
- `import` or `from` present: 1 point
|
| 43 |
+
- fenced code block present: 1 point
|
| 44 |
+
- output length greater than 100 characters: 1 point
|
| 45 |
+
- Python AST parse validity: 3 points
|
| 46 |
+
|
| 47 |
+
## Architecture Notes
|
| 48 |
+
|
| 49 |
+
ZAYA uses a custom `model_type = zaya`; it is not weight-compatible with `LlamaForCausalLM` despite similar naming in some configs. During evaluation and merge, the real ZAYA architecture was loaded using Zyphra's Transformers implementation:
|
| 50 |
+
|
| 51 |
+
```bash
|
| 52 |
+
pip install git+https://github.com/Zyphra/transformers.git@zaya1
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
The LoRA adapter contains 160 tensors targeting:
|
| 56 |
+
|
| 57 |
+
- `self_attn.o_proj`
|
| 58 |
+
- `zaya_block.router.down_proj`
|
| 59 |
+
|
| 60 |
+
The merge was performed after the evaluation gate passed, then the merged model was saved to safetensors shards with tokenizer and generation config.
|
| 61 |
+
|
| 62 |
Evaluation artifacts are included under `eval/`:
|
| 63 |
|
| 64 |
- `eval/eval_summary.json`
|
|
|
|
| 66 |
- `eval/base_outputs.jsonl`
|
| 67 |
- `eval/lora_outputs.jsonl`
|
| 68 |
|
| 69 |
+
## Included Files
|
| 70 |
+
|
| 71 |
+
- `model-00001-of-00005.safetensors` through `model-00005-of-00005.safetensors`
|
| 72 |
+
- `model.safetensors.index.json`
|
| 73 |
+
- `config.json`
|
| 74 |
+
- `generation_config.json`
|
| 75 |
+
- tokenizer files
|
| 76 |
+
- `zaya_patched_config.json`
|
| 77 |
+
- evaluation outputs under `eval/`
|
| 78 |
+
|
| 79 |
+
The GGUF quantized release is available at `josephmayo/ZAYA1-8B-Coder-GGUF`.
|