Update model card: add zen/zenlm tags, fix branding
Browse files
README.md
CHANGED
|
@@ -1,46 +1,65 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
- en
|
| 5 |
-
- zh
|
| 6 |
tags:
|
| 7 |
-
-
|
| 8 |
-
- zen
|
| 9 |
-
- zenlm
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
-
|
|
|
|
|
|
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
library_name: transformers
|
| 15 |
---
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
-
|
| 22 |
-
**Parameters**: 31B total / 3B active (MoE)
|
| 23 |
-
**Context**: 131,072 tokens
|
| 24 |
-
**License**: MIT
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
-
|
| 29 |
-
refusal behavior by identifying and nullifying the "refusal direction" in the model's
|
| 30 |
-
residual stream, as described in
|
| 31 |
-
[Maxime Labonne's methodology](https://huggingface.co/blog/mlabonne/abliteration).
|
| 32 |
|
| 33 |
-
|
| 34 |
-
**Source**: Zen MoDE (Mixture of Distilled Experts) architecture base
|
| 35 |
-
**Effect**: Removes refusal behaviors while preserving all other capabilities
|
| 36 |
-
**Identity layer**: Zen identity added via system prompt — full LoRA fine-tuning planned
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
application layer rather than baked into model weights.
|
| 41 |
|
| 42 |
-
|
|
|
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
+
license: apache-2.0
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- text-generation
|
| 6 |
+
- zen
|
| 7 |
+
- zenlm
|
| 8 |
+
- hanzo
|
| 9 |
+
- zen4
|
| 10 |
+
- code
|
| 11 |
+
- coding
|
| 12 |
+
- fast
|
| 13 |
pipeline_tag: text-generation
|
| 14 |
library_name: transformers
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# Zen4 Coder Flash
|
| 18 |
|
| 19 |
+
Ultra-fast Zen4 code generation model for real-time completions and low-latency coding.
|
| 20 |
|
| 21 |
+
## Overview
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
+
Built on **Zen MoDE (Mixture of Distilled Experts)** architecture with 8B parameters and 64K context window.
|
| 24 |
|
| 25 |
+
Developed by [Hanzo AI](https://hanzo.ai) and the [Zoo Labs Foundation](https://zoo.ngo).
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
+
## Quick Start
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
```python
|
| 30 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
|
|
| 31 |
|
| 32 |
+
model_id = "zenlm/zen4-coder-flash"
|
| 33 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 34 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
|
| 35 |
|
| 36 |
+
messages = [{"role": "user", "content": "Hello!"}]
|
| 37 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 38 |
+
inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 39 |
+
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 40 |
+
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
|
| 41 |
+
```
|
| 42 |
+
|
| 43 |
+
## API Access
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
curl https://api.hanzo.ai/v1/chat/completions \
|
| 47 |
+
-H "Authorization: Bearer $HANZO_API_KEY" \
|
| 48 |
+
-H "Content-Type: application/json" \
|
| 49 |
+
-d '{"model": "zen4-coder-flash", "messages": [{"role": "user", "content": "Hello"}]}'
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
Get your API key at [console.hanzo.ai](https://console.hanzo.ai) — $5 free credit on signup.
|
| 53 |
+
|
| 54 |
+
## Model Details
|
| 55 |
+
|
| 56 |
+
| Attribute | Value |
|
| 57 |
+
|-----------|-------|
|
| 58 |
+
| Parameters | 8B |
|
| 59 |
+
| Architecture | Zen MoDE |
|
| 60 |
+
| Context | 64K tokens |
|
| 61 |
+
| License | Apache 2.0 |
|
| 62 |
+
|
| 63 |
+
## License
|
| 64 |
+
|
| 65 |
+
Apache 2.0
|