myai-builder 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.
- myai_builder-0.1.0/LICENSE +201 -0
- myai_builder-0.1.0/PKG-INFO +428 -0
- myai_builder-0.1.0/README.md +367 -0
- myai_builder-0.1.0/pyproject.toml +84 -0
- myai_builder-0.1.0/setup.cfg +4 -0
- myai_builder-0.1.0/src/myai/__init__.py +5 -0
- myai_builder-0.1.0/src/myai/__main__.py +4 -0
- myai_builder-0.1.0/src/myai/autopilot/__init__.py +9 -0
- myai_builder-0.1.0/src/myai/autopilot/orchestrator.py +182 -0
- myai_builder-0.1.0/src/myai/cli/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/cli/ask_cmd.py +87 -0
- myai_builder-0.1.0/src/myai/cli/auto_cmd.py +36 -0
- myai_builder-0.1.0/src/myai/cli/data_cmd.py +278 -0
- myai_builder-0.1.0/src/myai/cli/evaluate_cmd.py +98 -0
- myai_builder-0.1.0/src/myai/cli/export_cmd.py +67 -0
- myai_builder-0.1.0/src/myai/cli/index_cmd.py +62 -0
- myai_builder-0.1.0/src/myai/cli/init_cmd.py +52 -0
- myai_builder-0.1.0/src/myai/cli/main.py +79 -0
- myai_builder-0.1.0/src/myai/cli/merge_cmd.py +40 -0
- myai_builder-0.1.0/src/myai/cli/model_cmd.py +171 -0
- myai_builder-0.1.0/src/myai/cli/optimize_cmd.py +26 -0
- myai_builder-0.1.0/src/myai/cli/post_training_ui.py +562 -0
- myai_builder-0.1.0/src/myai/cli/recommend_cmd.py +119 -0
- myai_builder-0.1.0/src/myai/cli/reward_cmd.py +45 -0
- myai_builder-0.1.0/src/myai/cli/runs_cmd.py +58 -0
- myai_builder-0.1.0/src/myai/cli/serve_cmd.py +57 -0
- myai_builder-0.1.0/src/myai/cli/ship_cmd.py +66 -0
- myai_builder-0.1.0/src/myai/cli/status_cmd.py +65 -0
- myai_builder-0.1.0/src/myai/cli/system_cmd.py +33 -0
- myai_builder-0.1.0/src/myai/cli/train_cmd.py +277 -0
- myai_builder-0.1.0/src/myai/cli/uninstall_cmd.py +83 -0
- myai_builder-0.1.0/src/myai/cli/update_cmd.py +114 -0
- myai_builder-0.1.0/src/myai/core/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/core/config.py +144 -0
- myai_builder-0.1.0/src/myai/core/console.py +20 -0
- myai_builder-0.1.0/src/myai/core/goal.py +237 -0
- myai_builder-0.1.0/src/myai/core/home.py +23 -0
- myai_builder-0.1.0/src/myai/core/paths.py +20 -0
- myai_builder-0.1.0/src/myai/core/state.py +212 -0
- myai_builder-0.1.0/src/myai/data/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/data/cleaner.py +281 -0
- myai_builder-0.1.0/src/myai/data/loader.py +18 -0
- myai_builder-0.1.0/src/myai/data/manager.py +85 -0
- myai_builder-0.1.0/src/myai/data/prompt.py +46 -0
- myai_builder-0.1.0/src/myai/data/scanner.py +77 -0
- myai_builder-0.1.0/src/myai/data/scorer.py +126 -0
- myai_builder-0.1.0/src/myai/data/validator.py +42 -0
- myai_builder-0.1.0/src/myai/evaluation/__init__.py +27 -0
- myai_builder-0.1.0/src/myai/evaluation/datasets.py +55 -0
- myai_builder-0.1.0/src/myai/evaluation/domain.py +36 -0
- myai_builder-0.1.0/src/myai/evaluation/meaning.py +52 -0
- myai_builder-0.1.0/src/myai/evaluation/metrics.py +39 -0
- myai_builder-0.1.0/src/myai/evaluation/readability.py +49 -0
- myai_builder-0.1.0/src/myai/evaluation/regression.py +28 -0
- myai_builder-0.1.0/src/myai/evaluation/report.py +80 -0
- myai_builder-0.1.0/src/myai/evaluation/reward_synth.py +363 -0
- myai_builder-0.1.0/src/myai/evaluation/runner.py +197 -0
- myai_builder-0.1.0/src/myai/evaluation/ship_gate.py +225 -0
- myai_builder-0.1.0/src/myai/evaluation/validators.py +63 -0
- myai_builder-0.1.0/src/myai/export/__init__.py +12 -0
- myai_builder-0.1.0/src/myai/export/gguf_exporter.py +51 -0
- myai_builder-0.1.0/src/myai/export/merger.py +59 -0
- myai_builder-0.1.0/src/myai/export/packager.py +1113 -0
- myai_builder-0.1.0/src/myai/export/validator.py +298 -0
- myai_builder-0.1.0/src/myai/hardware/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/hardware/benchmark.py +172 -0
- myai_builder-0.1.0/src/myai/hardware/detector.py +55 -0
- myai_builder-0.1.0/src/myai/hardware/feasibility.py +212 -0
- myai_builder-0.1.0/src/myai/hardware/memory_calc.py +525 -0
- myai_builder-0.1.0/src/myai/knowledge/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/knowledge/chunker.py +12 -0
- myai_builder-0.1.0/src/myai/knowledge/embedder.py +26 -0
- myai_builder-0.1.0/src/myai/knowledge/gate.py +34 -0
- myai_builder-0.1.0/src/myai/knowledge/index_builder.py +32 -0
- myai_builder-0.1.0/src/myai/models/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/models/downloader.py +24 -0
- myai_builder-0.1.0/src/myai/models/leaderboard.py +195 -0
- myai_builder-0.1.0/src/myai/models/manifest.py +25 -0
- myai_builder-0.1.0/src/myai/models/recommender.py +306 -0
- myai_builder-0.1.0/src/myai/models/registry.py +8 -0
- myai_builder-0.1.0/src/myai/models/schema.py +245 -0
- myai_builder-0.1.0/src/myai/models/trained_registry.py +112 -0
- myai_builder-0.1.0/src/myai/optimizer/__init__.py +18 -0
- myai_builder-0.1.0/src/myai/optimizer/diagnostics.py +134 -0
- myai_builder-0.1.0/src/myai/optimizer/engine.py +189 -0
- myai_builder-0.1.0/src/myai/registry/loader.py +39 -0
- myai_builder-0.1.0/src/myai/registry/models/deepseek/deepseek-distill-7b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/deepseek/deepseek-r1-distill-32b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/gemma/gemma3-12b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/gemma/gemma3-1b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/gemma/gemma3-270m-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/gemma/gemma3-4b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/glm/glm-4.5-air-106b-a12b.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/llama/llama-3.1-70b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/llama/llama-3.1-8b-instruct.yaml +68 -0
- myai_builder-0.1.0/src/myai/registry/models/llama/llama-3.2-1b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/llama/llama-3.2-3b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/mistral/ministral-3-14b-instruct.yaml +35 -0
- myai_builder-0.1.0/src/myai/registry/models/mistral/ministral-3-3b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/mistral/ministral-3-8b-instruct.yaml +35 -0
- myai_builder-0.1.0/src/myai/registry/models/mistral/mistral-large-3-675b.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/mistral/mistral-small-3.1-24b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/phi/phi-4-14b-instruct.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/phi/phi-4-mini-instruct.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen2.5-0.5b-instruct.yaml +12 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen2.5-1.5b-instruct.yaml +12 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen2.5-3b-instruct.yaml +12 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen2.5-7b-instruct.yaml +12 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3-0.6b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3-235b-a22b.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3-30b-a3b-instruct.yaml +66 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3-4b-instruct.yaml +65 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3-8b-instruct.yaml +67 -0
- myai_builder-0.1.0/src/myai/registry/models/qwen/qwen3.5-0.8b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/smollm/smollm2-1.7b-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/smollm/smollm2-135m-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/models/smollm/smollm2-360m-instruct.yaml +64 -0
- myai_builder-0.1.0/src/myai/registry/scorer.py +275 -0
- myai_builder-0.1.0/src/myai/registry/validator.py +43 -0
- myai_builder-0.1.0/src/myai/serving/__init__.py +9 -0
- myai_builder-0.1.0/src/myai/serving/app.py +307 -0
- myai_builder-0.1.0/src/myai/serving/runtime.py +230 -0
- myai_builder-0.1.0/src/myai/system/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/system/storage.py +41 -0
- myai_builder-0.1.0/src/myai/tokenization/__init__.py +29 -0
- myai_builder-0.1.0/src/myai/tokenization/analyzer.py +164 -0
- myai_builder-0.1.0/src/myai/tokenization/cache.py +104 -0
- myai_builder-0.1.0/src/myai/tokenization/formatter.py +129 -0
- myai_builder-0.1.0/src/myai/tokenization/stats.py +279 -0
- myai_builder-0.1.0/src/myai/tokenization/tokenizer.py +223 -0
- myai_builder-0.1.0/src/myai/training/__init__.py +1 -0
- myai_builder-0.1.0/src/myai/training/dataset_builder.py +79 -0
- myai_builder-0.1.0/src/myai/training/engine.py +394 -0
- myai_builder-0.1.0/src/myai/training/failure.py +61 -0
- myai_builder-0.1.0/src/myai/training/layer_streaming.py +106 -0
- myai_builder-0.1.0/src/myai/training/live_ui.py +91 -0
- myai_builder-0.1.0/src/myai/training/preference_losses.py +213 -0
- myai_builder-0.1.0/src/myai/training/runs.py +96 -0
- myai_builder-0.1.0/src/myai/training/strategy.py +247 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/PKG-INFO +428 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/SOURCES.txt +166 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/dependency_links.txt +1 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/entry_points.txt +2 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/requires.txt +43 -0
- myai_builder-0.1.0/src/myai_builder.egg-info/top_level.txt +1 -0
- myai_builder-0.1.0/tests/test_auto_pipeline.py +67 -0
- myai_builder-0.1.0/tests/test_autopilot.py +151 -0
- myai_builder-0.1.0/tests/test_benchmark.py +26 -0
- myai_builder-0.1.0/tests/test_data_cleaner.py +131 -0
- myai_builder-0.1.0/tests/test_data_management.py +206 -0
- myai_builder-0.1.0/tests/test_e2e.py +250 -0
- myai_builder-0.1.0/tests/test_evaluation.py +314 -0
- myai_builder-0.1.0/tests/test_export_chat.py +127 -0
- myai_builder-0.1.0/tests/test_feasibility.py +95 -0
- myai_builder-0.1.0/tests/test_goal.py +118 -0
- myai_builder-0.1.0/tests/test_hardware_catalog.py +146 -0
- myai_builder-0.1.0/tests/test_leaderboard.py +156 -0
- myai_builder-0.1.0/tests/test_model_selection.py +196 -0
- myai_builder-0.1.0/tests/test_optimizer.py +135 -0
- myai_builder-0.1.0/tests/test_scorer.py +61 -0
- myai_builder-0.1.0/tests/test_security_audit.py +1552 -0
- myai_builder-0.1.0/tests/test_soup_features.py +195 -0
- myai_builder-0.1.0/tests/test_state.py +63 -0
- myai_builder-0.1.0/tests/test_strategy.py +91 -0
- myai_builder-0.1.0/tests/test_tokenizer_analysis.py +354 -0
- myai_builder-0.1.0/tests/test_training_engine.py +251 -0
- myai_builder-0.1.0/tests/test_uninstall.py +48 -0
- myai_builder-0.1.0/tests/test_update.py +57 -0
|
@@ -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
|
|
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 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 [yyyy] [name of copyright owner]
|
|
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.
|
|
@@ -0,0 +1,428 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: myai-builder
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: The Local-First Autonomous AI Model Builder & Standalone Runtime Packager
|
|
5
|
+
Author: Kiran Sai
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://github.com/kiransai-62/myai
|
|
8
|
+
Project-URL: Documentation, https://github.com/kiransai-62/myai#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/kiransai-62/myai.git
|
|
10
|
+
Project-URL: Issues, https://github.com/kiransai-62/myai/issues
|
|
11
|
+
Keywords: ai,llm,fine-tuning,lora,qlora,local-ai,quantization,gguf,ollama
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
Classifier: Topic :: Software Development :: Build Tools
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: typer>=0.12.3
|
|
26
|
+
Requires-Dist: rich>=13.7.1
|
|
27
|
+
Requires-Dist: PyYAML>=6.0.1
|
|
28
|
+
Requires-Dist: psutil>=5.9.8
|
|
29
|
+
Provides-Extra: models
|
|
30
|
+
Requires-Dist: huggingface_hub>=0.23.0; extra == "models"
|
|
31
|
+
Provides-Extra: train
|
|
32
|
+
Requires-Dist: torch>=2.3.0; extra == "train"
|
|
33
|
+
Requires-Dist: transformers>=4.43.0; extra == "train"
|
|
34
|
+
Requires-Dist: peft>=0.11.0; extra == "train"
|
|
35
|
+
Requires-Dist: bitsandbytes>=0.43.0; extra == "train"
|
|
36
|
+
Requires-Dist: accelerate>=0.30.0; extra == "train"
|
|
37
|
+
Provides-Extra: retrieval
|
|
38
|
+
Requires-Dist: sentence-transformers>=3.0.0; extra == "retrieval"
|
|
39
|
+
Provides-Extra: knowledge
|
|
40
|
+
Requires-Dist: numpy>=1.24.0; extra == "knowledge"
|
|
41
|
+
Provides-Extra: serving
|
|
42
|
+
Requires-Dist: fastapi>=0.111.0; extra == "serving"
|
|
43
|
+
Requires-Dist: uvicorn>=0.30.0; extra == "serving"
|
|
44
|
+
Requires-Dist: pydantic>=2.7.0; extra == "serving"
|
|
45
|
+
Requires-Dist: requests>=2.31.0; extra == "serving"
|
|
46
|
+
Requires-Dist: httpx>=0.27.0; extra == "serving"
|
|
47
|
+
Provides-Extra: serve
|
|
48
|
+
Requires-Dist: fastapi>=0.111.0; extra == "serve"
|
|
49
|
+
Requires-Dist: uvicorn>=0.30.0; extra == "serve"
|
|
50
|
+
Requires-Dist: pydantic>=2.7.0; extra == "serve"
|
|
51
|
+
Requires-Dist: requests>=2.31.0; extra == "serve"
|
|
52
|
+
Requires-Dist: httpx>=0.27.0; extra == "serve"
|
|
53
|
+
Provides-Extra: eval
|
|
54
|
+
Requires-Dist: textstat>=0.7.3; extra == "eval"
|
|
55
|
+
Requires-Dist: nltk>=3.8.1; extra == "eval"
|
|
56
|
+
Requires-Dist: rouge-score>=0.1.2; extra == "eval"
|
|
57
|
+
Provides-Extra: dev
|
|
58
|
+
Requires-Dist: pytest>=8.2.0; extra == "dev"
|
|
59
|
+
Requires-Dist: httpx>=0.27.0; extra == "dev"
|
|
60
|
+
Dynamic: license-file
|
|
61
|
+
|
|
62
|
+
<p align="center">
|
|
63
|
+
<img src="https://raw.githubusercontent.com/kiransai-62/myai/main/assets/myai-logo.png" alt="MYAI Logo - Build · Train · Evolve" width="340">
|
|
64
|
+
</p>
|
|
65
|
+
|
|
66
|
+
<h1 align="center">MYAI</h1>
|
|
67
|
+
|
|
68
|
+
<p align="center">
|
|
69
|
+
<strong>The Local-First Autonomous AI Model Builder & Standalone Runtime Packager.</strong><br>
|
|
70
|
+
<em>BUILD · TRAIN · EVOLVE</em>
|
|
71
|
+
</p>
|
|
72
|
+
|
|
73
|
+
<p align="center">
|
|
74
|
+
<a href="#-installation">Installation</a> ·
|
|
75
|
+
<a href="#-quickstart-in-3-commands">Quickstart</a> ·
|
|
76
|
+
<a href="#-why-myai">Why MYAI?</a> ·
|
|
77
|
+
<a href="#-key-capabilities">Capabilities</a> ·
|
|
78
|
+
<a href="#-hardware-tiers--supported-models">Hardware & Models</a> ·
|
|
79
|
+
<a href="#-step-by-step-workflow-guide">Workflow Guide</a> ·
|
|
80
|
+
<a href="#-standalone-runtime-export">Standalone Runtime</a> ·
|
|
81
|
+
<a href="#-complete-cli-reference">CLI Reference</a> ·
|
|
82
|
+
<a href="#-security--containment-policies">Security & Privacy</a>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
<p align="center">
|
|
86
|
+
<a href="https://github.com/kiransai-62/myai/actions/workflows/test.yml"><img src="https://github.com/kiransai-62/myai/actions/workflows/test.yml/badge.svg" alt="CI Tests"></a>
|
|
87
|
+
<a href="https://github.com/kiransai-62/myai"><img src="https://img.shields.io/badge/python-3.10%2B-3776AB?logo=python&logoColor=white" alt="Python 3.10+"></a>
|
|
88
|
+
<a href="https://github.com/kiransai-62/myai/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green.svg" alt="License"></a>
|
|
89
|
+
<a href="https://github.com/kiransai-62/myai/blob/main/docs/hardware_catalog.md"><img src="https://img.shields.io/badge/hardware-tier%20matrix-blueviolet" alt="Hardware Intelligence"></a>
|
|
90
|
+
<a href="#-post-training-preference-alignment"><img src="https://img.shields.io/badge/alignment-DPO%20%7C%20ORPO%20%7C%20SimPO%20%7C%20KTO-orange" alt="Alignment"></a>
|
|
91
|
+
<a href="#-security--containment-policies"><img src="https://img.shields.io/badge/export%20gate-verified%20containment-brightgreen" alt="Security Gate"></a>
|
|
92
|
+
<img src="https://img.shields.io/badge/privacy-local--first%20%26%20private-success" alt="Local First Privacy">
|
|
93
|
+
</p>
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
Tell MYAI what AI you want. MYAI analyzes your **goal**, your **hardware**, and your **data** — then helps build, evaluate, optimize, and package your custom model into a standalone, portable runtime with its own Web & CLI Chat UI, or exports it to GGUF format for Ollama and `llama.cpp`.
|
|
98
|
+
|
|
99
|
+
> **No cloud GPUs required. Local data privacy. No framework lock-in.**
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## 📦 Installation
|
|
104
|
+
|
|
105
|
+
### From PyPI (Recommended)
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Basic installation
|
|
109
|
+
pip install myai-builder
|
|
110
|
+
|
|
111
|
+
# Recommended: includes test suite, local serving API, and evaluation metrics
|
|
112
|
+
pip install "myai-builder[serving,eval]"
|
|
113
|
+
|
|
114
|
+
# Full installation: adds PyTorch, LoRA/QLoRA training & Hugging Face models
|
|
115
|
+
pip install "myai-builder[dev,serving,eval,train,models,retrieval]"
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### From Source (Development)
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
git clone https://github.com/kiransai-62/myai.git
|
|
122
|
+
cd myai
|
|
123
|
+
pip install -e ".[dev,serving,eval,train,models,retrieval]"
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Dependency Groups
|
|
127
|
+
|
|
128
|
+
| Group | Key Dependencies | Purpose |
|
|
129
|
+
| :--- | :--- | :--- |
|
|
130
|
+
| `dev` | `pytest`, `httpx` | Running test suites and security audit checks |
|
|
131
|
+
| `serving` / `serve` | `fastapi`, `uvicorn`, `pydantic`, `requests`, `httpx` | Local-first REST and SSE streaming inference server (`myai serve`) |
|
|
132
|
+
| `eval` | `textstat`, `nltk`, `rouge-score` | Quality scoring, linguistic readability, and evaluation metrics |
|
|
133
|
+
| `train` | `torch`, `transformers`, `peft`, `bitsandbytes`, `accelerate` | LoRA / QLoRA fine-tuning and layer streaming |
|
|
134
|
+
| `models` | `huggingface_hub` | Base model downloading and registry access |
|
|
135
|
+
| `retrieval` | `sentence-transformers` | Semantic search and embedding-based knowledge indexes |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## ⚡ Quickstart in 3 Commands
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# 1. Initialize in current directory (or create a subfolder with 'myai init <name>')
|
|
143
|
+
myai init .
|
|
144
|
+
|
|
145
|
+
# 2. Add your dataset in-place (JSONL, JSON, CSV, TXT, Parquet)
|
|
146
|
+
myai data add <path/to-data> # e.g., ./coaching_data.jsonl
|
|
147
|
+
|
|
148
|
+
# 3. Autopilot: Goal → Hardware & Data → Train → Eval → Optimize → Export
|
|
149
|
+
myai auto --export
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### 🖥️ Autopilot Workflow Overview
|
|
153
|
+
|
|
154
|
+
```text
|
|
155
|
+
Goal Specification
|
|
156
|
+
↓
|
|
157
|
+
Hardware & Data Analysis
|
|
158
|
+
↓
|
|
159
|
+
Model Recommendation
|
|
160
|
+
↓
|
|
161
|
+
Fine-Tuning & Alignment
|
|
162
|
+
↓
|
|
163
|
+
Evaluation & Verification
|
|
164
|
+
↓
|
|
165
|
+
Hyperparameter Optimization
|
|
166
|
+
↓
|
|
167
|
+
Security & Containment Gate
|
|
168
|
+
↓
|
|
169
|
+
Standalone Export & Deployment
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 💡 Why MYAI?
|
|
175
|
+
|
|
176
|
+
Building, evaluating, and packaging fine-tuned LLMs has traditionally been fragmented across ad-hoc scripts, CUDA out-of-memory errors, disconnected evaluation tools, and bulky serving setups. MYAI unifies the entire stack into an **autonomous, local-first platform**:
|
|
177
|
+
|
|
178
|
+
| Feature | Description |
|
|
179
|
+
| :--- | :--- |
|
|
180
|
+
| 🔒 **Local-First & Private** | Compute, tokenization, training, and evaluation run on your local machine with no external cloud telemetry. |
|
|
181
|
+
| 🌊 **Memory-Efficient Training** | Adaptive layer streaming enables fine-tuning on budget and laptop GPUs. |
|
|
182
|
+
| 🖥️ **Hardware-Aware Intelligence** | Analyzes system CPU, RAM, and GPU/VRAM to match feasible models and context windows. |
|
|
183
|
+
| 🎯 **Post-Training Alignment** | Preference optimization supporting **DPO, ORPO, SimPO, and KTO**. |
|
|
184
|
+
| 🧠 **Automated Task Verification** | Evaluates model outputs against task criteria and reference datasets. |
|
|
185
|
+
| 🛡️ **Regression Quality Gate** | Bundled offline test suites (format compliance, tool calling, arithmetic, safety) issuing automated SHIP / DON'T-SHIP verdicts. |
|
|
186
|
+
| 📦 **Standalone Runtime Exports** | Self-contained ZIP packages containing a built-in Web Chat UI, GGUF format for Ollama, and merged weight checkpoints. |
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## 🌟 Key Capabilities
|
|
191
|
+
|
|
192
|
+
```mermaid
|
|
193
|
+
graph TD
|
|
194
|
+
A["🎯 Goal Definition (Task, Domain, Context)"] --> B["🖥️ Hardware & Resource Profiling"]
|
|
195
|
+
B --> C["🧹 Dataset Intelligence (Reference Mode & Token Analysis)"]
|
|
196
|
+
C --> D["⚖️ Model Recommendation & Resource Feasibility"]
|
|
197
|
+
D --> E["⚙️ Adaptive Training Strategy"]
|
|
198
|
+
E --> F["🏗️ Fine-Tuning & Preference Alignment (LoRA / QLoRA / DPO / SimPO)"]
|
|
199
|
+
F --> G["🏆 Goal-Aligned Evaluation & Leaderboard"]
|
|
200
|
+
G --> H["🔧 Automated Optimization Loop"]
|
|
201
|
+
H --> I["🛡️ Quality & Regression Gate"]
|
|
202
|
+
I --> J["📦 Security Containment & Export Gate"]
|
|
203
|
+
J --> K["🚀 Standalone Web Chat ZIP & GGUF (Ollama)"]
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### 1. 🎯 Goal-Aligned Planning
|
|
207
|
+
|
|
208
|
+
Define your AI's task and domain (`chat`, `code`, `domain-qa`, `summarization`, `extraction`, `reasoning`). MYAI tailors evaluation criteria so performance is measured directly against your specific objective.
|
|
209
|
+
|
|
210
|
+
### 2. 🧹 Dataset Intelligence & Strict Reference Mode
|
|
211
|
+
|
|
212
|
+
* **Strict Reference Mode**: Original data files are **never modified in-place**.
|
|
213
|
+
* **PII & Secret Scrubbing**: Automated detection and redaction of sensitive strings (emails, phone numbers, API keys).
|
|
214
|
+
* **Deduplication**: Identifies and removes duplicate and near-duplicate samples.
|
|
215
|
+
* **Leakage Detection**: Isolates train and validation sets before training begins.
|
|
216
|
+
|
|
217
|
+
### 3. 🔬 Token & Context Analysis
|
|
218
|
+
|
|
219
|
+
* Computes token counts and sequence distributions across supported model families (Llama, Qwen, SmolLM).
|
|
220
|
+
* Flags context length mismatches and memory considerations prior to training.
|
|
221
|
+
|
|
222
|
+
### 4. 🌊 Memory-Efficient Training
|
|
223
|
+
|
|
224
|
+
Enables fine-tuning on resource-constrained GPUs via memory-optimized layer streaming.
|
|
225
|
+
|
|
226
|
+
### 5. 🧬 Post-Training Preference Alignment
|
|
227
|
+
|
|
228
|
+
Fine-tune beyond standard supervised training with modern preference alignment algorithms:
|
|
229
|
+
|
|
230
|
+
* **DPO** (Direct Preference Optimization)
|
|
231
|
+
* **ORPO** (Odds Ratio Preference Optimization — reference-model-free)
|
|
232
|
+
* **SimPO** (Simple Preference Optimization — length-normalized margin)
|
|
233
|
+
* **KTO** (Kahneman-Tversky Optimization — binary feedback)
|
|
234
|
+
|
|
235
|
+
### 6. 🛡️ Quality Gate & Containment Verification
|
|
236
|
+
|
|
237
|
+
* Validates fine-tuned checkpoints against regression suites before release (`myai ship`).
|
|
238
|
+
* Enforces containment checks (excludes internal source files, `.git`, `.env`, raw datasets, and traversal paths) before packaging.
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 🖥️ Hardware Tiers & Supported Models
|
|
243
|
+
|
|
244
|
+
### Hardware-Aware Feasibility
|
|
245
|
+
|
|
246
|
+
MYAI evaluates your local hardware capacity (CPU, system RAM, and GPU VRAM) to recommend suitable models and training configurations:
|
|
247
|
+
|
|
248
|
+
* **Capacity-Matched Recommendations**: Recommends models based on your hardware, data, task, and deployment requirements.
|
|
249
|
+
* **Headroom Feasibility**: Checks available memory headroom across operating context lengths.
|
|
250
|
+
* **Clear Readiness Verdicts**: Provides clear guidance on whether a model is recommended, compatible, or requires reduced context/quantization.
|
|
251
|
+
|
|
252
|
+
### Compute Tiers Overview
|
|
253
|
+
|
|
254
|
+
| Hardware Tier | Memory Profile | Example Hardware | Supported Models |
|
|
255
|
+
| :--- | :--- | :--- | :--- |
|
|
256
|
+
| **Tier T0 (CPU Only)** | 8GB–32GB Host RAM | Intel Core / AMD Ryzen / Apple Silicon | SmolLM2 (135M–1.7B), Qwen 2.5 (0.5B–1.5B) |
|
|
257
|
+
| **Tier T1 (Low VRAM)** | **4GB–6GB VRAM** | GTX 1650, RTX 3050 Laptop | SmolLM2, Qwen 2.5 (1.5B/3B), Gemma 3 (1B/4B), 8B (Streaming) |
|
|
258
|
+
| **Tier T2 (Mid VRAM)** | **8GB–16GB VRAM** | RTX 3060, RTX 4070, Apple M-Series | Llama 3.1 (8B), Qwen 2.5 (7B/14B), Phi-4 (14B), Ministral (8B) |
|
|
259
|
+
| **Tier T3 (High VRAM)** | **24GB+ VRAM** | RTX 3090, RTX 4090, A100, H100 | Mistral Small (24B), Qwen 2.5 (32B), Llama 3.1 (70B) |
|
|
260
|
+
|
|
261
|
+
### Supported Model Families
|
|
262
|
+
|
|
263
|
+
MYAI supports leading open-weight model architectures spanning **0.1B to 70B+** parameters:
|
|
264
|
+
|
|
265
|
+
| Model Family | Representative Sizes | Architecture | Quantization Formats | Primary Strengths |
|
|
266
|
+
| :--- | :--- | :--- | :---: | :--- |
|
|
267
|
+
| **SmolLM2** | 135M, 360M, 1.7B | Dense | FP16, INT8, Q4_K_M | Ultra-lightweight on-device assistants, edge devices |
|
|
268
|
+
| **Qwen 2.5 / 3** | 0.5B, 1.5B, 3B, 7B, 14B, 32B | Dense & MoE | FP16, FP8, AWQ, GPTQ, Q4_K_M | Multilingual instruction following, coding, reasoning |
|
|
269
|
+
| **Llama 3.1 / 3.2** | 1B, 3B, 8B, 70B | Dense | FP16, BF16, Q4_K_M, INT8 | General reasoning, tool calling, instruction tuning |
|
|
270
|
+
| **Gemma 3** | 270M, 1B, 4B, 12B | Dense | FP16, BF16, Q4_K_M | Mathematical reasoning, high-efficiency generation |
|
|
271
|
+
| **Mistral / Ministral** | 3B, 8B, 14B, 24B | Dense & MoE | FP16, FP8, AWQ, Q4_K_M | Code generation, reasoning, efficient MoE |
|
|
272
|
+
| **Phi-4** | 3.8B (Mini), 14B | Dense | FP16, BF16, Q4_K_M | Advanced STEM reasoning, logic, and extraction |
|
|
273
|
+
| **DeepSeek (R1 Distill)** | 7B, 32B | Dense | FP16, Q4_K_M, AWQ | Deep analytical reasoning, math, and code synthesis |
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## 🧭 Step-by-Step Workflow Guide
|
|
278
|
+
|
|
279
|
+
### 1. Initialize Project & Goal
|
|
280
|
+
|
|
281
|
+
```bash
|
|
282
|
+
myai init fitness-coach --task domain-qa --domain fitness --context balanced
|
|
283
|
+
cd fitness-coach
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
### 2. Register & Clean Data
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
# Register dataset source in Reference Mode and inspect token distribution
|
|
290
|
+
myai data add ./coaching_data.jsonl
|
|
291
|
+
|
|
292
|
+
# Clean dataset, redact PII, deduplicate, and create holdout validation set
|
|
293
|
+
myai data clean --fuzzy --val-split 0.1
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### 3. Model Recommendation & System Check
|
|
297
|
+
|
|
298
|
+
```bash
|
|
299
|
+
# Verify local hardware availability
|
|
300
|
+
myai system check
|
|
301
|
+
|
|
302
|
+
# Get goal- and hardware-aware base model recommendation
|
|
303
|
+
myai recommend
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### 4. Fine-Tuning & Alignment
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Standard QLoRA fine-tuning
|
|
310
|
+
myai train --epochs 3 --lr 2e-4
|
|
311
|
+
|
|
312
|
+
# Fine-tune with memory streaming on low-VRAM hardware
|
|
313
|
+
myai train --stream-layers
|
|
314
|
+
|
|
315
|
+
# Direct preference alignment (SimPO, DPO, ORPO, or KTO)
|
|
316
|
+
myai train --task simpo
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### 5. Automated Verification & Quality Gate
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
# Generate task-specific verifiers from reference data
|
|
323
|
+
myai reward synth ./data/references.jsonl -o reward.py
|
|
324
|
+
|
|
325
|
+
# Execute regression gate before release
|
|
326
|
+
myai ship
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
### 6. Export Standalone Package
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
# Export standalone Web Chat ZIP
|
|
333
|
+
myai export
|
|
334
|
+
|
|
335
|
+
# Export GGUF format for Ollama / llama.cpp
|
|
336
|
+
myai export --format gguf --quant q4_k_m
|
|
337
|
+
|
|
338
|
+
# Merge adapter weights into base model checkpoint
|
|
339
|
+
myai merge
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
---
|
|
343
|
+
|
|
344
|
+
## 🚀 Standalone Runtime Export
|
|
345
|
+
|
|
346
|
+
The exported `.zip` contains a self-contained runtime that can run independently without requiring the full MYAI development CLI:
|
|
347
|
+
|
|
348
|
+
```text
|
|
349
|
+
fitness-coach.myai.zip
|
|
350
|
+
├── model/ # Model / adapter weights
|
|
351
|
+
├── tokenizer/ # Tokenizer config and vocabulary
|
|
352
|
+
├── metadata.json # Model provenance, base repo, and goal profile
|
|
353
|
+
├── evaluation.json # Evaluation metrics and gate verification status
|
|
354
|
+
├── loader.py # Lightweight inference loader
|
|
355
|
+
└── chat/
|
|
356
|
+
├── app.py # Lightweight web server (built-in http.server)
|
|
357
|
+
├── ui.py # Terminal fallback chat interface
|
|
358
|
+
├── config.json # UI configuration & styling
|
|
359
|
+
└── web/
|
|
360
|
+
└── index.html # Responsive Web Chat interface
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
### Launch Web Chat Interface
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
python chat/app.py
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
* Runs on Python's standard library `http.server` with zero external web framework dependencies.
|
|
370
|
+
* Responsive, dark-mode browser interface.
|
|
371
|
+
* Includes real-time streaming, parameter controls, token counters, and message history.
|
|
372
|
+
|
|
373
|
+
---
|
|
374
|
+
|
|
375
|
+
## 🛡️ Security & Containment Policies
|
|
376
|
+
|
|
377
|
+
Artifacts produced by `myai export` follow strict automated packaging and containment checks:
|
|
378
|
+
|
|
379
|
+
| Policy Area | Verification Scope | Description |
|
|
380
|
+
| :--- | :--- | :--- |
|
|
381
|
+
| **Integrity** | Package Structure | Verifies archive integrity, weight files, and tokenizer configurations. |
|
|
382
|
+
| **Provenance** | Manifest Audit | Records base model origin, training configurations, and holdout evaluation metrics. |
|
|
383
|
+
| **Runtime Isolation** | Portable Delivery | Bundles standalone `loader.py` and lightweight Web Chat runtime. |
|
|
384
|
+
| **Containment** | Source Isolation | Excludes development source files and `.git/` history from release packages. |
|
|
385
|
+
| **Data Privacy** | Secret & Data Scrubbing | Checks for sensitive credentials (`sk-`, `ghp_`, `hf_`, `AKIA`) and excludes raw training files. |
|
|
386
|
+
| **Path Security** | Traversal Protection | Prevents absolute host paths and relative directory traversals (`../`). |
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## 🛠️ Complete CLI Reference
|
|
391
|
+
|
|
392
|
+
| Command Group | Command | Description |
|
|
393
|
+
| :--- | :--- | :--- |
|
|
394
|
+
| **Project** | `myai init [name]` | Initialize project workspace with interactive Goal Profile interview |
|
|
395
|
+
| | `myai status` | Inspect project lifecycle state and recommended next steps |
|
|
396
|
+
| | `myai system check` | Probe local CPU, RAM, GPU, VRAM, and compute tier |
|
|
397
|
+
| | `myai system benchmark` | Benchmark live hardware compute and memory throughput |
|
|
398
|
+
| **Autopilot** | `myai auto [--export]` | **Autonomous Pipeline**: Goal → Hardware & Data → Train → Eval → Optimize → Export |
|
|
399
|
+
| **Data** | `myai data add <path>` | Register local datasets in Reference Mode and analyze token distributions |
|
|
400
|
+
| | `myai data tokenize` | Inspect token counts, sequence lengths, and context fit |
|
|
401
|
+
| | `myai data clean` | Clean, deduplicate, scrub sensitive data, and split train/val sets |
|
|
402
|
+
| | `myai data list` / `info` | View registered datasets, sample counts, and quality metrics |
|
|
403
|
+
| **Models** | `myai model list` | Browse supported model catalog (Dense, MoE, size, VRAM requirements) |
|
|
404
|
+
| | `myai model use <id>` | Select active base model for the project |
|
|
405
|
+
| | `myai recommend` | Hardware- and goal-aware recommendation with multi-factor suitability |
|
|
406
|
+
| **Training** | `myai train` | Train model with live loss curves and progress telemetry |
|
|
407
|
+
| | `myai train --stream-layers` | Train on resource-constrained GPUs using memory streaming |
|
|
408
|
+
| | `myai train --task <method>` | Train preference alignment (**DPO, ORPO, SimPO, KTO**) |
|
|
409
|
+
| **Evaluation** | `myai evaluate` | Run offline task evaluation benchmarks and accuracy metrics |
|
|
410
|
+
| | `myai leaderboard` | Show experiment leaderboard ranked by goal-weighted composite score |
|
|
411
|
+
| **Alignment** | `myai reward synth` | Generate task-specific verifiers from reference datasets |
|
|
412
|
+
| | `myai ship` | Run regression gate and test suites for release verdict |
|
|
413
|
+
| | `myai merge` | Merge adapter weights into base model checkpoint |
|
|
414
|
+
| **Tracking** | `myai runs list` / `info <id>` | List historical training runs and metric summaries |
|
|
415
|
+
| | `myai runs best` | View experiment leaderboard and current release candidate |
|
|
416
|
+
| | `myai optimize` | Automated retrain and compare hyperparameter optimization loop |
|
|
417
|
+
| **Knowledge** | `myai index build <path>` | Index local documents into semantic embeddings for RAG retrieval |
|
|
418
|
+
| | `myai index list` / `info` | Inspect active knowledge index chunks and embedding dimensions |
|
|
419
|
+
| **Export** | `myai export [--format]` | Package as standalone Web App ZIP, **GGUF (Ollama)**, or Merged weights |
|
|
420
|
+
| **Serving** | `myai serve` / `myai ask` | Serve local model with Knowledge Gate RAG protection |
|
|
421
|
+
| **System** | `myai update [--check]` | Check for latest releases on PyPI and upgrade MYAI |
|
|
422
|
+
| | `myai uninstall [--purge-data]` | Uninstall MYAI package and optionally purge `~/.myai` data |
|
|
423
|
+
|
|
424
|
+
---
|
|
425
|
+
|
|
426
|
+
## 📜 License
|
|
427
|
+
|
|
428
|
+
Distributed under the **Apache 2.0** License. See [LICENSE](https://github.com/kiransai-62/myai/blob/main/LICENSE) for details.
|