File size: 1,673 Bytes
71af013 d875c18 9870ca4 d875c18 864a020 71af013 d875c18 de431ce d875c18 de431ce d875c18 9870ca4 d875c18 9870ca4 d875c18 de431ce d875c18 de431ce d875c18 de431ce d875c18 13e18b5 d875c18 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | ---
language: en
license: apache-2.0
tags:
- text-generation
- zen
- zenlm
- hanzo
- zen4
- code
- coding
- fast
pipeline_tag: text-generation
library_name: transformers
---
# Zen4 Coder Flash
Ultra-fast Zen4 code generation model for real-time completions and low-latency coding.
## Overview
Built on **Zen MoDE (Mixture of Distilled Experts)** architecture with 8B parameters and 64K context window.
Developed by [Hanzo AI](https://hanzo.ai) and the [Zoo Labs Foundation](https://zoo.ngo).
## Quick Start
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "zenlm/zen4-coder-flash"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "Hello!"}]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
```
## API Access
```bash
curl https://api.hanzo.ai/v1/chat/completions \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "zen4-coder-flash", "messages": [{"role": "user", "content": "Hello"}]}'
```
Get your API key at [console.hanzo.ai](https://console.hanzo.ai) — $5 free credit on signup.
## Model Details
| Attribute | Value |
|-----------|-------|
| Parameters | 8B |
| Architecture | Zen MoDE |
| Context | 64K tokens |
| License | Apache 2.0 |
## License
Apache 2.0
|