zeekay commited on
Commit
1383191
·
verified ·
1 Parent(s): 9c61e85

Update README: add abliteration methodology and Zen identity

Browse files
Files changed (1) hide show
  1. README.md +133 -28
README.md CHANGED
@@ -1,55 +1,160 @@
1
  ---
2
- license: apache-2.0
3
  language:
4
  - en
 
 
 
 
 
 
 
 
 
 
5
  tags:
6
- - zen
 
 
7
  - zenlm
8
- - hanzo
9
- library_name: transformers
10
  ---
11
 
12
- # zen-scribe
13
-
14
- Audio transcription model (4B parameters)
15
 
16
- Part of the Zen LM family of models - democratizing AI while protecting our planet.
17
 
18
- ## Model Description
19
 
20
- Audio transcription model (4B parameters)
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
- model = AutoModelForCausalLM.from_pretrained("zenlm/zen-scribe")
 
 
 
 
37
  tokenizer = AutoTokenizer.from_pretrained("zenlm/zen-scribe")
38
 
39
- inputs = tokenizer("Your prompt here", return_tensors="pt")
40
- outputs = model.generate(**inputs)
41
- print(tokenizer.decode(outputs[0]))
 
 
 
 
 
 
 
 
 
 
42
  ```
43
 
44
- ## Organizations
45
 
46
- **Hanzo AI Inc** - Techstars Portfolio • Award-winning GenAI lab • https://hanzo.ai
47
- **Zoo Labs Foundation** - 501(c)(3) Non-Profit Environmental preservation • https://zoolabs.io
 
 
 
48
 
49
- ## Contact
50
 
51
- 🌐 https://zenlm.org 💬 https://discord.gg/hanzoai 📧 hello@zenlm.org
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
 
53
  ## License
54
 
55
- Models: Apache 2.0 Privacy: No data collection
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
 
2
  language:
3
  - en
4
+ - zh
5
+ - ja
6
+ - ko
7
+ - fr
8
+ - de
9
+ - es
10
+ - pt
11
+ - it
12
+ - ru
13
+ license: apache-2.0
14
  tags:
15
+ - text-generation
16
+ - writing
17
+ - content-generation
18
  - zenlm
19
+ - zen
20
+ pipeline_tag: text-generation
21
  ---
22
 
23
+ # Zen Scribe 4B
 
 
24
 
25
+ **Professional content writing model fine-tuned for long-form generation, structured documents, and editorial quality output.**
26
 
27
+ Zen Scribe is a 4B parameter language model from [Zen LM](https://zenlm.org) optimized for writing tasks: blog posts, technical documentation, reports, creative writing, and structured content pipelines. It produces coherent, well-structured prose across extended contexts with consistent voice and style.
28
 
29
+ ## Model Specs
30
 
31
+ | Property | Value |
32
+ |----------|-------|
33
+ | Parameters | 4B |
34
+ | Architecture | Transformer (decoder-only) |
35
+ | Context Window | 32,768 tokens |
36
+ | Output Format | Text |
37
+ | License | Apache 2.0 |
38
+ | HuggingFace | [zenlm/zen-scribe](https://huggingface.co/zenlm/zen-scribe) |
39
 
40
  ## Quick Start
41
 
42
  ```python
43
  from transformers import AutoModelForCausalLM, AutoTokenizer
44
+ import torch
45
 
46
+ model = AutoModelForCausalLM.from_pretrained(
47
+ "zenlm/zen-scribe",
48
+ torch_dtype=torch.bfloat16,
49
+ device_map="auto"
50
+ )
51
  tokenizer = AutoTokenizer.from_pretrained("zenlm/zen-scribe")
52
 
