Update model card: add zen/zenlm tags, fix branding
Browse files
README.md
CHANGED
|
@@ -1,55 +1,63 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
-
language:
|
| 4 |
-
- en
|
| 5 |
tags:
|
| 6 |
-
-
|
| 7 |
-
-
|
| 8 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
library_name: transformers
|
| 10 |
---
|
| 11 |
|
| 12 |
-
#
|
| 13 |
|
| 14 |
-
Code generation and analysis
|
| 15 |
|
| 16 |
-
|
| 17 |
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
This model is part of the Zen LM ecosystem, providing efficient, private, and environmentally responsible AI.
|
| 23 |
-
|
| 24 |
-
## Why Zen LM?
|
| 25 |
-
|
| 26 |
-
π **Ultra-Efficient** - Optimized for performance across diverse hardware
|
| 27 |
-
π **Truly Private** - 100% local processing, no cloud required
|
| 28 |
-
π± **Environmentally Responsible** - 95% less energy than cloud AI
|
| 29 |
-
π **Free Forever** - Apache 2.0 licensed
|
| 30 |
|
| 31 |
## Quick Start
|
| 32 |
|
| 33 |
```python
|
| 34 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 35 |
|
| 36 |
-
|
| 37 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
|
|
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
```
|
| 43 |
|
| 44 |
-
##
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
|
| 47 |
-
**Zoo Labs Foundation** - 501(c)(3) Non-Profit β’ Environmental preservation β’ https://zoolabs.io
|
| 48 |
|
| 49 |
-
##
|
| 50 |
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
## License
|
| 54 |
|
| 55 |
-
|
|
|
|
| 1 |
---
|
| 2 |
+
language: en
|
| 3 |
license: apache-2.0
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
+
- text-generation
|
| 6 |
+
- zen
|
| 7 |
+
- zenlm
|
| 8 |
+
- hanzo
|
| 9 |
+
- code
|
| 10 |
+
- coding
|
| 11 |
+
pipeline_tag: text-generation
|
| 12 |
library_name: transformers
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Zen Coder
|
| 16 |
|
| 17 |
+
Code generation and analysis model family spanning 4B to 480B parameters.
|
| 18 |
|
| 19 |
+
## Overview
|
| 20 |
|
| 21 |
+
Built on **Zen MoDE (Mixture of Distilled Experts)** architecture with 4Bβ480B parameters and 128K context window.
|
| 22 |
|
| 23 |
+
Developed by [Hanzo AI](https://hanzo.ai) and the [Zoo Labs Foundation](https://zoo.ngo).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Quick Start
|
| 26 |
|
| 27 |
```python
|
| 28 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 29 |
|
| 30 |
+
model_id = "zenlm/zen-coder"
|
| 31 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 32 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
|
| 33 |
|
| 34 |
+
messages = [{"role": "user", "content": "Hello!"}]
|
| 35 |
+
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
| 36 |
+
inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 37 |
+
outputs = model.generate(**inputs, max_new_tokens=512)
|
| 38 |
+
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
|
| 39 |
```
|
| 40 |
|
| 41 |
+
## API Access
|
| 42 |
+
|
| 43 |
+
```bash
|
| 44 |
+
curl https://api.hanzo.ai/v1/chat/completions \
|
| 45 |
+
-H "Authorization: Bearer $HANZO_API_KEY" \
|
| 46 |
+
-H "Content-Type: application/json" \
|
| 47 |
+
-d '{"model": "zen-coder", "messages": [{"role": "user", "content": "Hello"}]}'
|
| 48 |
+
```
|
| 49 |
|
| 50 |
+
Get your API key at [console.hanzo.ai](https://console.hanzo.ai) β $5 free credit on signup.
|
|
|
|
| 51 |
|
| 52 |
+
## Model Details
|
| 53 |
|
| 54 |
+
| Attribute | Value |
|
| 55 |
+
|-----------|-------|
|
| 56 |
+
| Parameters | 4Bβ480B |
|
| 57 |
+
| Architecture | Zen MoDE |
|
| 58 |
+
| Context | 128K tokens |
|
| 59 |
+
| License | Apache 2.0 |
|
| 60 |
|
| 61 |
## License
|
| 62 |
|
| 63 |
+
Apache 2.0
|