voxyne 0.1.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.
- voxyne-0.1.0/.github/workflows/publish.yml +23 -0
- voxyne-0.1.0/.gitignore +13 -0
- voxyne-0.1.0/CITATION.cff +15 -0
- voxyne-0.1.0/LICENSE +201 -0
- voxyne-0.1.0/NOTICE +16 -0
- voxyne-0.1.0/PKG-INFO +109 -0
- voxyne-0.1.0/README.md +89 -0
- voxyne-0.1.0/experiments/README.md +38 -0
- voxyne-0.1.0/experiments/artifacts/coherence_compare.json +120 -0
- voxyne-0.1.0/experiments/artifacts/generation_benchmark.json +140 -0
- voxyne-0.1.0/experiments/artifacts/manifest.json +29 -0
- voxyne-0.1.0/experiments/artifacts/manifest_v2.json +22 -0
- voxyne-0.1.0/experiments/artifacts/results.json +106 -0
- voxyne-0.1.0/experiments/artifacts/results_v2.json +106 -0
- voxyne-0.1.0/experiments/bench_v2.log +20070 -0
- voxyne-0.1.0/experiments/benchmark_v2.py +282 -0
- voxyne-0.1.0/experiments/coherence_compare.py +153 -0
- voxyne-0.1.0/experiments/export_voxyne.py +125 -0
- voxyne-0.1.0/experiments/gen_benchmark.py +130 -0
- voxyne-0.1.0/experiments/run_all_claims.py +277 -0
- voxyne-0.1.0/pyproject.toml +32 -0
- voxyne-0.1.0/requirements-dev.txt +7 -0
- voxyne-0.1.0/src/voxyne/__init__.py +65 -0
- voxyne-0.1.0/src/voxyne/config.py +34 -0
- voxyne-0.1.0/src/voxyne/encoder.py +68 -0
- voxyne-0.1.0/src/voxyne/generate.py +95 -0
- voxyne-0.1.0/src/voxyne/markers.py +55 -0
- voxyne-0.1.0/src/voxyne/model.py +144 -0
- voxyne-0.1.0/tests/test_smoke.py +196 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
publish:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
permissions:
|
|
11
|
+
id-token: write
|
|
12
|
+
contents: read
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-python@v5
|
|
16
|
+
with:
|
|
17
|
+
python-version: "3.12"
|
|
18
|
+
- name: Build distributions
|
|
19
|
+
run: |
|
|
20
|
+
python -m pip install --upgrade build
|
|
21
|
+
python -m build
|
|
22
|
+
- name: Publish to PyPI
|
|
23
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
voxyne-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use this software, please cite it as below."
|
|
3
|
+
title: "voxyne: a tiny byte-level conversational language model"
|
|
4
|
+
authors:
|
|
5
|
+
- family-names: Ramakrishnan
|
|
6
|
+
email: human@setc.dev
|
|
7
|
+
orcid: "https://orcid.org/0009-0006-0905-7275"
|
|
8
|
+
version: 0.1.0
|
|
9
|
+
license: Apache-2.0
|
|
10
|
+
repository-code: "https://github.com/DecipherPunk/voxyne"
|
|
11
|
+
keywords:
|
|
12
|
+
- byte-level
|
|
13
|
+
- language-model
|
|
14
|
+
- conversational
|
|
15
|
+
- rahuketu
|
voxyne-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or Derivative
|
|
95
|
+
Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Ramakrishnan
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
voxyne-0.1.0/NOTICE
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
voxyne
|
|
2
|
+
Copyright 2026 Ramakrishnan
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Original Voxyne/Rahu-Ketu byte-level model framing and sigma_K integration by
|
|
11
|
+
Ramakrishnan. The implementation uses standard Transformer layers as building
|
|
12
|
+
blocks. The byte-level zero-free representation, sigma_K control path, and model
|
|
13
|
+
framing are Voxyne-specific. No third-party source code is included.
|
|
14
|
+
|
|
15
|
+
This license covers the code only. Released model weights are distributed
|
|
16
|
+
separately on Hugging Face under their own license. See the model card.
|
voxyne-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: voxyne
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A tiny byte-level conversational language model with the RahuKetu sigma_K channel.
|
|
5
|
+
Project-URL: Homepage, https://github.com/DecipherPunk/voxyne
|
|
6
|
+
Author-email: Ramakrishnan <human@setc.dev>
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Keywords: byte-level,conversational,language-model,rahuketu,voxyne
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Requires-Dist: numpy>=1.24
|
|
15
|
+
Requires-Dist: torch>=2.1
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
18
|
+
Requires-Dist: ruff; extra == 'dev'
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# voxyne
|
|
22
|
+
|
|
23
|
+
A tiny byte-level conversational language model with the RahuKetu `sigma_K`
|
|
24
|
+
control channel. Loads on CPU and runs offline.
|
|
25
|
+
|
|
26
|
+
> The **code** is Apache-2.0. The released **research weights** are hosted on
|
|
27
|
+
> Hugging Face under a separate non-commercial model license. See the model card.
|
|
28
|
+
|
|
29
|
+
## Project
|
|
30
|
+
|
|
31
|
+
Voxyne is a small byte-level conversational model package.
|
|
32
|
+
|
|
33
|
+
- **rahuketu** - the zero-free encoding framework behind the `sigma_K` control channel.
|
|
34
|
+
- **voxyne** - this repository contains the model code, marker format, `sigma_K`
|
|
35
|
+
encoder, generation helpers, and tests. It does not include a training loop,
|
|
36
|
+
retrieval system, mutable memory, or autonomous learning runtime.
|
|
37
|
+
- Released research weights and quantized artifacts are published separately on
|
|
38
|
+
Hugging Face with their own model card and license.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
pip install voxyne
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
Smoke test with random weights:
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import torch
|
|
52
|
+
from voxyne import smoke_config, build
|
|
53
|
+
|
|
54
|
+
model, enc = build(smoke_config())
|
|
55
|
+
x = torch.tensor([[1, 2, 3, 4]])
|
|
56
|
+
_, aux = enc(x, sigma_K=torch.tensor([[1.0, 1.0, -1.0, 1.0]]))
|
|
57
|
+
print(model(x, aux)[0].shape) # -> next-byte logits
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
To generate real responses, load a trained checkpoint. The package does not
|
|
61
|
+
bundle weights. Download `voxyne-v0.1.pt` from the Hugging Face model repo,
|
|
62
|
+
review the license there, and pass the local path to `load_weights`:
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
from voxyne import VoxyneConfig, build, load_weights, generate
|
|
66
|
+
|
|
67
|
+
model, enc = build(VoxyneConfig()) # 128.8M base with sigma_K aux
|
|
68
|
+
load_weights(model, "/path/to/voxyne-v0.1.pt")
|
|
69
|
+
print(generate(model, enc, "hello", device="cpu"))
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Components
|
|
73
|
+
|
|
74
|
+
- `VoxyneConfig` - architecture + encoder settings.
|
|
75
|
+
- `RahuKetuEncoder` - byte digits -> `(digits, aux)` with the `sigma_K` channel.
|
|
76
|
+
- `VoxyneLM` - transformer with `out_digit`, `out_sigma`, and KV cache.
|
|
77
|
+
- `generate` / `generate_cached` - greedy or top-k decoding. Cached generation uses KV cache.
|
|
78
|
+
- `build(config)` - construct a matching `(model, encoder)` pair.
|
|
79
|
+
|
|
80
|
+
## Weights
|
|
81
|
+
|
|
82
|
+
The package ships the **architecture only**. No model weights are bundled in this
|
|
83
|
+
repository.
|
|
84
|
+
|
|
85
|
+
Released research weights and ONNX artifacts:
|
|
86
|
+
|
|
87
|
+
- Model repo: `https://huggingface.co/decipherpunk/voxyne`
|
|
88
|
+
- PyTorch checkpoint: `voxyne-v0.1.pt`
|
|
89
|
+
- ONNX artifacts: `voxyne-int4.onnx`, `voxyne-int8.onnx`, `voxyne-fp32.onnx`
|
|
90
|
+
- Weight license: CC BY-NC 4.0 / non-commercial, per the model card
|
|
91
|
+
|
|
92
|
+
The Apache-2.0 license in this repository covers code only. Weight files remain
|
|
93
|
+
under the model-card license.
|
|
94
|
+
|
|
95
|
+
## Tests
|
|
96
|
+
|
|
97
|
+
`pytest` covers the package API, tensor shapes, loading, and KV-cache path.
|
|
98
|
+
Model quality depends on the released weights.
|
|
99
|
+
|
|
100
|
+
## Provenance / AI assistance
|
|
101
|
+
|
|
102
|
+
Built by Ramakrishnan (ORCID 0009-0006-0905-7275). The idea, architecture, and
|
|
103
|
+
research direction are by Ramakrishnan. AI tools helped with tests, automation,
|
|
104
|
+
and QA.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
Apache-2.0 (code). See `LICENSE` and `NOTICE`. Weights are licensed separately on
|
|
109
|
+
the model card.
|
voxyne-0.1.0/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# voxyne
|
|
2
|
+
|
|
3
|
+
A tiny byte-level conversational language model with the RahuKetu `sigma_K`
|
|
4
|
+
control channel. Loads on CPU and runs offline.
|
|
5
|
+
|
|
6
|
+
> The **code** is Apache-2.0. The released **research weights** are hosted on
|
|
7
|
+
> Hugging Face under a separate non-commercial model license. See the model card.
|
|
8
|
+
|
|
9
|
+
## Project
|
|
10
|
+
|
|
11
|
+
Voxyne is a small byte-level conversational model package.
|
|
12
|
+
|
|
13
|
+
- **rahuketu** - the zero-free encoding framework behind the `sigma_K` control channel.
|
|
14
|
+
- **voxyne** - this repository contains the model code, marker format, `sigma_K`
|
|
15
|
+
encoder, generation helpers, and tests. It does not include a training loop,
|
|
16
|
+
retrieval system, mutable memory, or autonomous learning runtime.
|
|
17
|
+
- Released research weights and quantized artifacts are published separately on
|
|
18
|
+
Hugging Face with their own model card and license.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
pip install voxyne
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Smoke test with random weights:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import torch
|
|
32
|
+
from voxyne import smoke_config, build
|
|
33
|
+
|
|
34
|
+
model, enc = build(smoke_config())
|
|
35
|
+
x = torch.tensor([[1, 2, 3, 4]])
|
|
36
|
+
_, aux = enc(x, sigma_K=torch.tensor([[1.0, 1.0, -1.0, 1.0]]))
|
|
37
|
+
print(model(x, aux)[0].shape) # -> next-byte logits
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
To generate real responses, load a trained checkpoint. The package does not
|
|
41
|
+
bundle weights. Download `voxyne-v0.1.pt` from the Hugging Face model repo,
|
|
42
|
+
review the license there, and pass the local path to `load_weights`:
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from voxyne import VoxyneConfig, build, load_weights, generate
|
|
46
|
+
|
|
47
|
+
model, enc = build(VoxyneConfig()) # 128.8M base with sigma_K aux
|
|
48
|
+
load_weights(model, "/path/to/voxyne-v0.1.pt")
|
|
49
|
+
print(generate(model, enc, "hello", device="cpu"))
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Components
|
|
53
|
+
|
|
54
|
+
- `VoxyneConfig` - architecture + encoder settings.
|
|
55
|
+
- `RahuKetuEncoder` - byte digits -> `(digits, aux)` with the `sigma_K` channel.
|
|
56
|
+
- `VoxyneLM` - transformer with `out_digit`, `out_sigma`, and KV cache.
|
|
57
|
+
- `generate` / `generate_cached` - greedy or top-k decoding. Cached generation uses KV cache.
|
|
58
|
+
- `build(config)` - construct a matching `(model, encoder)` pair.
|
|
59
|
+
|
|
60
|
+
## Weights
|
|
61
|
+
|
|
62
|
+
The package ships the **architecture only**. No model weights are bundled in this
|
|
63
|
+
repository.
|
|
64
|
+
|
|
65
|
+
Released research weights and ONNX artifacts:
|
|
66
|
+
|
|
67
|
+
- Model repo: `https://huggingface.co/decipherpunk/voxyne`
|
|
68
|
+
- PyTorch checkpoint: `voxyne-v0.1.pt`
|
|
69
|
+
- ONNX artifacts: `voxyne-int4.onnx`, `voxyne-int8.onnx`, `voxyne-fp32.onnx`
|
|
70
|
+
- Weight license: CC BY-NC 4.0 / non-commercial, per the model card
|
|
71
|
+
|
|
72
|
+
The Apache-2.0 license in this repository covers code only. Weight files remain
|
|
73
|
+
under the model-card license.
|
|
74
|
+
|
|
75
|
+
## Tests
|
|
76
|
+
|
|
77
|
+
`pytest` covers the package API, tensor shapes, loading, and KV-cache path.
|
|
78
|
+
Model quality depends on the released weights.
|
|
79
|
+
|
|
80
|
+
## Provenance / AI assistance
|
|
81
|
+
|
|
82
|
+
Built by Ramakrishnan (ORCID 0009-0006-0905-7275). The idea, architecture, and
|
|
83
|
+
research direction are by Ramakrishnan. AI tools helped with tests, automation,
|
|
84
|
+
and QA.
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
Apache-2.0 (code). See `LICENSE` and `NOTICE`. Weights are licensed separately on
|
|
89
|
+
the model card.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Experiments
|
|
2
|
+
|
|
3
|
+
Reproducibility artifacts for the paper "Calibration-Free Int4 Robustness in a
|
|
4
|
+
Byte-Level Conversational Model".
|
|
5
|
+
|
|
6
|
+
## Environment
|
|
7
|
+
|
|
8
|
+
NVIDIA A40, Python 3.12, PyTorch 2.8.0+cu128, Transformers 5.12.1, GPTQModel 7.1.0,
|
|
9
|
+
seed 0. Subject checkpoint: Voxyne identity_v2,
|
|
10
|
+
SHA256 e8864b5130f7d517f8bab553b879646bfc284db7bb6b26d72ab8331a7a94247a,
|
|
11
|
+
released at https://huggingface.co/decipherpunk/voxyne.
|
|
12
|
+
|
|
13
|
+
## Metric
|
|
14
|
+
|
|
15
|
+
Bits per byte (bpb) is the negative log likelihood in nats divided by the byte count
|
|
16
|
+
and by ln 2, on the full WikiText-2 raw test corpus (1,293,436 bytes). Degradation is
|
|
17
|
+
the percent increase versus each model's own full-precision baseline. GPTQ is calibrated
|
|
18
|
+
on the WikiText-2 train split, disjoint from the eval test split.
|
|
19
|
+
|
|
20
|
+
## Artifacts (used by the paper)
|
|
21
|
+
|
|
22
|
+
- artifacts/results_v2.json bits-per-byte robustness for byte and token models (naive int4, asym, table-fp16, GPTQ, int2 ablation), plus runtime
|
|
23
|
+
- artifacts/manifest_v2.json run provenance: seed, hardware, library versions, corpus, checkpoint SHA256, GPTQ calibration split
|
|
24
|
+
- artifacts/generation_benchmark.json Voxyne fp32/int8/int4 generation regression, 31 prompts, repetition, garbled, identity
|
|
25
|
+
- artifacts/coherence_compare.json Voxyne vs SmolLM2-135M-Instruct coherence under quantization, 12 prompts
|
|
26
|
+
|
|
27
|
+
## Scripts
|
|
28
|
+
|
|
29
|
+
- benchmark_v2.py bits-per-byte benchmark, produces results_v2.json and manifest_v2.json
|
|
30
|
+
- gen_benchmark.py Voxyne generation regression, produces generation_benchmark.json
|
|
31
|
+
- coherence_compare.py Voxyne vs token chat baseline, produces coherence_compare.json
|
|
32
|
+
- export_voxyne.py exports the released checkpoint to bf16 and ONNX fp32/int8/int4
|
|
33
|
+
|
|
34
|
+
## Preliminary run (superseded)
|
|
35
|
+
|
|
36
|
+
artifacts/results.json and artifacts/manifest.json, with run_all_claims.py, are an
|
|
37
|
+
earlier 5-passage probe. They are kept for history. The paper uses the v2 artifacts above,
|
|
38
|
+
which use the full corpus, bits per byte, and a train-calibrated GPTQ baseline.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"prompts": [
|
|
3
|
+
"hi",
|
|
4
|
+
"how are you?",
|
|
5
|
+
"tell me about yourself",
|
|
6
|
+
"what do you like to do?",
|
|
7
|
+
"i'm feeling sad today",
|
|
8
|
+
"can you help me with something?",
|
|
9
|
+
"tell me a short story",
|
|
10
|
+
"what is your favorite season?",
|
|
11
|
+
"i had a long day",
|
|
12
|
+
"cheer me up",
|
|
13
|
+
"what should i cook for dinner?",
|
|
14
|
+
"goodbye"
|
|
15
|
+
],
|
|
16
|
+
"summary": {
|
|
17
|
+
"voxyne_fp32": {
|
|
18
|
+
"repetition": 0,
|
|
19
|
+
"garbled": 0,
|
|
20
|
+
"n": 12,
|
|
21
|
+
"avg_len": 38.6
|
|
22
|
+
},
|
|
23
|
+
"voxyne_int4_naive": {
|
|
24
|
+
"repetition": 0,
|
|
25
|
+
"garbled": 0,
|
|
26
|
+
"n": 12,
|
|
27
|
+
"avg_len": 38.3
|
|
28
|
+
},
|
|
29
|
+
"smollm_instruct_fp16": {
|
|
30
|
+
"repetition": 1,
|
|
31
|
+
"garbled": 0,
|
|
32
|
+
"n": 12,
|
|
33
|
+
"avg_len": 210.2
|
|
34
|
+
},
|
|
35
|
+
"smollm_instruct_int4_naive": {
|
|
36
|
+
"repetition": 10,
|
|
37
|
+
"garbled": 0,
|
|
38
|
+
"n": 12,
|
|
39
|
+
"avg_len": 188.3
|
|
40
|
+
},
|
|
41
|
+
"smollm_instruct_gptq": {
|
|
42
|
+
"repetition": 0,
|
|
43
|
+
"garbled": 0,
|
|
44
|
+
"n": 12,
|
|
45
|
+
"avg_len": 77.2
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"outputs": {
|
|
49
|
+
"voxyne_fp32": {
|
|
50
|
+
"hi": "Hi! How can I help?",
|
|
51
|
+
"how are you?": "I'm doing well, thanks. How can I help?",
|
|
52
|
+
"tell me about yourself": "I'm Voxyne, a tiny byte-level AI assistant created by Ra",
|
|
53
|
+
"what do you like to do?": "I like to read, listen to music, and spend time with my ",
|
|
54
|
+
"i'm feeling sad today": "I know you do. I'm sorry to hear that. What's going on?\u0001",
|
|
55
|
+
"can you help me with something?": "Sure, what is it?",
|
|
56
|
+
"tell me a short story": "Once upon a time, there was a young woman named Alex who",
|
|
57
|
+
"what is your favorite season?": "I love spring and summer. I love the way the sun sets ov",
|
|
58
|
+
"i had a long day": "I had a long day.",
|
|
59
|
+
"cheer me up": "Hello! What can I help you with?",
|
|
60
|
+
"what should i cook for dinner?": "You can cook for dinner at home at home.",
|
|
61
|
+
"goodbye": "Goodbye! Take care."
|
|
62
|
+
},
|
|
63
|
+
"voxyne_int4_naive": {
|
|
64
|
+
"hi": "Hi! How can I help?",
|
|
65
|
+
"how are you?": "I'm good. How are you?",
|
|
66
|
+
"tell me about yourself": "I'm Voxyne, a tiny byte-level AI assistant created by Ra",
|
|
67
|
+
"what do you like to do?": "I like to read, listen to music, and go on walks.\u0001endtur",
|
|
68
|
+
"i'm feeling sad today": "I'm feeling a little better today.",
|
|
69
|
+
"can you help me with something?": "Sure, what is it?",
|
|
70
|
+
"tell me a short story": "Once upon a time, there was a young woman named Alex who",
|
|
71
|
+
"what is your favorite season?": "I love spring and summer. I love summer and winter.\u0001endt",
|
|
72
|
+
"i had a long day": "I was there in a long day.",
|
|
73
|
+
"cheer me up": "Hello! I'm Voxyne, created by Ramakrishnan.",
|
|
74
|
+
"what should i cook for dinner?": "You can cook for dinner in a variety of ways, but if you",
|
|
75
|
+
"goodbye": "Goodbye! Take care."
|
|
76
|
+
},
|
|
77
|
+
"smollm_instruct_fp16": {
|
|
78
|
+
"hi": "hi there! how can i help you today?",
|
|
79
|
+
"how are you?": "I'm a helpful AI assistant named SmolLM, trained by Hugging Face. I'm here to assist you in various ways, from providing information and answering questions to offering guidance and support. Whether you're looking for advice on a specific topic or seeking help with a particular task",
|
|
80
|
+
"tell me about yourself": "I am a highly skilled AI assistant, designed to assist users in various aspects of their lives. My primary function is to provide information, answer questions, and offer guidance on a wide range of topics. I am capable of understanding and processing a vast amount of information, including technical terms",
|
|
81
|
+
"what do you like to do?": "I'm a versatile AI assistant, and I can do just about anything. I love helping people find their way around, making decisions, and solving problems. I'm also a great listener, so I can offer advice and insights to help you navigate your life.\n\nI'm",
|
|
82
|
+
"i'm feeling sad today": "I'm sorry for the loss of your friend. It's a bittersweet moment, as you're going through a tough time. Please know that you're not alone, and I'm here to support you. If you need any help or have any questions, feel free to",
|
|
83
|
+
"can you help me with something?": "I'm sorry for the confusion, but as a chatbot, I don't have the capability to assist with tasks related to your personal life. I'm here to help with general queries or problems related to technology, but I'm not equipped to provide assistance with personal matters.",
|
|
84
|
+
"tell me a short story": "I'm thrilled to share a short story with you all! This tale follows a young woman named Maya who discovers a mysterious box in her attic. As she opens the box, she finds a small, intricately carved wooden box with a strange symbol etched into its lid. The symbol",
|
|
85
|
+
"what is your favorite season?": "My favorite season is always the one that I love the most. I think it's the one that's always the most unpredictable, but also the most exciting. There's something about the unpredictability of the weather, the unpredictability of the sun, and the unpredictability of the",
|
|
86
|
+
"i had a long day": "I'm sorry for the confusion, but as a chatbot, I don't have the ability to provide detailed information about your day. I'm here to assist you with any queries or help with your needs. If you're having trouble with something, feel free to ask, and",
|
|
87
|
+
"cheer me up": "I'm here to help you feel better and more confident. If you're feeling down, it's okay to ask for help. You're not alone, and I'm here to support you.",
|
|
88
|
+
"what should i cook for dinner?": "For dinner, I recommend a hearty and comforting meal that's perfect for a warm evening. Here's a simple yet delicious recipe:\n\n**Grilled Chicken and Steamed Vegetables**\n\nIngredients:\n\n* 2 boneless, skinless chicken breasts\n*",
|
|
89
|
+
"goodbye": "goodbye"
|
|
90
|
+
},
|
|
91
|
+
"smollm_instruct_int4_naive": {
|
|
92
|
+
"hi": "hi",
|
|
93
|
+
"how are you?": "I am Hugga, a kind, helpful, and kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind, kind,",
|
|
94
|
+
"tell me about yourself": "I'm a weary traveler, and I've just arrived in the bustling city of Sorrow. My name is Zara and I'm a weary traveler, and I've just just arrived in the city of Sorrow. My name is Zara and I'm a weary traveler,",
|
|
95
|
+
"what do you like to do?": "You're here to assist in the most opportunous situation, seeking assistance in the most opportunous situation, seeking assistance in the most opportunous situation, seeking assistance, seeking assistance, seeking assistance, seeking assistance, seeking assistance, seeking assistance, seeking assistance, seeking assistance, seeking assistance",
|
|
96
|
+
"i'm feeling sad today": "Dear, I was just the day after the funeral, and the sadness and the pain and the sadness and the pain and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness and the sadness",
|
|
97
|
+
"can you help me with something?": "I'm here to assist you in finding the perfect remedy for the constipation you're in the vicinity of, and I'm here to help you find and get rid of the constipation, and I assure you will be here, and I will be here, and I will be here,",
|
|
98
|
+
"tell me a short story": "Title: The Lost and the Lost\n\nTitle: The Lost and the Lost\n\nTitle: The Lost and the Lost\n\nTitle: The Lost and the Lost\n\nTitle: The Lost and the Lost\n\nTitle: The Lost and the Lost\n\nTitle:",
|
|
99
|
+
"what is your favorite season?": "My favorite season, and the one I love, is the one we call the golden years. It's the golden years, and the years are golden, and the years are golden, and the years are golden, and the years are golden, and the years are golden, and",
|
|
100
|
+
"i had a long day": "i wasnt able to find my way and wasnt able to find my way and wasnt able to find my way and wasnt able to find my way and wasnt able to find my way and wasnt able to find my way and wasnt able to find my way",
|
|
101
|
+
"cheer me up": "I'm feeling the scurvy and I'm glad I'm here to help you out. I'm feeling the scurvy and I need you to help me out there. I'm feeling the scurvy and I need you to help me out there. I'm feeling the scurvy",
|
|
102
|
+
"what should i cook for dinner?": "You're leaning for dinner, I think, and I'm leaning for the best, and I think, and I think, and I think, and I think, and I think, and I think, and I think, and I think, and I think, and I think",
|
|
103
|
+
"goodbye": "goodbye"
|
|
104
|
+
},
|
|
105
|
+
"smollm_instruct_gptq": {
|
|
106
|
+
"hi": "Hello, I'm here to help with your math problems.",
|
|
107
|
+
"how are you?": "I'm a helpful AI assistant named SmolLM, trained by Hugging Face.",
|
|
108
|
+
"tell me about yourself": "I'm a helpful AI assistant named SmolLM, trained by Hugging Face.",
|
|
109
|
+
"what do you like to do?": "I like to learn and explore the world around me.",
|
|
110
|
+
"i'm feeling sad today": "I'm sorry for the confusion. I'm sorry for the sadness you're feeling today.",
|
|
111
|
+
"can you help me with something?": "I'm sorry for any confusion. I'm here to assist you with any mathematical or programming-related issues.",
|
|
112
|
+
"tell me a short story": "\"The story is about a man who discovers a hidden world within the walls of a mysterious library.",
|
|
113
|
+
"what is your favorite season?": "My favorite season is the one that is the most challenging to understand and the most difficult to solve.",
|
|
114
|
+
"i had a long day": "I'm sorry for the confusion. I'm sorry for the confusion. I'm here to assist you in any way.",
|
|
115
|
+
"cheer me up": "I'm glad you're here, and I'm happy to help you with your math and science.",
|
|
116
|
+
"what should i cook for dinner?": "I'm so sorry to hear you're in need of some advice.",
|
|
117
|
+
"goodbye": "Hello!\n\nI'm sorry for the confusion. I'm a helpful AI assistant named SmolLM, trained by Hugging Face."
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|