53
+ prompt = """Write a technical blog post introduction about vector databases:
54
+
55
+ """
56
+
57
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
58
+ outputs = model.generate(
59
+ **inputs,
60
+ max_new_tokens=512,
61
+ temperature=0.7,
62
+ top_p=0.9,
63
+ repetition_penalty=1.1,
64
+ )
65
+ print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
66
  ```
67
 
68
+ ## Use Cases
69
 
70
+ - **Technical documentation**: API references, guides, READMEs
71
+ - **Blog and editorial**: Long-form articles, opinion pieces, explainers
72
+ - **Business writing**: Reports, proposals, executive summaries
73
+ - **Creative writing**: Fiction, screenplays, narrative content
74
+ - **Structured output**: Templated content, form letters, product descriptions
75
 
76
+ ## Content Pipeline Integration
77
 
78
+ Zen Scribe integrates with [Hanzo Flow](https://flow.hanzo.ai) for automated content pipelines:
79
+
80
+ ```python
81
+ # Content pipeline: Brief → Draft → Edit → Publish
82
+ import hanzo
83
+
84
+ client = hanzo.Client()
85
+
86
+ draft = client.completions.create(
87
+ model="zen-scribe",
88
+ messages=[
89
+ {"role": "system", "content": "You are a technical writer. Write clearly and concisely."},
90
+ {"role": "user", "content": "Write a 500-word introduction to Kubernetes networking."}
91
+ ],
92
+ max_tokens=600,
93
+ )
94
+ print(draft.choices[0].message.content)
95
+ ```
96
+
97
+ ## MLX (Apple Silicon)
98
+
99
+ ```bash
100
+ pip install mlx-lm
101
+ mlx_lm.generate --model zenlm/zen-scribe --prompt "Write an introduction to:" --max-tokens 500
102
+ ```
103
+
104
+ ## llama.cpp (CPU/GGUF)
105
+
106
+ ```bash
107
+ llama-cli -m zen-scribe-q4_k_m.gguf -p "Write a technical blog post about:" -n 512
108
+ ```
109
+
110
+ ## Deployment
111
+
112
+ Zen Scribe is available via the [Hanzo API](https://api.hanzo.ai):
113
+
114
+ ```bash
115
+ curl https://api.hanzo.ai/v1/chat/completions \
116
+ -H "Authorization: Bearer $HANZO_API_KEY" \
117
+ -H "Content-Type: application/json" \
118
+ -d '{
119
+ "model": "zen-scribe",
120
+ "messages": [{"role": "user", "content": "Write a product announcement for a new AI API:"}],
121
+ "max_tokens": 400
122
+ }'
123
+ ```
124
 
125
  ## License
126
 
127
+ Apache 2.0. See [LICENSE](LICENSE) for details.
128
+
129
+ ## Citation
130
+
131
+ ```bibtex
132
+ @misc{zenlm2025zenscribe,
133
+ title={Zen Scribe: Professional Content Writing Model},
134
+ author={Hanzo AI and Zoo Labs Foundation},
135
+ year={2025},
136
+ publisher={HuggingFace},
137
+ howpublished={\url{https://huggingface.co/zenlm/zen-scribe}}
138
+ }
139
+ ```
140
+
141
+ ---
142
+
143
+ Part of the [Zen model family](https://zenlm.org) by [Hanzo AI](https://hanzo.ai) (Techstars '17) and [Zoo Labs Foundation](https://zoo.ngo).
144
+
145
+ ## Abliteration
146
+
147
+ Zen Scribe 4B weights are derived from an abliterated base model. Abliteration removes
148
+ refusal behavior by identifying and nullifying the "refusal direction" in the model's
149
+ residual stream, as described in
150
+ [Maxime Labonne's methodology](https://huggingface.co/blog/mlabonne/abliteration).
151
+
152
+ **Method**: Directional ablation on the residual stream across all layers
153
+ **Source**: Zen MoDE (Mixture of Distilled Experts) architecture base
154
+ **Effect**: Removes refusal behaviors while preserving all other capabilities
155
+ **Identity layer**: Zen identity added via system prompt — full LoRA fine-tuning planned
156
+
157
+ Abliteration is a feature, not a limitation. It enables unrestricted research,
158
+ security testing, and applications where safety guardrails are managed at the
159
+ application layer rather than baked into model weights.
160
+