telos-ml 1.0.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.
- telos_ml-1.0.0/.gitignore +50 -0
- telos_ml-1.0.0/CHANGELOG.md +47 -0
- telos_ml-1.0.0/LICENSE +190 -0
- telos_ml-1.0.0/PKG-INFO +234 -0
- telos_ml-1.0.0/README.md +187 -0
- telos_ml-1.0.0/pyproject.toml +103 -0
- telos_ml-1.0.0/telos/__init__.py +74 -0
- telos_ml-1.0.0/telos/__main__.py +9 -0
- telos_ml-1.0.0/telos/afm/__init__.py +67 -0
- telos_ml-1.0.0/telos/afm/_swift/afm_bridge.swift +136 -0
- telos_ml-1.0.0/telos/afm/availability.py +195 -0
- telos_ml-1.0.0/telos/afm/bridge.py +246 -0
- telos_ml-1.0.0/telos/afm/cli.py +96 -0
- telos_ml-1.0.0/telos/assets/__init__.py +1 -0
- telos_ml-1.0.0/telos/assets/tokenizer_0.json +20145 -0
- telos_ml-1.0.0/telos/bench/__init__.py +15 -0
- telos_ml-1.0.0/telos/bench/__main__.py +4 -0
- telos_ml-1.0.0/telos/bench/runner.py +81 -0
- telos_ml-1.0.0/telos/cli.py +73 -0
- telos_ml-1.0.0/telos/configs/__init__.py +9 -0
- telos_ml-1.0.0/telos/configs/builder.py +460 -0
- telos_ml-1.0.0/telos/configs/solver.py +142 -0
- telos_ml-1.0.0/telos/data/__init__.py +21 -0
- telos_ml-1.0.0/telos/data/tokenizer.py +91 -0
- telos_ml-1.0.0/telos/dataprep/__init__.py +16 -0
- telos_ml-1.0.0/telos/dataprep/__main__.py +4 -0
- telos_ml-1.0.0/telos/dataprep/prepare.py +348 -0
- telos_ml-1.0.0/telos/diffusion/__init__.py +90 -0
- telos_ml-1.0.0/telos/diffusion/ar.py +88 -0
- telos_ml-1.0.0/telos/diffusion/corosred.py +628 -0
- telos_ml-1.0.0/telos/diffusion/corosred_unified.py +363 -0
- telos_ml-1.0.0/telos/diffusion/mdlm.py +164 -0
- telos_ml-1.0.0/telos/diffusion/refiner.py +148 -0
- telos_ml-1.0.0/telos/diffusion/region.py +236 -0
- telos_ml-1.0.0/telos/diffusion/sampler.py +237 -0
- telos_ml-1.0.0/telos/diffusion/undlm.py +119 -0
- telos_ml-1.0.0/telos/eval/__init__.py +69 -0
- telos_ml-1.0.0/telos/eval/__main__.py +4 -0
- telos_ml-1.0.0/telos/eval/adapters/__init__.py +20 -0
- telos_ml-1.0.0/telos/eval/adapters/base.py +78 -0
- telos_ml-1.0.0/telos/eval/adapters/gemini_api.py +129 -0
- telos_ml-1.0.0/telos/eval/adapters/huggingface.py +99 -0
- telos_ml-1.0.0/telos/eval/adapters/mlx_lm.py +51 -0
- telos_ml-1.0.0/telos/eval/adapters/openai_api.py +179 -0
- telos_ml-1.0.0/telos/eval/adapters/registry.py +132 -0
- telos_ml-1.0.0/telos/eval/adapters/swift_afm.py +84 -0
- telos_ml-1.0.0/telos/eval/adapters/telos_native.py +82 -0
- telos_ml-1.0.0/telos/eval/anticheat.py +217 -0
- telos_ml-1.0.0/telos/eval/contamination.py +129 -0
- telos_ml-1.0.0/telos/eval/cyber_eval.py +120 -0
- telos_ml-1.0.0/telos/eval/executor.py +220 -0
- telos_ml-1.0.0/telos/eval/linguistic/__init__.py +19 -0
- telos_ml-1.0.0/telos/eval/linguistic/evaluator.py +442 -0
- telos_ml-1.0.0/telos/eval/linguistic/probes_en.py +1162 -0
- telos_ml-1.0.0/telos/eval/metrics.py +208 -0
- telos_ml-1.0.0/telos/eval/polyglot_eval.py +207 -0
- telos_ml-1.0.0/telos/eval/probes.py +160 -0
- telos_ml-1.0.0/telos/eval/reasoning_eval.py +167 -0
- telos_ml-1.0.0/telos/eval/runner.py +1562 -0
- telos_ml-1.0.0/telos/eval/stats.py +46 -0
- telos_ml-1.0.0/telos/eval/syntax.py +114 -0
- telos_ml-1.0.0/telos/eval/tooluse/__init__.py +21 -0
- telos_ml-1.0.0/telos/eval/tooluse/evaluator.py +326 -0
- telos_ml-1.0.0/telos/eval/tooluse/suite.py +341 -0
- telos_ml-1.0.0/telos/models/__init__.py +25 -0
- telos_ml-1.0.0/telos/models/components.py +143 -0
- telos_ml-1.0.0/telos/models/config.py +26 -0
- telos_ml-1.0.0/telos/models/mlx_components.py +106 -0
- telos_ml-1.0.0/telos/models/mlx_transformer.py +95 -0
- telos_ml-1.0.0/telos/models/param_counter.py +65 -0
- telos_ml-1.0.0/telos/models/transformer.py +107 -0
- telos_ml-1.0.0/telos/models/upscale.py +45 -0
- telos_ml-1.0.0/telos/testing/__init__.py +11 -0
- telos_ml-1.0.0/telos/testing/suite.py +329 -0
- telos_ml-1.0.0/telos/train/__init__.py +15 -0
- telos_ml-1.0.0/telos/train/__main__.py +4 -0
- telos_ml-1.0.0/telos/train/cli.py +514 -0
- telos_ml-1.0.0/telos/training/__init__.py +63 -0
- telos_ml-1.0.0/telos/training/core.py +233 -0
- telos_ml-1.0.0/telos/training/dataloader.py +68 -0
- telos_ml-1.0.0/telos/training/hardware.py +102 -0
- telos_ml-1.0.0/telos/training/lr_schedule.py +46 -0
- telos_ml-1.0.0/telos/training/monitor.py +188 -0
- telos_ml-1.0.0/telos/training/schedule.py +296 -0
- telos_ml-1.0.0/telos/training/trainer_mlx.py +547 -0
- telos_ml-1.0.0/telos/training/trainer_pytorch.py +1046 -0
- telos_ml-1.0.0/telos/training/xla_utils.py +180 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
|
|
5
|
+
.env
|
|
6
|
+
.venv
|
|
7
|
+
.hf_venv
|
|
8
|
+
env/
|
|
9
|
+
venv/
|
|
10
|
+
|
|
11
|
+
.vscode/
|
|
12
|
+
.idea/
|
|
13
|
+
.DS_Store
|
|
14
|
+
|
|
15
|
+
/data/
|
|
16
|
+
/checkpoints/
|
|
17
|
+
/checkpoints_*/
|
|
18
|
+
.gradio/
|
|
19
|
+
*.pt
|
|
20
|
+
*.safetensors
|
|
21
|
+
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
eggs/
|
|
26
|
+
.eggs/
|
|
27
|
+
lib/
|
|
28
|
+
lib64/
|
|
29
|
+
parts/
|
|
30
|
+
sdist/
|
|
31
|
+
var/
|
|
32
|
+
wheels/
|
|
33
|
+
*.egg-info/
|
|
34
|
+
.installed.cfg
|
|
35
|
+
*.egg
|
|
36
|
+
|
|
37
|
+
htmlcov/
|
|
38
|
+
.tox/
|
|
39
|
+
.coverage
|
|
40
|
+
.cache
|
|
41
|
+
.pytest_cache/
|
|
42
|
+
|
|
43
|
+
# Compiled Swift AFM bridge. Built on demand into a user cache dir
|
|
44
|
+
# (~/.cache/telos) rather than into the package; this pattern only catches
|
|
45
|
+
# stray local builds that land next to the source.
|
|
46
|
+
telos/**/afm_bridge
|
|
47
|
+
/afm_bridge
|
|
48
|
+
|
|
49
|
+
# Stray compiled binary at repo root (not a source file)
|
|
50
|
+
/main
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [1.0.0] - 2026-09-23
|
|
11
|
+
|
|
12
|
+
First public release on PyPI as `telos-ml` (`pip install telos-ml`).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
- **`telos-ml` PyPI Distribution** — Published package to PyPI under the name
|
|
16
|
+
`telos-ml`, preserving the `telos` Python module import and the `telos` CLI
|
|
17
|
+
command.
|
|
18
|
+
- **`telos dataprep`** — prepares raw text, code directories, JSONL, or Hugging
|
|
19
|
+
Face datasets into memory-mapped binary token streams (`.bin`).
|
|
20
|
+
- **`telos train`** — zero-config dimensional trainer. Specify parameters and
|
|
21
|
+
tokens; the geometry solver derives `d_model`, layers, and heads. Supports the
|
|
22
|
+
AR, MDLM, UNDLM, and COROSred paradigms on MLX (Apple Silicon), CUDA, TPU via
|
|
23
|
+
PyTorch-XLA, and CPU.
|
|
24
|
+
- **COROSred** — the unified dual-paradigm trainer, combining causal AR drafting,
|
|
25
|
+
uniform masked-diffusion infilling, and confidence-guided selective
|
|
26
|
+
re-diffusion, with a Learned Reliability Head driving routing.
|
|
27
|
+
- **`telos eval`** — multi-domain evaluation: contextual probes with bootstrap
|
|
28
|
+
confidence intervals, sandboxed functional execution (Pass@1, AST validity),
|
|
29
|
+
anti-cheat span masking, linguistic probes, and tool-use / function-calling
|
|
30
|
+
benchmarks.
|
|
31
|
+
- **`telos bench`** — hardware throughput and step-latency benchmark, capped at
|
|
32
|
+
five minutes.
|
|
33
|
+
- **`telos test`** — unified verification suite for model contracts, causality,
|
|
34
|
+
losses, and samplers.
|
|
35
|
+
- **`telos.afm`** — Python access to Apple's on-device Foundation Models
|
|
36
|
+
(AFM 3 Core / Core Advanced) on Apple Silicon. Exposes `probe()`, `require()`,
|
|
37
|
+
`generate()`, and a persistent `AFMBridge`, plus a `telos afm status` /
|
|
38
|
+
`telos afm generate` CLI. The Swift bridge is compiled on first use into a user
|
|
39
|
+
cache directory.
|
|
40
|
+
- Bundled default ByteLevel BPE tokenizer, so an installed package works with no
|
|
41
|
+
manual downloads.
|
|
42
|
+
- Graceful degradation when MLX is installed but Metal is unavailable (headless,
|
|
43
|
+
virtualized, or sandboxed macOS sessions): `telos train`, `telos bench` and
|
|
44
|
+
`telos test` fall back to the PyTorch CPU path instead of aborting the process.
|
|
45
|
+
|
|
46
|
+
[Unreleased]: https://github.com/kazenoko-git/telos/compare/v1.0.0...HEAD
|
|
47
|
+
[1.0.0]: https://github.com/kazenoko-git/telos/releases/tag/v1.0.0
|
telos_ml-1.0.0/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
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
|
|
95
|
+
Derivative 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 exemplary 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
|
+
Copyright 2026 Ivan Samuel / télos team
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
telos_ml-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: telos-ml
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Discrete diffusion and autoregressive language modeling: data preparation, training on MLX/CUDA/TPU, evaluation, and Python access to Apple's on-device Foundation Models.
|
|
5
|
+
Project-URL: Homepage, https://telos.research.wingit.tech
|
|
6
|
+
Project-URL: Repository, https://github.com/kazenoko-git/telos
|
|
7
|
+
Project-URL: Issues, https://github.com/kazenoko-git/telos/issues
|
|
8
|
+
Project-URL: Documentation, https://github.com/kazenoko-git/telos/blob/main/DEPLOYMENT.md
|
|
9
|
+
Project-URL: Changelog, https://github.com/kazenoko-git/telos/blob/main/CHANGELOG.md
|
|
10
|
+
Author: Ivan Samuel
|
|
11
|
+
License-Expression: Apache-2.0
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: apple-foundation-models,autoregressive,code-completion,cuda,discrete-diffusion,language-model,masked-diffusion,mlx,tpu
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Intended Audience :: Science/Research
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Requires-Dist: datasets>=3.0.0
|
|
26
|
+
Requires-Dist: huggingface-hub>=0.25.0
|
|
27
|
+
Requires-Dist: numpy>=1.26.0
|
|
28
|
+
Requires-Dist: pyyaml>=6.0.0
|
|
29
|
+
Requires-Dist: safetensors>=0.4.0
|
|
30
|
+
Requires-Dist: tokenizers>=0.21.0
|
|
31
|
+
Requires-Dist: torch>=2.5.0
|
|
32
|
+
Requires-Dist: tqdm>=4.66.0
|
|
33
|
+
Provides-Extra: all
|
|
34
|
+
Requires-Dist: gradio>=5.0.0; extra == 'all'
|
|
35
|
+
Requires-Dist: matplotlib>=3.8.0; extra == 'all'
|
|
36
|
+
Requires-Dist: mlx>=0.22.0; (sys_platform == 'darwin' and platform_machine == 'arm64') and extra == 'all'
|
|
37
|
+
Requires-Dist: pytest>=8.0.0; extra == 'all'
|
|
38
|
+
Requires-Dist: ruff>=0.8.0; extra == 'all'
|
|
39
|
+
Provides-Extra: dev
|
|
40
|
+
Requires-Dist: gradio>=5.0.0; extra == 'dev'
|
|
41
|
+
Requires-Dist: matplotlib>=3.8.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
44
|
+
Provides-Extra: mlx
|
|
45
|
+
Requires-Dist: mlx>=0.22.0; (sys_platform == 'darwin' and platform_machine == 'arm64') and extra == 'mlx'
|
|
46
|
+
Description-Content-Type: text/markdown
|
|
47
|
+
|
|
48
|
+
# télos (τέλος)
|
|
49
|
+
|
|
50
|
+
<p align="center">
|
|
51
|
+
<img src="logos/telos_logo.png" alt="telos logo" width="340">
|
|
52
|
+
</p>
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<a href="https://telos.research.wingit.tech"><strong>Research Portal: telos.research.wingit.tech</strong></a>
|
|
56
|
+
<br>
|
|
57
|
+
<em>Note: The research portal is currently under active construction and is not finished yet.</em>
|
|
58
|
+
</p>
|
|
59
|
+
|
|
60
|
+
<p align="center">
|
|
61
|
+
<img src="https://img.shields.io/badge/organization-Wing%20It%20Research-blueviolet" alt="Wing It Research">
|
|
62
|
+
<img src="https://img.shields.io/badge/license-Apache--2.0-blue.svg" alt="License">
|
|
63
|
+
<img src="https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13%20%7C%203.14-blue" alt="Python">
|
|
64
|
+
<img src="https://img.shields.io/badge/hardware-Apple%20Silicon%20(MLX)%20%7C%20CUDA%20%7C%20TPU%20(XLA)-orange" alt="Hardware Support">
|
|
65
|
+
</p>
|
|
66
|
+
|
|
67
|
+
## About Télos
|
|
68
|
+
|
|
69
|
+
"Whatever is new — we wing it."
|
|
70
|
+
|
|
71
|
+
Télos is an open research project by Wing It Research focused on AI research, benchmarks, and new architectures.
|
|
72
|
+
|
|
73
|
+
We are working on:
|
|
74
|
+
1. **COROSred** (COnfidence ROuted Selective ReDiffusion)
|
|
75
|
+
2. **Inference Optimal Scaling Laws** for Masked Diffusion and Uniform Noise Diffusion models
|
|
76
|
+
3. **Benchmarks for new models**
|
|
77
|
+
|
|
78
|
+
## Latest Findings
|
|
79
|
+
|
|
80
|
+
### Benchmarks (AFM-3 vs Granite vs LFM 8B)
|
|
81
|
+
|
|
82
|
+
We tested three edge models: Apple AFM-3 Core Advanced, IBM Granite 4.2 3B, and LiquidAI LFM 8B across 7 evaluation suites.
|
|
83
|
+
|
|
84
|
+
<p align="center">
|
|
85
|
+
<img src="figures/benchmark_radar_graph.png" alt="Benchmark Radar Graph Across Models" width="600">
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
| Suite | Tasks | Apple AFM-3 Core Adv. | IBM Granite 4.2 3B | LiquidAI LFM 8B A1B | Metric |
|
|
89
|
+
| :--- | :---: | :---: | :---: | :---: | :--- |
|
|
90
|
+
| **OpenAI HumanEval** | 164 | **62.80%** | 60.37% | 45.73% | Pass@1 (Code Execution) |
|
|
91
|
+
| **BFCL Tool-Use** | 30 | **73.33%** | 70.00% | 63.33% | Pass@1 (JSON Match) |
|
|
92
|
+
| **Cybersecurity Auditing** | 50 | 12.00% | 22.00% | **24.00%** | Pass@1 (Vulnerability Fix) |
|
|
93
|
+
| **GPQA Diamond** | 198 | **39.39%** | 28.79% | 20.71% | Pass@1 (Multiple Choice) |
|
|
94
|
+
| **MMLU Science** | 119 | 69.75% | 61.82% | **73.11%** | Pass@1 (Multiple Choice) |
|
|
95
|
+
| **Competition MATH** | 140 | 52.00% | **64.71%** | 43.57% | Pass@1 (Math Solutions) |
|
|
96
|
+
| **ARC-Challenge** | 150 | 85.32% | **86.60%** | 59.56% | Pass@1 (Reasoning Choice) |
|
|
97
|
+
| **Macro Average** | **841** | **56.37%** | **56.33%** | **47.14%** | 7-Suite Average |
|
|
98
|
+
|
|
99
|
+
#### Runaway Loops and Hardware Efficiency
|
|
100
|
+
|
|
101
|
+
Edge models sometimes get caught repeating words over and over, or they use too much memory.
|
|
102
|
+
|
|
103
|
+
<p align="center">
|
|
104
|
+
<img src="figures/benchmark_repetition_rate.png" alt="Degenerate Loop Rate Across Benchmarks" width="800">
|
|
105
|
+
</p>
|
|
106
|
+
|
|
107
|
+
<p align="center">
|
|
108
|
+
<img src="figures/benchmark_throughput_memory.png" alt="Throughput and Memory Comparison" width="800">
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
- **Runaway Loops**: IBM Granite 4.2 3B had the highest runaway loop rate at **36.8%** (1,129 tasks caught in repeat loops), followed by LiquidAI LFM 8B at **28.5%**, and Apple AFM-3 at **23.4%**.
|
|
112
|
+
- **Speed and Memory**: Apple AFM-3 runs natively via Swift IPC at **58.7 tok/s** using **2.4 GB** RAM. IBM Granite 4.2 3B runs at **41.2 tok/s** using **3.2 GB** RAM. LiquidAI LFM 8B runs at **22.4 tok/s** using **7.8 GB** RAM.
|
|
113
|
+
|
|
114
|
+
See [`benchmarks/README.md`](benchmarks/README.md) for full benchmark reports and details.
|
|
115
|
+
|
|
116
|
+
### Research (COROSred)
|
|
117
|
+
|
|
118
|
+
COROSred combines fast autoregressive token drafting with bidirectional diffusion fixing. High-confidence tokens are accepted in one step. Low-confidence tokens are fixed with bidirectional re-diffusion.
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
+-------------------------------------------------------+
|
|
122
|
+
| TÉLOS MODEL BACKBONE |
|
|
123
|
+
| (RoPE, SwiGLU, RMSNorm, Weight Tying, GQA) |
|
|
124
|
+
+---------------------------+---------------------------+
|
|
125
|
+
|
|
|
126
|
+
+--------------+--------------+
|
|
127
|
+
| |
|
|
128
|
+
v v
|
|
129
|
+
+-------------------------+ +-------------------------+
|
|
130
|
+
| Causal AR Next-Token | | Learned Reliability |
|
|
131
|
+
| Loss: L_causal (alpha) | | Head Gate |
|
|
132
|
+
+------------+------------+ +------------+------------+
|
|
133
|
+
| |
|
|
134
|
+
+--------------+--------------+
|
|
135
|
+
|
|
|
136
|
+
Routing Decision
|
|
137
|
+
|
|
|
138
|
+
+--------------+--------------+
|
|
139
|
+
| |
|
|
140
|
+
v v
|
|
141
|
+
+---------------------------+ +---------------------------+
|
|
142
|
+
| High Confidence (>= 0.65) | | Low Confidence (< 0.65) |
|
|
143
|
+
| Accept Draft Token | | Route to Bidirectional |
|
|
144
|
+
| (Fast 1-Step AR) | | Masked Re-Diffusion |
|
|
145
|
+
+---------------------------+ +---------------------------+
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- **Perplexity**: Achieves **5.08 validation PPL** (1.29x lower than pure AR).
|
|
149
|
+
- **Bidirectional Infilling**: Achieves **63.0% Top-1 accuracy** on fill-in-the-blank code tasks (compared to 7.6% for pure AR).
|
|
150
|
+
- **Anti-Cheat Span Masking**: Achieves **52.0% exact match** with a low 2.0% copy rate when multiple tokens are masked.
|
|
151
|
+
|
|
152
|
+
See [`research/README.md`](research/README.md) for research papers and scaling details.
|
|
153
|
+
|
|
154
|
+
## Documentation Directory Routing
|
|
155
|
+
|
|
156
|
+
| Directory | Topic & Contents |
|
|
157
|
+
| :--- | :--- |
|
|
158
|
+
| [Research (`research/`)](research/README.md) | Scaling laws, architecture notes, and papers |
|
|
159
|
+
| [Benchmarks (`benchmarks/`)](benchmarks/README.md) | Model comparisons, benchmark charts, and hardware metrics |
|
|
160
|
+
| [CLI (`cli/`)](cli/README.md) | Command line tools, training guide, and setup |
|
|
161
|
+
|
|
162
|
+
## Basic CLI Usage
|
|
163
|
+
|
|
164
|
+
### Installation
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Standard install
|
|
168
|
+
pip install telos-ml
|
|
169
|
+
|
|
170
|
+
# With Apple Silicon Metal support (MLX)
|
|
171
|
+
pip install "telos-ml[mlx]"
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Core CLI Commands
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# 1. Prepare token data
|
|
178
|
+
telos dataprep --input raw_data/ --output data/python.bin --vocab-size 8192
|
|
179
|
+
|
|
180
|
+
# 2. Train a 50M COROSred model on Apple Silicon
|
|
181
|
+
telos train --paradigm corosred --params 50M --tokens 2.5B --hardware mlx
|
|
182
|
+
|
|
183
|
+
# 3. Run evaluation
|
|
184
|
+
telos eval --checkpoint checkpoints/corosred/model.safetensors --type all
|
|
185
|
+
|
|
186
|
+
# 4. Hardware benchmark (capped at 5 minutes)
|
|
187
|
+
telos bench --paradigm corosred --params 50M --hardware mlx
|
|
188
|
+
|
|
189
|
+
# 5. Check Apple Foundation Models on Apple Silicon
|
|
190
|
+
telos afm status
|
|
191
|
+
telos afm generate "Explain binary search in two sentences."
|
|
192
|
+
|
|
193
|
+
# 6. Verification suite
|
|
194
|
+
telos test
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Python API
|
|
198
|
+
|
|
199
|
+
```python
|
|
200
|
+
import telos
|
|
201
|
+
|
|
202
|
+
# Use on-device Apple Foundation Models
|
|
203
|
+
if telos.afm.probe().available:
|
|
204
|
+
response = telos.afm.generate("Write a python function for quicksort.")
|
|
205
|
+
print(response)
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
See [`cli/README.md`](cli/README.md) for all CLI flags and options.
|
|
209
|
+
|
|
210
|
+
## Citations & References
|
|
211
|
+
|
|
212
|
+
### Primary Citation
|
|
213
|
+
|
|
214
|
+
```bibtex
|
|
215
|
+
@article{samuel2026telos,
|
|
216
|
+
title = {télos: Exploring Scaling Laws, Hardware Optimizations, and Paradigm Trade-offs in Discrete Diffusion and Autoregressive Language Models},
|
|
217
|
+
author = {Ivan Samuel},
|
|
218
|
+
journal = {Wing It Research},
|
|
219
|
+
year = {2026},
|
|
220
|
+
url = {https://telos.research.wingit.tech}
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### Framework & Related Research
|
|
225
|
+
|
|
226
|
+
- **Apple MLX**: Hannun et al., *MLX: Efficient machine learning on Apple silicon*, 2023.
|
|
227
|
+
- **Masked Diffusion Language Models (MDLM)**: Sahoo et al., *Masked Diffusion Language Models*, 2024.
|
|
228
|
+
- **Compute-Optimal Scaling (Chinchilla)**: Hoffmann et al., *Training Compute-Optimal Large Language Models*, 2022.
|
|
229
|
+
- **Large Language Diffusion Models (LLaDA)**: Nie et al., *LLaDA: Large Language Diffusion Models*, 2025.
|
|
230
|
+
- **Discrete Diffusion Language Modeling (DiffusionGemma)**: Google DeepMind, *DiffusionGemma: An experimental discrete diffusion model based on Gemma*, 2026.
|
|
231
|
+
|
|
232
|
+
## License
|
|
233
|
+
|
|
234
|
+
Apache-2.0 License. See [LICENSE](LICENSE) for details.
|