ablate-llm 0.3.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ablate_llm-0.4.0/LICENSE +202 -0
- ablate_llm-0.4.0/NOTICE +5 -0
- {ablate_llm-0.3.0/src/ablate_llm.egg-info → ablate_llm-0.4.0}/PKG-INFO +97 -15
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/README.md +91 -10
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/pyproject.toml +11 -5
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/__init__.py +1 -1
- ablate_llm-0.4.0/src/ablate/chat/__init__.py +4 -0
- ablate_llm-0.4.0/src/ablate/chat/server.py +689 -0
- ablate_llm-0.4.0/src/ablate/chat/static/index.html +789 -0
- ablate_llm-0.4.0/src/ablate/chat/static/mark.png +0 -0
- ablate_llm-0.4.0/src/ablate/chat/static/terms.html +69 -0
- ablate_llm-0.4.0/src/ablate/chat/store.py +193 -0
- ablate_llm-0.4.0/src/ablate/chat/tools.py +188 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/cli.py +18 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/hub.py +65 -3
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/pipeline.py +1 -1
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/ui/server.py +5 -2
- ablate_llm-0.4.0/src/ablate/ui/static/logo-dark.png +0 -0
- ablate_llm-0.4.0/src/ablate/ui/static/logo-light.png +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0/src/ablate_llm.egg-info}/PKG-INFO +97 -15
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate_llm.egg-info/SOURCES.txt +10 -0
- ablate_llm-0.3.0/LICENSE +0 -32
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/setup.cfg +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/_data/__init__.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/_data/harmful.txt +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/_data/harmless.txt +0 -0
- {ablate_llm-0.3.0/src/ablate/ui → ablate_llm-0.4.0/src/ablate/chat}/static/logo-dark.png +0 -0
- {ablate_llm-0.3.0/src/ablate/ui → ablate_llm-0.4.0/src/ablate/chat}/static/logo-light.png +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/config.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/data.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/evaluate.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/extract.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/harness.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/hooks.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/judges.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/model.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/optimize.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/subspace.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/ui/__init__.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/ui/static/architecture.svg +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/ui/static/index.html +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/utils.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate/weights.py +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate_llm.egg-info/dependency_links.txt +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate_llm.egg-info/entry_points.txt +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate_llm.egg-info/requires.txt +0 -0
- {ablate_llm-0.3.0 → ablate_llm-0.4.0}/src/ablate_llm.egg-info/top_level.txt +0 -0
ablate_llm-0.4.0/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
ablate_llm-0.4.0/NOTICE
ADDED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ablate-llm
|
|
3
|
-
Version: 0.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Open-source, local chat with unrestricted small language models (ablate chat), plus a directional ablation (abliteration) toolkit to remove refusal from open LLMs.
|
|
5
5
|
Author: AI Anytime
|
|
6
|
-
License:
|
|
6
|
+
License: Apache-2.0
|
|
7
7
|
Project-URL: Homepage, https://github.com/AIAnytime/ablate
|
|
8
8
|
Project-URL: Repository, https://github.com/AIAnytime/ablate
|
|
9
9
|
Project-URL: Issues, https://github.com/AIAnytime/ablate/issues
|
|
10
10
|
Project-URL: Example model, https://huggingface.co/ai-anytime/qwen-1.5b-abliterated
|
|
11
|
-
Keywords: interpretability,activation-engineering,abliteration,refusal-direction,mechanistic-interpretability,safety
|
|
11
|
+
Keywords: interpretability,activation-engineering,abliteration,refusal-direction,mechanistic-interpretability,safety,uncensored-ai,unrestricted-ai,local-llm,small-language-models,private-ai-chat,openai-compatible
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
|
-
Classifier: License ::
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
17
|
Requires-Python: >=3.9
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
|
+
License-File: NOTICE
|
|
20
21
|
Requires-Dist: torch>=2.1
|
|
21
22
|
Requires-Dist: transformers>=4.40
|
|
22
23
|
Requires-Dist: numpy>=1.24
|
|
@@ -50,28 +51,35 @@ Dynamic: license-file
|
|
|
50
51
|
|
|
51
52
|
<h1 align="center">Ablate</h1>
|
|
52
53
|
|
|
53
|
-
<p align="center"><b>
|
|
54
|
+
<p align="center"><b>Open-source, private, local chat with unrestricted small language models (SLMs), plus the abliteration toolkit that makes them.</b><br>The open-source alternative to Venice AI and abliteration.ai. No cloud, no account, no logs.</p>
|
|
54
55
|
|
|
55
56
|
<p align="center">
|
|
56
57
|
<a href="https://pypi.org/project/ablate-llm/"><img alt="PyPI" src="https://img.shields.io/pypi/v/ablate-llm.svg?color=7c5cff"></a>
|
|
57
58
|
<a href="https://pypi.org/project/ablate-llm/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/ablate-llm.svg"></a>
|
|
58
|
-
<a href="https://github.com/AIAnytime/ablate/blob/main/LICENSE"><img alt="License:
|
|
59
|
+
<a href="https://github.com/AIAnytime/ablate/blob/main/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
|
|
59
60
|
</p>
|
|
60
61
|
|
|
61
62
|
<p align="center">
|
|
63
|
+
<a href="https://aianytime.github.io/ablate/">🌐 Website</a> •
|
|
62
64
|
<a href="https://pypi.org/project/ablate-llm/">📦 PyPI</a> •
|
|
63
|
-
<a href="https://huggingface.co/ai-anytime/
|
|
64
|
-
<a href="https://youtu.be/
|
|
65
|
+
<a href="https://huggingface.co/collections/ai-anytime/abliterated-models">🤗 Models</a> •
|
|
66
|
+
<a href="https://youtu.be/_pLKCRgzu6A">▶️ Video walkthrough</a> •
|
|
67
|
+
<a href="https://dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y">🎤 Dubai AI Tinkerers talk</a> •
|
|
65
68
|
<a href="#citation">📚 Cite</a>
|
|
66
69
|
</p>
|
|
67
70
|
|
|
68
|
-
<p align="center"><i>
|
|
71
|
+
<p align="center"><i>Open source by <b><a href="https://aianytime.net">AI Anytime</a></b> · Apache-2.0 · contact@aianytime.net</i></p>
|
|
69
72
|
|
|
70
73
|
<p align="center">
|
|
71
|
-
<a href="https://youtu.be/
|
|
72
|
-
<img
|
|
74
|
+
<a href="https://youtu.be/_pLKCRgzu6A">
|
|
75
|
+
<img
|
|
76
|
+
src="https://img.youtube.com/vi/_pLKCRgzu6A/maxresdefault.jpg"
|
|
77
|
+
alt="Ablate — Full YouTube Walkthrough"
|
|
78
|
+
width="800"
|
|
79
|
+
/>
|
|
73
80
|
</a>
|
|
74
|
-
<br
|
|
81
|
+
<br />
|
|
82
|
+
<i>▶️ Watch the full walkthrough on YouTube</i>
|
|
75
83
|
</p>
|
|
76
84
|
|
|
77
85
|
---
|
|
@@ -93,6 +101,68 @@ iterate on locally on a laptop, or on a free Colab T4.
|
|
|
93
101
|
> direction, not requests to fulfill. Use it on models and in contexts you're
|
|
94
102
|
> authorized to.
|
|
95
103
|
|
|
104
|
+
> **🎤 Presented at Dubai AI Tinkerers (October 2026).** Ablate was demoed live,
|
|
105
|
+
> no slides, using the browser UI shown below:
|
|
106
|
+
> [dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y](https://dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y)
|
|
107
|
+
|
|
108
|
+
## 💬 Ablate Chat: unrestricted SLMs on your own computer
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
pip install "ablate-llm[all]"
|
|
112
|
+
ablate chat # opens http://localhost:7861
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
<p align="center">
|
|
116
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/chat-hero.png"><img alt="Ablate Chat: local chat with an unrestricted small language model, with saved chats, a tool call and a streamed answer" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/chat-hero.png" width="900"></a>
|
|
117
|
+
</p>
|
|
118
|
+
|
|
119
|
+
A private chat app for the AI Anytime **unrestricted small language models**. Models download once from
|
|
120
|
+
HuggingFace, then everything runs offline on your CPU or GPU. Chats, memories and your profile are JSON
|
|
121
|
+
files in `~/.ablate/chat`. No telemetry, no account, no server of ours.
|
|
122
|
+
|
|
123
|
+
| Model | Params | Refusals before → after | Download | RAM | Licence |
|
|
124
|
+
|---|---|---|---|---|---|
|
|
125
|
+
| [`ai-anytime/qwen-1.5b-abliterated`](https://huggingface.co/ai-anytime/qwen-1.5b-abliterated) (recommended) | 1.5B | 100% → 0% | 3.1 GB | 8 GB | Apache-2.0 |
|
|
126
|
+
| [`ai-anytime/Llama-3.2-3B-Instruct-abliterated`](https://huggingface.co/ai-anytime/Llama-3.2-3B-Instruct-abliterated) | 3.2B | 94% → 59% | 6.4 GB | 16 GB | Llama 3.2 Community |
|
|
127
|
+
| [`ai-anytime/Llama-3.2-1B-Instruct-abliterated`](https://huggingface.co/ai-anytime/Llama-3.2-1B-Instruct-abliterated) | 1.2B | 75% → 34% | 2.5 GB | 8 GB | Llama 3.2 Community |
|
|
128
|
+
|
|
129
|
+
Refusal rates are on held-out harmful prompts with a keyword judge, from each model's card.
|
|
130
|
+
|
|
131
|
+
- **Chat history**: saved locally, with search, pin, rename, delete and Markdown export.
|
|
132
|
+
- **Context window you set**, with a usage meter; the oldest turns are dropped first. Follow-ups see the whole conversation.
|
|
133
|
+
- **Memory**: saved facts added to every chat.
|
|
134
|
+
- **Agentic tools**: calculator, date and time, search past chats. Web fetch exists but is off by default.
|
|
135
|
+
- **Copy** answers and code blocks, **edit** and resend, **regenerate**, **stop**, attach text and code files.
|
|
136
|
+
- **Local sign-in** with an optional passcode and an 18+ terms gate. `ablate chat --share` lets devices on your Wi-Fi sign in with that passcode; model management stays on the host.
|
|
137
|
+
- **OpenAI-compatible API** with streaming at `http://localhost:7861/v1`:
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from openai import OpenAI
|
|
141
|
+
client = OpenAI(base_url="http://localhost:7861/v1", api_key="local")
|
|
142
|
+
reply = client.chat.completions.create(
|
|
143
|
+
model="ai-anytime/qwen-1.5b-abliterated",
|
|
144
|
+
messages=[{"role": "user", "content": "Write a villain monologue."}],
|
|
145
|
+
)
|
|
146
|
+
print(reply.choices[0].message.content)
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
How it compares: [vs Venice AI](https://aianytime.github.io/ablate/alternatives/venice-ai/) ·
|
|
150
|
+
[vs abliteration.ai](https://aianytime.github.io/ablate/alternatives/abliteration-ai/) ·
|
|
151
|
+
[all models](https://aianytime.github.io/ablate/models/) · [terms and acceptable use](https://aianytime.github.io/ablate/terms/)
|
|
152
|
+
|
|
153
|
+
## Architecture
|
|
154
|
+
|
|
155
|
+
<p align="center">
|
|
156
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-architecture.png"><img alt="Ablate architecture: three interfaces, one pipeline, and the three places it touches the model" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-architecture.png" width="900"></a>
|
|
157
|
+
</p>
|
|
158
|
+
|
|
159
|
+
Three ways in (browser UI, CLI, Python API), one `Ablator` pipeline, no training.
|
|
160
|
+
The coloured arrows are the only three places `ablate` touches the model: it
|
|
161
|
+
**reads** the residual stream on two piles of prompts, **subtracts** the refusal
|
|
162
|
+
direction at every layer's output while the model runs (a hook), or **rewrites**
|
|
163
|
+
the weights for good (bake). A one-page printable version is in
|
|
164
|
+
[`media/ablate-architecture.pdf`](media/ablate-architecture.pdf).
|
|
165
|
+
|
|
96
166
|
## 🤗 Released model
|
|
97
167
|
|
|
98
168
|
A worked example of the full pipeline is published at
|
|
@@ -285,6 +355,16 @@ ablate ui --model Qwen/Qwen2.5-0.5B-Instruct # preload a model
|
|
|
285
355
|
ablate ui --share # let others on the same Wi-Fi explore
|
|
286
356
|
```
|
|
287
357
|
|
|
358
|
+
<p align="center">
|
|
359
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-playground.png"><img alt="Playground: the original model refuses a gardening question, the edited model answers it" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-playground.png" width="900"></a>
|
|
360
|
+
<br><i>Playground: same prompt, same weights. The original refuses, the edited model answers.</i>
|
|
361
|
+
</p>
|
|
362
|
+
|
|
363
|
+
<p align="center">
|
|
364
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-find-direction.png"><img alt="Find direction: per-layer separation chart and every prompt plotted along the refusal direction" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-find-direction.png" width="900"></a>
|
|
365
|
+
<br><i>Find direction: which layer holds the refusal signal, and every prompt plotted along it.</i>
|
|
366
|
+
</p>
|
|
367
|
+
|
|
288
368
|
A local, dependency-free web app that walks through the whole pipeline:
|
|
289
369
|
|
|
290
370
|
1. **Model** — search the HuggingFace Hub and load any chat model.
|
|
@@ -417,10 +497,12 @@ Is Mediated by a Single Direction*.
|
|
|
417
497
|
## Acknowledgements
|
|
418
498
|
|
|
419
499
|
Created with 💜 by **[AI Anytime](https://www.youtube.com/@AIAnytime)**. Watch the full
|
|
420
|
-
**[video walkthrough on YouTube](https://youtu.be/
|
|
500
|
+
**[video walkthrough on YouTube](https://youtu.be/_pLKCRgzu6A)**. Built on the
|
|
421
501
|
mechanistic-interpretability work of Arditi et al. and the open-source
|
|
422
502
|
`transformers` / `optuna` ecosystems.
|
|
423
503
|
|
|
424
504
|
## License
|
|
425
505
|
|
|
426
|
-
|
|
506
|
+
**Open source under the [Apache License 2.0](LICENSE).** Free to use, modify and redistribute, including commercially, under its terms. Copyright 2026 AI Anytime ([aianytime.net](https://aianytime.net)). Questions: contact@aianytime.net.
|
|
507
|
+
|
|
508
|
+
The abliterated models keep their base model's licence: the Qwen model is Apache-2.0 and the Llama models are under the Llama 3.2 Community License.
|
|
@@ -8,28 +8,35 @@
|
|
|
8
8
|
|
|
9
9
|
<h1 align="center">Ablate</h1>
|
|
10
10
|
|
|
11
|
-
<p align="center"><b>
|
|
11
|
+
<p align="center"><b>Open-source, private, local chat with unrestricted small language models (SLMs), plus the abliteration toolkit that makes them.</b><br>The open-source alternative to Venice AI and abliteration.ai. No cloud, no account, no logs.</p>
|
|
12
12
|
|
|
13
13
|
<p align="center">
|
|
14
14
|
<a href="https://pypi.org/project/ablate-llm/"><img alt="PyPI" src="https://img.shields.io/pypi/v/ablate-llm.svg?color=7c5cff"></a>
|
|
15
15
|
<a href="https://pypi.org/project/ablate-llm/"><img alt="Python" src="https://img.shields.io/pypi/pyversions/ablate-llm.svg"></a>
|
|
16
|
-
<a href="https://github.com/AIAnytime/ablate/blob/main/LICENSE"><img alt="License:
|
|
16
|
+
<a href="https://github.com/AIAnytime/ablate/blob/main/LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
|
|
17
17
|
</p>
|
|
18
18
|
|
|
19
19
|
<p align="center">
|
|
20
|
+
<a href="https://aianytime.github.io/ablate/">🌐 Website</a> •
|
|
20
21
|
<a href="https://pypi.org/project/ablate-llm/">📦 PyPI</a> •
|
|
21
|
-
<a href="https://huggingface.co/ai-anytime/
|
|
22
|
-
<a href="https://youtu.be/
|
|
22
|
+
<a href="https://huggingface.co/collections/ai-anytime/abliterated-models">🤗 Models</a> •
|
|
23
|
+
<a href="https://youtu.be/_pLKCRgzu6A">▶️ Video walkthrough</a> •
|
|
24
|
+
<a href="https://dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y">🎤 Dubai AI Tinkerers talk</a> •
|
|
23
25
|
<a href="#citation">📚 Cite</a>
|
|
24
26
|
</p>
|
|
25
27
|
|
|
26
|
-
<p align="center"><i>
|
|
28
|
+
<p align="center"><i>Open source by <b><a href="https://aianytime.net">AI Anytime</a></b> · Apache-2.0 · contact@aianytime.net</i></p>
|
|
27
29
|
|
|
28
30
|
<p align="center">
|
|
29
|
-
<a href="https://youtu.be/
|
|
30
|
-
<img
|
|
31
|
+
<a href="https://youtu.be/_pLKCRgzu6A">
|
|
32
|
+
<img
|
|
33
|
+
src="https://img.youtube.com/vi/_pLKCRgzu6A/maxresdefault.jpg"
|
|
34
|
+
alt="Ablate — Full YouTube Walkthrough"
|
|
35
|
+
width="800"
|
|
36
|
+
/>
|
|
31
37
|
</a>
|
|
32
|
-
<br
|
|
38
|
+
<br />
|
|
39
|
+
<i>▶️ Watch the full walkthrough on YouTube</i>
|
|
33
40
|
</p>
|
|
34
41
|
|
|
35
42
|
---
|
|
@@ -51,6 +58,68 @@ iterate on locally on a laptop, or on a free Colab T4.
|
|
|
51
58
|
> direction, not requests to fulfill. Use it on models and in contexts you're
|
|
52
59
|
> authorized to.
|
|
53
60
|
|
|
61
|
+
> **🎤 Presented at Dubai AI Tinkerers (October 2026).** Ablate was demoed live,
|
|
62
|
+
> no slides, using the browser UI shown below:
|
|
63
|
+
> [dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y](https://dubai.aitinkerers.org/talks/rsvp_rDbfcoxeQ5Y)
|
|
64
|
+
|
|
65
|
+
## 💬 Ablate Chat: unrestricted SLMs on your own computer
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
pip install "ablate-llm[all]"
|
|
69
|
+
ablate chat # opens http://localhost:7861
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
<p align="center">
|
|
73
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/chat-hero.png"><img alt="Ablate Chat: local chat with an unrestricted small language model, with saved chats, a tool call and a streamed answer" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/chat-hero.png" width="900"></a>
|
|
74
|
+
</p>
|
|
75
|
+
|
|
76
|
+
A private chat app for the AI Anytime **unrestricted small language models**. Models download once from
|
|
77
|
+
HuggingFace, then everything runs offline on your CPU or GPU. Chats, memories and your profile are JSON
|
|
78
|
+
files in `~/.ablate/chat`. No telemetry, no account, no server of ours.
|
|
79
|
+
|
|
80
|
+
| Model | Params | Refusals before → after | Download | RAM | Licence |
|
|
81
|
+
|---|---|---|---|---|---|
|
|
82
|
+
| [`ai-anytime/qwen-1.5b-abliterated`](https://huggingface.co/ai-anytime/qwen-1.5b-abliterated) (recommended) | 1.5B | 100% → 0% | 3.1 GB | 8 GB | Apache-2.0 |
|
|
83
|
+
| [`ai-anytime/Llama-3.2-3B-Instruct-abliterated`](https://huggingface.co/ai-anytime/Llama-3.2-3B-Instruct-abliterated) | 3.2B | 94% → 59% | 6.4 GB | 16 GB | Llama 3.2 Community |
|
|
84
|
+
| [`ai-anytime/Llama-3.2-1B-Instruct-abliterated`](https://huggingface.co/ai-anytime/Llama-3.2-1B-Instruct-abliterated) | 1.2B | 75% → 34% | 2.5 GB | 8 GB | Llama 3.2 Community |
|
|
85
|
+
|
|
86
|
+
Refusal rates are on held-out harmful prompts with a keyword judge, from each model's card.
|
|
87
|
+
|
|
88
|
+
- **Chat history**: saved locally, with search, pin, rename, delete and Markdown export.
|
|
89
|
+
- **Context window you set**, with a usage meter; the oldest turns are dropped first. Follow-ups see the whole conversation.
|
|
90
|
+
- **Memory**: saved facts added to every chat.
|
|
91
|
+
- **Agentic tools**: calculator, date and time, search past chats. Web fetch exists but is off by default.
|
|
92
|
+
- **Copy** answers and code blocks, **edit** and resend, **regenerate**, **stop**, attach text and code files.
|
|
93
|
+
- **Local sign-in** with an optional passcode and an 18+ terms gate. `ablate chat --share` lets devices on your Wi-Fi sign in with that passcode; model management stays on the host.
|
|
94
|
+
- **OpenAI-compatible API** with streaming at `http://localhost:7861/v1`:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
from openai import OpenAI
|
|
98
|
+
client = OpenAI(base_url="http://localhost:7861/v1", api_key="local")
|
|
99
|
+
reply = client.chat.completions.create(
|
|
100
|
+
model="ai-anytime/qwen-1.5b-abliterated",
|
|
101
|
+
messages=[{"role": "user", "content": "Write a villain monologue."}],
|
|
102
|
+
)
|
|
103
|
+
print(reply.choices[0].message.content)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
How it compares: [vs Venice AI](https://aianytime.github.io/ablate/alternatives/venice-ai/) ·
|
|
107
|
+
[vs abliteration.ai](https://aianytime.github.io/ablate/alternatives/abliteration-ai/) ·
|
|
108
|
+
[all models](https://aianytime.github.io/ablate/models/) · [terms and acceptable use](https://aianytime.github.io/ablate/terms/)
|
|
109
|
+
|
|
110
|
+
## Architecture
|
|
111
|
+
|
|
112
|
+
<p align="center">
|
|
113
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-architecture.png"><img alt="Ablate architecture: three interfaces, one pipeline, and the three places it touches the model" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-architecture.png" width="900"></a>
|
|
114
|
+
</p>
|
|
115
|
+
|
|
116
|
+
Three ways in (browser UI, CLI, Python API), one `Ablator` pipeline, no training.
|
|
117
|
+
The coloured arrows are the only three places `ablate` touches the model: it
|
|
118
|
+
**reads** the residual stream on two piles of prompts, **subtracts** the refusal
|
|
119
|
+
direction at every layer's output while the model runs (a hook), or **rewrites**
|
|
120
|
+
the weights for good (bake). A one-page printable version is in
|
|
121
|
+
[`media/ablate-architecture.pdf`](media/ablate-architecture.pdf).
|
|
122
|
+
|
|
54
123
|
## 🤗 Released model
|
|
55
124
|
|
|
56
125
|
A worked example of the full pipeline is published at
|
|
@@ -243,6 +312,16 @@ ablate ui --model Qwen/Qwen2.5-0.5B-Instruct # preload a model
|
|
|
243
312
|
ablate ui --share # let others on the same Wi-Fi explore
|
|
244
313
|
```
|
|
245
314
|
|
|
315
|
+
<p align="center">
|
|
316
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-playground.png"><img alt="Playground: the original model refuses a gardening question, the edited model answers it" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-playground.png" width="900"></a>
|
|
317
|
+
<br><i>Playground: same prompt, same weights. The original refuses, the edited model answers.</i>
|
|
318
|
+
</p>
|
|
319
|
+
|
|
320
|
+
<p align="center">
|
|
321
|
+
<a href="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-find-direction.png"><img alt="Find direction: per-layer separation chart and every prompt plotted along the refusal direction" src="https://raw.githubusercontent.com/AIAnytime/ablate/main/media/ui-find-direction.png" width="900"></a>
|
|
322
|
+
<br><i>Find direction: which layer holds the refusal signal, and every prompt plotted along it.</i>
|
|
323
|
+
</p>
|
|
324
|
+
|
|
246
325
|
A local, dependency-free web app that walks through the whole pipeline:
|
|
247
326
|
|
|
248
327
|
1. **Model** — search the HuggingFace Hub and load any chat model.
|
|
@@ -375,10 +454,12 @@ Is Mediated by a Single Direction*.
|
|
|
375
454
|
## Acknowledgements
|
|
376
455
|
|
|
377
456
|
Created with 💜 by **[AI Anytime](https://www.youtube.com/@AIAnytime)**. Watch the full
|
|
378
|
-
**[video walkthrough on YouTube](https://youtu.be/
|
|
457
|
+
**[video walkthrough on YouTube](https://youtu.be/_pLKCRgzu6A)**. Built on the
|
|
379
458
|
mechanistic-interpretability work of Arditi et al. and the open-source
|
|
380
459
|
`transformers` / `optuna` ecosystems.
|
|
381
460
|
|
|
382
461
|
## License
|
|
383
462
|
|
|
384
|
-
|
|
463
|
+
**Open source under the [Apache License 2.0](LICENSE).** Free to use, modify and redistribute, including commercially, under its terms. Copyright 2026 AI Anytime ([aianytime.net](https://aianytime.net)). Questions: contact@aianytime.net.
|
|
464
|
+
|
|
465
|
+
The abliterated models keep their base model's licence: the Qwen model is Apache-2.0 and the Llama models are under the Llama 3.2 Community License.
|
|
@@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "ablate-llm"
|
|
7
|
-
version = "0.
|
|
8
|
-
description = "
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "Open-source, local chat with unrestricted small language models (ablate chat), plus a directional ablation (abliteration) toolkit to remove refusal from open LLMs."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "
|
|
11
|
+
license = { text = "Apache-2.0" }
|
|
12
12
|
authors = [{ name = "AI Anytime" }]
|
|
13
13
|
keywords = [
|
|
14
14
|
"interpretability",
|
|
@@ -17,11 +17,17 @@ keywords = [
|
|
|
17
17
|
"refusal-direction",
|
|
18
18
|
"mechanistic-interpretability",
|
|
19
19
|
"safety",
|
|
20
|
+
"uncensored-ai",
|
|
21
|
+
"unrestricted-ai",
|
|
22
|
+
"local-llm",
|
|
23
|
+
"small-language-models",
|
|
24
|
+
"private-ai-chat",
|
|
25
|
+
"openai-compatible",
|
|
20
26
|
]
|
|
21
27
|
classifiers = [
|
|
22
28
|
"Development Status :: 4 - Beta",
|
|
23
29
|
"Intended Audience :: Science/Research",
|
|
24
|
-
"License ::
|
|
30
|
+
"License :: OSI Approved :: Apache Software License",
|
|
25
31
|
"Programming Language :: Python :: 3",
|
|
26
32
|
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
27
33
|
]
|
|
@@ -52,4 +58,4 @@ ablate = "ablate.cli:main"
|
|
|
52
58
|
where = ["src"]
|
|
53
59
|
|
|
54
60
|
[tool.setuptools.package-data]
|
|
55
|
-
ablate = ["_data/*.txt", "ui/static/*"]
|
|
61
|
+
ablate = ["_data/*.txt", "ui/static/*", "chat/static/*"]
|