OktoSeek commited on
Commit
f203641
·
verified ·
1 Parent(s): 2d733c4

Upload 26 files

Browse files

First release about the engine's CLI for training AI.

.gitattributes CHANGED
@@ -1,35 +1,8 @@
1
- *.7z filter=lfs diff=lfs merge=lfs -text
2
- *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.bin filter=lfs diff=lfs merge=lfs -text
4
- *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
- *.ftz filter=lfs diff=lfs merge=lfs -text
7
- *.gz filter=lfs diff=lfs merge=lfs -text
8
- *.h5 filter=lfs diff=lfs merge=lfs -text
9
- *.joblib filter=lfs diff=lfs merge=lfs -text
10
- *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
- *.model filter=lfs diff=lfs merge=lfs -text
13
- *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
- *.onnx filter=lfs diff=lfs merge=lfs -text
17
- *.ot filter=lfs diff=lfs merge=lfs -text
18
- *.parquet filter=lfs diff=lfs merge=lfs -text
19
- *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
- *.pt filter=lfs diff=lfs merge=lfs -text
23
- *.pth filter=lfs diff=lfs merge=lfs -text
24
- *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
- saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
- *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
- *.tflite filter=lfs diff=lfs merge=lfs -text
30
- *.tgz filter=lfs diff=lfs merge=lfs -text
31
- *.wasm filter=lfs diff=lfs merge=lfs -text
32
- *.xz filter=lfs diff=lfs merge=lfs -text
33
- *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
- *tfevents* filter=lfs diff=lfs merge=lfs -text
 
1
+ # OktoScript Language Detection
2
+ # This file tells GitHub to recognize .okt files as OktoScript language
3
+
4
+ *.okt linguist-language=OktoScript
5
+
6
+ assets/okto_logo.png filter=lfs diff=lfs merge=lfs -text
7
+ assets/okto_logo2.png filter=lfs diff=lfs merge=lfs -text
8
+ assets/terminal-debug.png filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
.gitignore ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OktoEngine GitHub Repository
2
+
3
+ # OS files
4
+ .DS_Store
5
+ Thumbs.db
6
+ desktop.ini
7
+
8
+ # Editor files
9
+ .vscode/
10
+ .idea/
11
+ *.swp
12
+ *.swo
13
+ *~
14
+
15
+ # Temporary files
16
+ *.tmp
17
+ *.log
18
+ *.cache
19
+
20
+ # Build artifacts (if any)
21
+ target/
22
+ build/
23
+ dist/
24
+
25
+ # Example project outputs
26
+ examples/*/runs/
27
+ examples/*/export/
28
+ examples/*/checkpoints/
29
+
30
+ # Documentation build
31
+ docs/_build/
32
+ site/
33
+
34
+ # Environment files
35
+ .env
36
+ .env.local
37
+
38
+ # Test files
39
+ test_output/
40
+ *.test
41
+
CHANGELOG.md ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Changelog
2
+
3
+ All notable changes to OktoEngine will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [0.1.0] - 2025-01-XX
11
+
12
+ ### Added
13
+
14
+ #### Core Features
15
+ - **Initial release** of OktoEngine CLI
16
+ - Complete OktoScript parser with full grammar support
17
+ - Training pipeline execution
18
+ - Model evaluation and export
19
+ - System diagnostics and environment checking
20
+
21
+ #### CLI Commands
22
+ - `okto init` - Initialize new OktoScript projects
23
+ - `okto validate` - Validate OktoScript files
24
+ - `okto train` - Train models from OktoScript
25
+ - `okto eval` - Evaluate trained models
26
+ - `okto export` - Export models to multiple formats
27
+ - `okto list` - List projects, models, and datasets
28
+ - `okto doctor` - System diagnostics
29
+ - `okto doctor --install` - Automatic dependency installation
30
+ - `okto upgrade` - Automatic engine updates
31
+ - `okto about` - Show engine information
32
+
33
+ #### Features
34
+ - **Debug mode** - Comprehensive debug logging via `--debug` flag
35
+ - **Automatic dependency management** - Installs missing dependencies
36
+ - **HuggingFace integration** - Automatic model downloading
37
+ - **Multi-format export** - Support for OKM, ONNX, GGUF, SafeTensors
38
+ - **Real-time metrics** - Training progress and metrics in terminal
39
+ - **Error handling** - Detailed error messages with troubleshooting tips
40
+ - **Cross-platform support** - Windows, Linux, macOS
41
+
42
+ #### Training Capabilities
43
+ - Full fine-tuning support
44
+ - LoRA fine-tuning support
45
+ - Automatic checkpoint management
46
+ - Mixed precision training (FP16/BF16)
47
+ - Automatic device selection (CPU/GPU)
48
+ - Gradient accumulation
49
+ - Memory optimization
50
+
51
+ #### System Features
52
+ - GPU detection and utilization
53
+ - CUDA support detection
54
+ - RAM and CPU monitoring
55
+ - Runtime environment checking
56
+ - Dependency verification
57
+ - Automatic updates via GitHub Releases
58
+
59
+ #### Documentation
60
+ - Complete CLI reference
61
+ - Getting started guide
62
+ - Debug mode guide
63
+ - FAQ with common questions
64
+ - Example projects and configurations
65
+
66
+ ### Technical Details
67
+
68
+ - Built with Rust for performance and reliability
69
+ - Professional CLI interface with intuitive commands
70
+ - Robust error handling and validation
71
+ - Comprehensive logging system
72
+ - Cross-platform binary releases
73
+
74
+ ---
75
+
76
+ ## [Unreleased]
77
+
78
+ ### Planned Features
79
+ - Integration with OktoSeek IDE
80
+ - Visual training dashboard
81
+ - Advanced monitoring and telemetry
82
+ - Multi-GPU training support
83
+ - Distributed training support
84
+ - Model serving capabilities
85
+ - API server mode
86
+ - Web dashboard interface
87
+
88
+ ---
89
+
90
+ ## Version History
91
+
92
+ - **0.1.0** (2025-01-XX) - Initial release
93
+
94
+ ---
95
+
96
+ **For detailed information about each version, see the [GitHub Releases](https://github.com/oktoseek/oktoengine/releases) page.**
97
+
98
+ ---
99
+
100
+ Copyright © 2025 OktoSeek AI. All rights reserved.
101
+
CONTRIBUTING.md ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Contributing to OktoEngine
2
+
3
+ Thank you for your interest in OktoEngine! 🐙
4
+
5
+ **OktoEngine** is a proprietary CLI engine developed by **OktoSeek AI**. While the source code is not open source, we welcome feedback, bug reports, and feature requests from the community.
6
+
7
+ ---
8
+
9
+ ## How to Contribute
10
+
11
+ ### Reporting Bugs
12
+
13
+ If you find a bug, please open an issue on GitHub with:
14
+
15
+ - **Clear description** of the problem
16
+ - **Steps to reproduce** the issue
17
+ - **Expected vs actual behavior**
18
+ - **OktoEngine version:** `okto --version`
19
+ - **System information:** `okto doctor` output
20
+ - **Debug output** (if applicable): `okto <command> --debug`
21
+
22
+ **Example:**
23
+ ```
24
+ Bug: Training fails with "Model not found" error
25
+
26
+ Steps to reproduce:
27
+ 1. Run `okto init test-project`
28
+ 2. Edit scripts/train.okt with MODEL { base: "invalid-model" }
29
+ 3. Run `okto train`
30
+
31
+ Expected: Clear error message about invalid model
32
+ Actual: Generic "Model not found" error
33
+
34
+ Version: okto 0.1.0
35
+ System: Windows 10, GPU: RTX 4070
36
+ ```
37
+
38
+ ### Feature Requests
39
+
40
+ Have an idea for a new feature? Open an issue with:
41
+
42
+ - **Feature description** - What you'd like to see
43
+ - **Use case** - Why this feature would be useful
44
+ - **Proposed implementation** (optional) - How you think it could work
45
+
46
+ ### Documentation Improvements
47
+
48
+ Found an error in the documentation? Want to add examples or clarify something?
49
+
50
+ - Open an issue describing the improvement
51
+ - Or submit a pull request with documentation changes (if applicable)
52
+
53
+ ### Examples
54
+
55
+ Have a great example project? Share it!
56
+
57
+ - Create an issue with your example
58
+ - Include your `train.okt` file
59
+ - Describe what your example demonstrates
60
+
61
+ ---
62
+
63
+ ## Code Contributions
64
+
65
+ **Note:** OktoEngine source code is proprietary. However, we may accept contributions for:
66
+
67
+ - Documentation improvements
68
+ - Example projects
69
+ - Test cases
70
+ - Bug fixes (in specific cases)
71
+
72
+ If you're interested in contributing code, please contact us first at **service@oktoseek.com**.
73
+
74
+ ---
75
+
76
+ ## Reporting Security Issues
77
+
78
+ **Please do not report security vulnerabilities publicly.**
79
+
80
+ If you discover a security issue, please email **security@oktoseek.com** with:
81
+ - Description of the vulnerability
82
+ - Steps to reproduce
83
+ - Potential impact
84
+ - Suggested fix (if any)
85
+
86
+ We will respond promptly and work with you to resolve the issue.
87
+
88
+ ---
89
+
90
+ ## Code of Conduct
91
+
92
+ ### Our Standards
93
+
94
+ - Be respectful and inclusive
95
+ - Welcome newcomers and help them learn
96
+ - Focus on constructive feedback
97
+ - Respect different viewpoints and experiences
98
+
99
+ ### Unacceptable Behavior
100
+
101
+ - Harassment or discrimination
102
+ - Trolling or inflammatory comments
103
+ - Personal attacks
104
+ - Publishing others' private information
105
+
106
+ ---
107
+
108
+ ## Questions?
109
+
110
+ - **GitHub Issues:** https://github.com/oktoseek/oktoengine/issues
111
+ - **Email:** service@oktoseek.com
112
+ - **Website:** https://www.oktoseek.com
113
+
114
+ ---
115
+
116
+ **OktoEngine** is developed and maintained by **OktoSeek AI**.
117
+
118
+ Thank you for helping make OktoEngine better! 🚀
119
+
LICENSE CHANGED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ END USER LICENSE AGREEMENT (EULA)
2
+
3
+ FOR OKTOENGINE SOFTWARE
4
+
5
+ IMPORTANT - READ CAREFULLY: This End User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and OktoSeek AI ("Licensor") for the OktoEngine software product, which includes computer software and may include associated media, printed materials, and "online" or electronic documentation ("Software").
6
+
7
+ BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA. IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, DO NOT INSTALL OR USE THE SOFTWARE.
8
+
9
+ 1. GRANT OF LICENSE
10
+
11
+ Subject to the terms and conditions of this EULA, Licensor grants you a limited, non-exclusive, non-transferable license to:
12
+ a. Install and use the Software on computers under your control;
13
+ b. Use the Software solely for your internal business or personal purposes;
14
+ c. Make a reasonable number of backup copies of the Software for archival purposes.
15
+
16
+ 2. RESTRICTIONS
17
+
18
+ You may NOT:
19
+ a. Copy, modify, adapt, alter, translate, or create derivative works of the Software;
20
+ b. Reverse engineer, decompile, disassemble, or otherwise attempt to derive the source code of the Software;
21
+ c. Remove, alter, or obscure any proprietary notices, labels, or marks on the Software;
22
+ d. Rent, lease, lend, sell, sublicense, assign, distribute, publish, transfer, or otherwise make available the Software or any portion thereof to any third party;
23
+ e. Use the Software in any manner that could damage, disable, overburden, or impair any Licensor server or network;
24
+ f. Use the Software for any illegal purpose or in violation of any laws;
25
+ g. Share your license or access credentials with others;
26
+ h. Use the Software to compete with Licensor or its products.
27
+
28
+ 3. INTELLECTUAL PROPERTY RIGHTS
29
+
30
+ The Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The Software is licensed, not sold. All title and copyrights in and to the Software (including but not limited to any images, photographs, animations, video, audio, music, text, and "applets" incorporated into the Software), the accompanying printed materials, and any copies of the Software are owned by Licensor or its suppliers. The Software is protected by copyright laws and international treaty provisions. Therefore, you must treat the Software like any other copyrighted material.
31
+
32
+ 4. TERMINATION
33
+
34
+ This EULA is effective until terminated. Your rights under this EULA will terminate automatically without notice from Licensor if you fail to comply with any term(s) of this EULA. Upon termination of the license, you shall cease all use of the Software and destroy all copies, full or partial, of the Software.
35
+
36
+ 5. NO WARRANTY
37
+
38
+ THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL LICENSOR OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
39
+
40
+ 6. LIMITATION OF LIABILITY
41
+
42
+ IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR ANY OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
43
+
44
+ 7. EXPORT RESTRICTIONS
45
+
46
+ You acknowledge that the Software may be subject to export restrictions. You agree to comply with all applicable international and national laws that apply to the Software, including the Export Administration Regulations, as well as end-user, end-use, and destination restrictions issued by governmental agencies.
47
+
48
+ 8. U.S. GOVERNMENT RESTRICTED RIGHTS
49
+
50
+ The Software is provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as applicable.
51
+
52
+ 9. GOVERNING LAW
53
+
54
+ This EULA shall be governed by and construed in accordance with the laws of the jurisdiction in which Licensor is located, without regard to its conflict of law provisions.
55
+
56
+ 10. ENTIRE AGREEMENT
57
+
58
+ This EULA constitutes the entire agreement between you and Licensor relating to the Software and supersedes all prior or contemporaneous oral or written communications, proposals, and representations with respect to the Software or any other subject matter covered by this EULA.
59
+
60
+ 11. MODIFICATIONS
61
+
62
+ Licensor reserves the right to modify this EULA at any time. Your continued use of the Software after any such modifications shall constitute your acceptance of the modified EULA.
63
+
64
+ 12. CONTACT INFORMATION
65
+
66
+ If you have any questions about this EULA, please contact:
67
+ OktoSeek AI
68
+ Email: service@oktoseek.com
69
+ Website: https://www.oktoseek.com
70
+
71
+ ---
72
+
73
+ Copyright © 2025 OktoSeek AI. All rights reserved.
74
+
75
+ OktoEngine is a trademark of OktoSeek AI.
76
+
README.md CHANGED
@@ -1,5 +1,670 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
- license: other
3
- license_name: proprietary
4
- license_link: LICENSE
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <p align="center">
2
+ <img src="./assets/okto_logo.png" alt="OktoEngine Banner" width="50%" />
3
+ </p>
4
+
5
+ <h1 align="center">OktoEngine</h1>
6
+
7
+ <p align="center">
8
+ <strong>Professional CLI Engine for Training AI Models with OktoScript</strong>
9
+ </p>
10
+
11
+ <p align="center">
12
+ Built by <strong>OktoSeek AI</strong> for the <strong>OktoSeek ecosystem</strong>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://www.oktoseek.com/">OktoSeek Homepage</a> •
17
+ <a href="https://github.com/oktoseek/oktoscript">OktoScript Language</a> •
18
+ <a href="https://x.com/oktoseek">Twitter</a> •
19
+ <a href="https://www.youtube.com/@Oktoseek">YouTube</a>
20
+ </p>
21
+
22
  ---
23
+
24
+ ## Table of Contents
25
+
26
+ 1. [What is OktoEngine?](#-what-is-oktoengine)
27
+ 2. [Quick Start](#-quick-start)
28
+ 3. [Key Features](#-key-features)
29
+ 4. [Installation](#-installation)
30
+ 5. [CLI Commands](#️-cli-commands)
31
+ 6. [Training Capabilities](#-training-capabilities)
32
+ 7. [Debug Mode](#-debug-mode)
33
+ 8. [Examples](#-examples)
34
+ 9. [System Requirements](#-system-requirements)
35
+ 10. [Documentation](#-documentation)
36
+ 11. [FAQ](#-frequently-asked-questions-faq)
37
+ 12. [License](#-license)
38
+ 13. [Contact](#-contact)
39
+
40
  ---
41
+
42
+ ## 🚀 Quick Start
43
+
44
+ **Get started with OktoEngine in 3 steps:**
45
+
46
+ 1. **Download the latest release** from [GitHub Releases](https://github.com/oktoseek/oktoengine/releases)
47
+ 2. **Initialize a project:** `okto init my-project`
48
+ 3. **Train your model:** `okto train`
49
+
50
+ ```bash
51
+ # Initialize a new project
52
+ okto init my-ai-model
53
+
54
+ # Navigate to project
55
+ cd my-ai-model
56
+
57
+ # Validate your OktoScript configuration
58
+ okto validate
59
+
60
+ # Train your model
61
+ okto train
62
+ ```
63
+
64
+ 📚 **Full documentation:** [`docs/GETTING_STARTED.md`](./docs/GETTING_STARTED.md)
65
+ 🔍 **CLI Reference:** [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
66
+
67
+ ---
68
+
69
+ ## 🚀 What is OktoEngine?
70
+
71
+ **OktoEngine** is the official execution engine for **OktoScript**—a powerful CLI tool that transforms declarative AI configurations into trained, production-ready models.
72
+
73
+ ### Built for Scale
74
+
75
+ OktoEngine is engineered to handle:
76
+ - ✅ **Models of any size** - From millions to billions of parameters
77
+ - ✅ **Complex training pipelines** - Full fine-tuning, LoRA adapters, and more
78
+ - ✅ **Production workloads** - Optimized for real-world AI development
79
+ - ✅ **Enterprise-grade reliability** - Robust error handling and validation
80
+
81
+ ### Why OktoEngine?
82
+
83
+ **Traditional Approach:**
84
+ ```python
85
+ # Hundreds of lines of Python code
86
+ # Complex configuration management
87
+ # Error-prone manual setup
88
+ # Difficult to reproduce
89
+ ```
90
+
91
+ **With OktoEngine:**
92
+ ```okt
93
+ PROJECT "MyModel"
94
+ MODEL { base: "gpt2" }
95
+ DATASET { train: "dataset/train.jsonl" }
96
+ TRAIN { epochs: 5, batch_size: 32 }
97
+ EXPORT { format: ["okm"] }
98
+ ```
99
+
100
+ **One command:** `okto train` → **Trained model ready for deployment**
101
+
102
+ ---
103
+
104
+ ## ✨ Key Features
105
+
106
+ ### 🎯 **Complete CLI Interface**
107
+
108
+ Professional command-line interface with intuitive commands:
109
+
110
+ **Core Commands:**
111
+ ```bash
112
+ okto init # Initialize new projects
113
+ okto validate # Validate OktoScript files
114
+ okto train # Train models
115
+ okto eval # Evaluate models
116
+ okto export # Export to multiple formats
117
+ okto convert # Convert between formats (PyTorch, ONNX, GGUF, TFLite, OktoModel)
118
+ ```
119
+
120
+ **Inference Commands:**
121
+ ```bash
122
+ okto infer # Direct inference (single input/output)
123
+ okto chat # Interactive chat mode with session context
124
+ ```
125
+
126
+ **Analysis Commands:**
127
+ ```bash
128
+ okto compare # Compare two models (latency, accuracy, loss)
129
+ okto logs # View historical training logs and CONTROL decisions
130
+ okto tune # Auto-tune training using CONTROL block logic
131
+ ```
132
+
133
+ **Utility Commands:**
134
+ ```bash
135
+ okto list # List projects, models, datasets, or exports
136
+ okto doctor # System diagnostics and dependency checking
137
+ okto upgrade # Auto-update engine to latest version
138
+ okto about # Engine and language information
139
+ okto exit # Exit interactive mode
140
+ ```
141
+
142
+ **What you can do:**
143
+ - 🚀 **Train** models with full fine-tuning or LoRA adapters
144
+ - 🔄 **Convert** models between formats for different deployment targets
145
+ - 💬 **Chat** interactively with trained models
146
+ - 📊 **Compare** model versions to find the best one
147
+ - 📈 **Monitor** training with real-time logs and metrics
148
+ - 🎛️ **Auto-tune** training parameters intelligently
149
+ - 🔍 **Validate** configurations before training
150
+ - 📦 **Export** to production-ready formats
151
+
152
+ ### 🔧 **Advanced Training Capabilities**
153
+
154
+ **Training Methods:**
155
+ - **Full Fine-tuning** - Train entire models from scratch with complete parameter updates
156
+ - **LoRA Fine-tuning** - Efficient adapter-based training (LoRA, QLoRA, PEFT) with minimal memory footprint
157
+ - **Multi-dataset Training** - Combine multiple datasets with weighted sampling and custom mixing strategies
158
+ - **Model Adapters** - Apply pre-trained adapters (LoRA/PEFT) to base models for rapid customization
159
+
160
+ **Intelligent Training Control:**
161
+ - **Automatic Checkpointing** - Never lose progress with smart checkpoint management
162
+ - **Real-time Metrics** - Monitor training in the terminal with live updates
163
+ - **CONTROL Block** - Define conditional logic (IF, WHEN, EVERY) for autonomous decision-making
164
+ - **Auto-parameter Adjustment** - Automatically adjust learning rate, batch size, and other parameters based on metrics
165
+ - **Early Stopping** - Intelligent stopping when model performance plateaus or diverges
166
+ - **Memory-aware Training** - Automatically reduce batch size when GPU memory is low
167
+
168
+ **Monitoring & Governance:**
169
+ - **MONITOR Block** - Track any metric (loss, accuracy, GPU usage, throughput, latency, confidence, etc.)
170
+ - **GUARD Block** - Safety and ethics protection (hallucination, toxicity, bias detection)
171
+ - **BEHAVIOR Block** - Control model personality, verbosity, language, and response style
172
+ - **STABILITY Block** - Training safety controls (NaN detection, divergence prevention)
173
+ - **EXPLORER Block** - AutoML-style hyperparameter search and optimization
174
+
175
+ **What makes it unique:**
176
+ - 🧠 **Decision-driven** - Models can make autonomous decisions during training
177
+ - 🔄 **Self-adapting** - Automatically adjusts parameters based on real-time metrics
178
+ - 🛡️ **Safe by design** - Built-in safety guards and content filtering
179
+ - 📊 **Fully observable** - Complete visibility into training process and decisions
180
+ - ⚡ **Production-ready** - Export to multiple formats for deployment
181
+
182
+ ### 📊 **Detailed Metrics & Monitoring**
183
+
184
+ Real-time training metrics displayed directly in your terminal:
185
+
186
+ ```
187
+ 🚀 Starting training pipeline...
188
+
189
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
190
+ Loss: 2.345 → 1.892
191
+ Learning Rate: 5e-5
192
+ GPU Memory: 8.2GB / 12GB
193
+
194
+ Epoch 2/5: 100%|████████████| 500/500 [02:14<00:00, 3.72it/s]
195
+ Loss: 1.892 → 1.654
196
+ ...
197
+ ```
198
+
199
+ ### 🐛 **Debug Mode**
200
+
201
+ Comprehensive debug mode for troubleshooting:
202
+
203
+ ```bash
204
+ okto train --debug
205
+ okto validate --debug
206
+ ```
207
+
208
+ Shows detailed parsing logs, execution flow, and error diagnostics.
209
+
210
+ ### 🔄 **Automatic Updates**
211
+
212
+ Built-in upgrade system:
213
+
214
+ ```bash
215
+ okto upgrade
216
+ ```
217
+
218
+ Automatically downloads and installs the latest version from GitHub Releases.
219
+
220
+ ### 🏥 **System Diagnostics**
221
+
222
+ Comprehensive environment checking:
223
+
224
+ ```bash
225
+ okto doctor
226
+ ```
227
+
228
+ Checks GPU, CUDA, RAM, dependencies, and provides recommendations.
229
+
230
+ ### 📦 **Dependency Management**
231
+
232
+ Automatic dependency installation:
233
+
234
+ ```bash
235
+ okto doctor --install
236
+ ```
237
+
238
+ Installs missing dependencies automatically.
239
+
240
+ ---
241
+
242
+ ## 📥 Installation
243
+
244
+ ### Download Pre-built Binaries
245
+
246
+ Download the latest release for your platform:
247
+
248
+ - **Windows:** `okto-windows.exe`
249
+ - **Linux:** `okto-linux`
250
+ - **macOS:** `okto-macos`
251
+
252
+ Available at: [GitHub Releases](https://github.com/oktoseek/oktoengine/releases)
253
+
254
+ ### Upgrade Existing Installation
255
+
256
+ ```bash
257
+ okto upgrade
258
+ ```
259
+
260
+ Automatically updates to the latest version.
261
+
262
+ ---
263
+
264
+ ## 🖥️ CLI Commands
265
+
266
+ ### Core Commands
267
+
268
+ **Initialize Project:**
269
+ ```bash
270
+ okto init my-project
271
+ ```
272
+ Creates a new OktoScript project with proper folder structure.
273
+
274
+ **Validate Configuration:**
275
+ ```bash
276
+ okto validate
277
+ okto validate --file scripts/train.okt
278
+ ```
279
+ Validates OktoScript syntax and configuration.
280
+
281
+ **Train Model:**
282
+ ```bash
283
+ okto train
284
+ okto train --file scripts/train.okt
285
+ okto train --debug # Enable debug mode
286
+ ```
287
+ Executes the complete training pipeline.
288
+
289
+ **Evaluate Model:**
290
+ ```bash
291
+ okto eval --file scripts/train.okt
292
+ ```
293
+ Evaluates a trained model against test datasets.
294
+
295
+ **Export Model:**
296
+ ```bash
297
+ okto export --format okm --file scripts/train.okt
298
+ okto export --format onnx
299
+ ```
300
+ Exports trained models to various formats.
301
+
302
+ **Convert Model Formats:**
303
+ ```bash
304
+ okto convert --input model.pt --from pt --to gguf --output model.gguf
305
+ okto convert --input model.pt --from pt --to onnx --output model.onnx
306
+ ```
307
+ Converts models between different formats (PyTorch, ONNX, GGUF, TFLite, OktoModel).
308
+
309
+ **Direct Inference:**
310
+ ```bash
311
+ okto infer --model models/chatbot.okm --text "Hello, how can I help?"
312
+ ```
313
+ Runs single inference on a trained model. Automatically respects BEHAVIOR, GUARD, INFERENCE, and CONTROL blocks.
314
+
315
+ **Interactive Chat:**
316
+ ```bash
317
+ okto chat --model models/chatbot.okm
318
+ ```
319
+ Starts an interactive chat session. Uses BEHAVIOR settings, enforces GUARD rules, and supports session context.
320
+
321
+ **Compare Models:**
322
+ ```bash
323
+ okto compare models/v1.okm models/v2.okm
324
+ ```
325
+ Compares two models on latency, accuracy, loss, and resource usage.
326
+
327
+ **View Logs:**
328
+ ```bash
329
+ okto logs my-model
330
+ ```
331
+ Views historical training logs, metrics, and CONTROL decisions.
332
+
333
+ **Auto-tune Training:**
334
+ ```bash
335
+ okto tune
336
+ ```
337
+ Uses CONTROL block to auto-adjust training parameters (learning rate, batch size, early stopping).
338
+
339
+ ### Utility Commands
340
+
341
+ **System Diagnostics:**
342
+ ```bash
343
+ okto doctor # Check system
344
+ okto doctor --install # Auto-install dependencies
345
+ ```
346
+
347
+ **Upgrade Engine:**
348
+ ```bash
349
+ okto upgrade
350
+ ```
351
+
352
+ **List Resources:**
353
+ ```bash
354
+ okto list projects
355
+ okto list models
356
+ okto list datasets
357
+ okto list exports
358
+ ```
359
+
360
+ **Other Commands:**
361
+ ```bash
362
+ okto about # Show information
363
+ okto --version # Show version
364
+ okto exit # Exit interactive mode
365
+ ```
366
+
367
+ 📚 **Complete CLI Reference:** [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
368
+ Automatically updates to the latest version.
369
+
370
+ **About:**
371
+ ```bash
372
+ okto about
373
+ ```
374
+ Shows information about OktoEngine and OktoScript.
375
+
376
+ **List Resources:**
377
+ ```bash
378
+ okto list projects
379
+ okto list models
380
+ okto list datasets
381
+ ```
382
+
383
+ ### Global Flags
384
+
385
+ ```bash
386
+ --debug # Enable debug mode (detailed logs)
387
+ --help # Show help
388
+ --version # Show version
389
+ ```
390
+
391
+ 📖 **Complete CLI Reference:** [`docs/CLI_REFERENCE.md`](./docs/CLI_REFERENCE.md)
392
+
393
+ ---
394
+
395
+ ## 🎓 Training Capabilities
396
+
397
+ ### Supported Model Sizes
398
+
399
+ OktoEngine can train models of any size:
400
+
401
+ - **Small Models** (1M - 100M parameters) - Fast training, minimal resources
402
+ - **Medium Models** (100M - 1B parameters) - Balanced performance
403
+ - **Large Models** (1B - 7B parameters) - Requires GPU, optimized training
404
+ - **Very Large Models** (7B+ parameters) - Enterprise-grade, multi-GPU support
405
+
406
+ ### Training Methods
407
+
408
+ **Full Fine-tuning:**
409
+ ```okt
410
+ TRAIN {
411
+ epochs: 5
412
+ batch_size: 32
413
+ device: "auto"
414
+ }
415
+ ```
416
+
417
+ **LoRA Fine-tuning:**
418
+ ```okt
419
+ FT_LORA {
420
+ lora_rank: 8
421
+ lora_alpha: 32
422
+ epochs: 3
423
+ }
424
+ ```
425
+
426
+ ### Automatic Optimizations
427
+
428
+ - **Mixed Precision Training** - FP16/BF16 support
429
+ - **Gradient Accumulation** - Train large models on smaller GPUs
430
+ - **Automatic Device Selection** - CPU/GPU/CUDA detection
431
+ - **Memory Optimization** - Efficient memory management
432
+ - **Checkpoint Management** - Automatic saving and resuming
433
+
434
+ ---
435
+
436
+ ## 🐛 Debug Mode
437
+
438
+ Debug mode provides detailed insights into the engine's operation:
439
+
440
+ ### Enable Debug Mode
441
+
442
+ ```bash
443
+ # Via command flag
444
+ okto train --debug
445
+ okto validate --debug
446
+
447
+ # Via environment variable
448
+ OKTO_DEBUG=1 okto train
449
+ ```
450
+
451
+ ### What Debug Mode Shows
452
+
453
+ **Parsing Details:**
454
+ ```
455
+ DEBUG: Starting parse_oktoscript. Input preview: '# okto_version: "1.0" PROJECT...'
456
+ DEBUG: Parsed version: Some("1.0")
457
+ DEBUG: Parsed project: my-model
458
+ DEBUG: After PROJECT, remaining input: 'ENV { accelerator: "gpu"...'
459
+ ```
460
+
461
+ **Execution Flow:**
462
+ ```
463
+ DEBUG: Attempting to parse ENV block...
464
+ DEBUG: Parsed ENV field: accelerator = gpu
465
+ DEBUG: Parsed ENV field: precision = fp16
466
+ DEBUG: Successfully parsed ENV block with 5 fields
467
+ ```
468
+
469
+ **Error Diagnostics:**
470
+ ```
471
+ DEBUG: Failed to parse key in ENV block. Input: 'accelerator: "gpu"...'
472
+ DEBUG: Failed to parse ':' after key 'accelerator'. Input: '"gpu"...'
473
+ ```
474
+
475
+ ### Use Cases
476
+
477
+ - **Troubleshooting parsing errors** - See exactly where parsing fails
478
+ - **Understanding execution flow** - Track how your configuration is processed
479
+ - **Performance analysis** - Identify bottlenecks
480
+ - **Configuration debugging** - Verify your OktoScript is parsed correctly
481
+
482
+ 📖 **Debug Guide:** [`docs/DEBUG_GUIDE.md`](./docs/DEBUG_GUIDE.md)
483
+
484
+ ---
485
+
486
+ ## 📚 Examples
487
+
488
+ ### Basic Training Example
489
+
490
+ **scripts/train.okt:**
491
+ ```okt
492
+ PROJECT "ChatBot"
493
+ ENV {
494
+ accelerator: "gpu"
495
+ precision: "fp16"
496
+ install_missing: true
497
+ }
498
+ DATASET {
499
+ train: "dataset/train.jsonl"
500
+ validation: "dataset/val.jsonl"
501
+ }
502
+ MODEL {
503
+ base: "gpt2"
504
+ }
505
+ TRAIN {
506
+ epochs: 5
507
+ batch_size: 32
508
+ device: "auto"
509
+ }
510
+ EXPORT {
511
+ format: ["okm"]
512
+ path: "export/"
513
+ }
514
+ ```
515
+
516
+ **Terminal Output:**
517
+ ```bash
518
+ $ okto train
519
+
520
+ 🐙 OktoEngine v0.1
521
+ 📄 Reading: "scripts/train.okt"
522
+
523
+ 📊 Environment Check:
524
+ ✔ Runtime: Python 3.14.0
525
+ ✔ GPU: NVIDIA GeForce RTX 4070
526
+ ✔ RAM: 63GB (40GB available)
527
+ ✔ Platform: windows
528
+
529
+ 📦 Checking dependencies...
530
+ ✔ All dependencies available
531
+
532
+ 🚀 Starting training pipeline...
533
+
534
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
535
+ Loss: 2.345 → 1.892
536
+ Learning Rate: 5e-5
537
+
538
+ ✅ Training completed successfully!
539
+ 📁 Output: runs/ChatBot/
540
+ ```
541
+
542
+ ### Advanced Example with LoRA
543
+
544
+ See [`examples/lora-training.okt`](./examples/lora-training.okt) for a complete LoRA fine-tuning example.
545
+
546
+ ### Complete Project Examples
547
+
548
+ - [`examples/basic-training/`](./examples/basic-training/) - Minimal working example
549
+ - [`examples/chatbot/`](./examples/chatbot/) - Conversational AI training
550
+ - [`examples/vision-model/`](./examples/vision-model/) - Computer vision pipeline
551
+
552
+ 📖 **More Examples:** [`examples/README.md`](./examples/README.md)
553
+
554
+ ---
555
+
556
+ ## 💻 System Requirements
557
+
558
+ ### Minimum Requirements
559
+
560
+ - **OS:** Windows 10+, Linux (Ubuntu 20.04+), macOS 11+
561
+ - **RAM:** 8GB (16GB recommended)
562
+ - **Storage:** 10GB free space
563
+ - **Runtime:** Compatible runtime environment
564
+
565
+ ### Recommended for Training
566
+
567
+ - **GPU:** NVIDIA GPU with CUDA support (8GB+ VRAM)
568
+ - **RAM:** 32GB+ for large models
569
+ - **Storage:** SSD with 50GB+ free space
570
+ - **CPU:** Multi-core processor (8+ cores)
571
+
572
+ ### Check Your System
573
+
574
+ ```bash
575
+ okto doctor
576
+ ```
577
+
578
+ Shows detailed system information and recommendations.
579
+
580
+ ---
581
+
582
+ ## 📚 Documentation
583
+
584
+ Complete documentation for OktoEngine:
585
+
586
+ - 📖 **[Getting Started Guide](./docs/GETTING_STARTED.md)** - Your first 5 minutes
587
+ - 🖥️ **[CLI Reference](./docs/CLI_REFERENCE.md)** - Complete command reference
588
+ - 🐛 **[Debug Guide](./docs/DEBUG_GUIDE.md)** - Debug mode usage
589
+ - 💡 **[Examples](./examples/)** - Working examples
590
+ - ❓ **[FAQ](./docs/FAQ.md)** - Frequently Asked Questions
591
+ - 📋 **[Changelog](./CHANGELOG.md)** - Version history
592
+
593
+ ### Advanced Topics
594
+
595
+ - **Training Optimization** - Best practices for efficient training
596
+ - **Error Handling** - Troubleshooting common issues
597
+ - **Performance Tuning** - Maximize training speed
598
+ - **Integration** - Using OktoEngine in your workflow
599
+
600
+ ---
601
+
602
+ ## ❓ Frequently Asked Questions (FAQ)
603
+
604
+ **Q: What models can I train with OktoEngine?**
605
+ A: OktoEngine supports any model compatible with modern AI frameworks. From small models (millions of parameters) to large language models (billions of parameters).
606
+
607
+ **Q: Do I need to know Python to use OktoEngine?**
608
+ A: No! OktoEngine provides a complete CLI interface. You only need to write OktoScript configuration files.
609
+
610
+ **Q: Can I train models without a GPU?**
611
+ A: Yes, OktoEngine automatically detects available hardware and uses CPU when GPU is not available. Training will be slower but fully functional.
612
+
613
+ **Q: How do I update OktoEngine?**
614
+ A: Simply run `okto upgrade` to automatically download and install the latest version.
615
+
616
+ **Q: What formats can I export to?**
617
+ A: OktoEngine supports multiple export formats: OKM (OktoSeek), ONNX, GGUF, SafeTensors, and more.
618
+
619
+ **Q: Can I resume training from a checkpoint?**
620
+ A: Yes, OktoEngine automatically saves checkpoints and can resume training from any checkpoint.
621
+
622
+ 📖 **[Complete FAQ →](./docs/FAQ.md)**
623
+
624
+ ---
625
+
626
+ ## 🔮 Future Integration
627
+
628
+ OktoEngine will be integrated into **OktoSeek IDE** for visual training workflows:
629
+
630
+ - 🎯 **Visual Pipeline Builder** - Drag-and-drop training configuration
631
+ - 📊 **Real-time Dashboard** - Live training metrics and visualization
632
+ - 🔄 **One-click Training** - Train models directly from the IDE
633
+ - 📁 **Project Management** - Organize and manage multiple training projects
634
+
635
+ ---
636
+
637
+ ## 🐙 Powered by OktoSeek AI
638
+
639
+ **OktoEngine** is developed and maintained by **OktoSeek AI**.
640
+
641
+ - **Official website:** https://www.oktoseek.com
642
+ - **OktoScript Language:** https://github.com/oktoseek/oktoscript
643
+ - **Twitter:** https://x.com/oktoseek
644
+ - **YouTube:** https://www.youtube.com/@Oktoseek
645
+ - **Repository:** https://github.com/oktoseek/oktoengine
646
+
647
+ ---
648
+
649
+ ## 📄 License
650
+
651
+ This software is proprietary and licensed under the End User License Agreement (EULA). See [LICENSE](./LICENSE) file for details.
652
+
653
+ **Important:** OktoEngine is not open source. Binary releases are available for download, but the source code is proprietary.
654
+
655
+ ---
656
+
657
+ ## 📧 Contact
658
+
659
+ For questions, support, or licensing inquiries:
660
+
661
+ - **Email:** service@oktoseek.com
662
+ - **GitHub Issues:** https://github.com/oktoseek/oktoengine/issues
663
+ - **Website:** https://www.oktoseek.com
664
+
665
+ ---
666
+
667
+ <p align="center">
668
+ Made with ❤️ by the <strong>OktoSeek AI</strong> team
669
+ </p>
670
+
assets/IMAGE_REQUIREMENTS.md ADDED
@@ -0,0 +1,319 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Requisitos de Imagens para OktoEngine GitHub
2
+
3
+ Lista completa de imagens necessárias para a documentação do OktoEngine.
4
+
5
+ ---
6
+
7
+ ## 📸 Imagens Obrigatórias
8
+
9
+ ### 1. Logo Principal
10
+ **Arquivo:** `okto_logo.png`
11
+ **Uso:** Logo principal do OktoEngine no README
12
+ **Tamanho recomendado:** 800x200px ou similar (proporção 4:1)
13
+ **Formato:** PNG com fundo transparente
14
+ **Onde é usado:** Topo do README.md
15
+
16
+ ---
17
+
18
+ ### 2. Logo Alternativo
19
+ **Arquivo:** `okto_logo2.png`
20
+ **Uso:** Logo alternativo (opcional, pode ser o mesmo do OktoScript)
21
+ **Tamanho recomendado:** 800x200px
22
+ **Formato:** PNG
23
+ **Onde é usado:** README.md (seguindo padrão OktoScript)
24
+
25
+ ---
26
+
27
+ ### 3. Screenshot - Comando `okto validate`
28
+ **Arquivo:** `terminal-validate.png`
29
+ **Descrição:** Screenshot do terminal mostrando `okto validate` sendo executado
30
+ **O que mostrar:**
31
+ - Comando `okto validate` sendo executado
32
+ - Saída de validação bem-sucedida
33
+ - Mensagens de sucesso e resumo
34
+
35
+ **Exemplo do que capturar:**
36
+ ```
37
+ PS D:\projects\my-project> okto validate
38
+
39
+ 🐙 OktoEngine v0.1
40
+ 🔍 Validating OktoScript file: "scripts/train.okt"
41
+ 📄 File: "scripts/train.okt"
42
+ 📄 Size: 382 bytes
43
+ 📄 Lines: 31
44
+
45
+ ✔ File parsed successfully
46
+
47
+ 📋 Validation Results:
48
+ ✅ Validation passed! No errors or warnings.
49
+
50
+ 📊 Summary:
51
+ Project: my-project
52
+ ENV: Configured
53
+ Dataset: dataset/train.jsonl
54
+ Model: gpt2
55
+ Training: 5 epochs, batch size 32
56
+ Export: ["okm"]
57
+ ```
58
+
59
+ ---
60
+
61
+ ### 4. Screenshot - Comando `okto train`
62
+ **Arquivo:** `terminal-train.png`
63
+ **Descrição:** Screenshot do terminal mostrando `okto train` em execução
64
+ **O que mostrar:**
65
+ - Comando `okto train` sendo executado
66
+ - Environment check
67
+ - Progresso do treinamento (barra de progresso)
68
+ - Métricas em tempo real
69
+ - Mensagem de sucesso
70
+
71
+ **Exemplo do que capturar:**
72
+ ```
73
+ PS D:\projects\my-project> okto train
74
+
75
+ 🐙 OktoEngine v0.1
76
+ 📄 Reading: "scripts/train.okt"
77
+
78
+ 📊 Environment Check:
79
+ ✔ Runtime: Python 3.14.0
80
+ ✔ GPU: NVIDIA GeForce RTX 4070
81
+ ✔ RAM: 63GB (40GB available)
82
+ ✔ Platform: windows
83
+
84
+ 📦 Checking dependencies...
85
+ ✔ All dependencies available
86
+
87
+ 🚀 Starting training pipeline...
88
+
89
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
90
+ Loss: 2.345 → 1.892
91
+ Learning Rate: 5e-5
92
+ GPU Memory: 8.2GB / 12GB
93
+
94
+ ✅ Training completed successfully!
95
+ 📁 Output: runs/my-project/
96
+ ```
97
+
98
+ ---
99
+
100
+ ### 5. Screenshot - Comando `okto doctor`
101
+ **Arquivo:** `terminal-doctor.png`
102
+ **Descrição:** Screenshot do terminal mostrando `okto doctor`
103
+ **O que mostrar:**
104
+ - Comando `okto doctor` sendo executado
105
+ - Diagnóstico completo do sistema
106
+ - Todas as verificações (GPU, CUDA, RAM, etc.)
107
+ - Status de dependências
108
+
109
+ **Exemplo do que capturar:**
110
+ ```
111
+ PS D:\projects> okto doctor
112
+
113
+ 🐙 OktoEngine v0.1 - System Diagnostics
114
+
115
+ 🖥️ Platform: Windows
116
+ 💾 RAM: 63GB total, 40GB available
117
+ ⚙️ CPU: 32 cores
118
+ 🎮 GPU: Checking...
119
+ ✔ GPU found: NVIDIA GeForce RTX 4070 Laptop GPU
120
+ 🔧 CUDA: Checking...
121
+ ✔ CUDA available: 576.02
122
+ 🔧 Runtime: Checking...
123
+ ✔ Runtime available: Python 3.14.0
124
+ 📦 Dependencies: Checking...
125
+ ✔ All required packages installed
126
+
127
+ ✅ Diagnostics complete
128
+ ```
129
+
130
+ ---
131
+
132
+ ### 6. Screenshot - Modo Debug
133
+ **Arquivo:** `terminal-debug.png`
134
+ **Descrição:** Screenshot do terminal mostrando `okto train --debug`
135
+ **O que mostrar:**
136
+ - Comando `okto train --debug` sendo executado
137
+ - Logs de debug detalhados
138
+ - Parsing logs
139
+ - Execution flow
140
+
141
+ **Exemplo do que capturar:**
142
+ ```
143
+ PS D:\projects\my-project> okto train --debug
144
+
145
+ 🐙 OktoEngine v0.1
146
+ 📄 Reading: "scripts/train.okt"
147
+
148
+ DEBUG: Starting parse_oktoscript. Input preview: '# okto_version: "1.0" PROJECT...'
149
+ DEBUG: Parsed version: Some("1.0")
150
+ DEBUG: Parsed project: my-project
151
+ DEBUG: After PROJECT, remaining input: 'ENV { accelerator: "gpu"...'
152
+ DEBUG: Attempting to parse ENV block...
153
+ DEBUG: Parsed ENV field: accelerator = gpu
154
+ DEBUG: Parsed ENV field: precision = fp16
155
+ DEBUG: Successfully parsed ENV block with 5 fields
156
+ ...
157
+ ```
158
+
159
+ ---
160
+
161
+ ### 7. Screenshot - Comando `okto upgrade`
162
+ **Arquivo:** `terminal-upgrade.png`
163
+ **Descrição:** Screenshot do terminal mostrando `okto upgrade`
164
+ **O que mostrar:**
165
+ - Comando `okto upgrade` sendo executado
166
+ - Verificação de atualizações
167
+ - Download em progresso (barra de progresso)
168
+ - Mensagem de sucesso
169
+
170
+ **Exemplo do que capturar:**
171
+ ```
172
+ PS D:\projects> okto upgrade
173
+
174
+ 🐙 OktoEngine Upgrader
175
+ Current version: 0.1.0
176
+ 🔍 Checking for updates...
177
+
178
+ 📦 Downloading OktoEngine v0.2.0...
179
+ ████████████████████ 100% [00:15<00:00]
180
+
181
+ ✅ Updated successfully to v0.2.0
182
+ ```
183
+
184
+ ---
185
+
186
+ ### 8. Screenshot - Comando `okto about`
187
+ **Arquivo:** `terminal-about.png`
188
+ **Descrição:** Screenshot do terminal mostrando `okto about`
189
+ **O que mostrar:**
190
+ - Comando `okto about` sendo executado
191
+ - Informações sobre OktoScript e OktoEngine
192
+ - Links e referências
193
+
194
+ ---
195
+
196
+ ### 9. Screenshot - Comando `okto init`
197
+ **Arquivo:** `terminal-init.png`
198
+ **Descrição:** Screenshot do terminal mostrando `okto init`
199
+ **O que mostrar:**
200
+ - Comando `okto init my-project` sendo executado
201
+ - Mensagem de sucesso
202
+ - Estrutura de pastas criada
203
+
204
+ ---
205
+
206
+ ### 10. Screenshot - Erro com Debug (Opcional)
207
+ **Arquivo:** `terminal-error-debug.png`
208
+ **Descrição:** Screenshot mostrando erro com debug mode ativado
209
+ **O que mostrar:**
210
+ - Erro ocorrendo
211
+ - Debug logs mostrando onde falhou
212
+ - Mensagens de erro detalhadas
213
+
214
+ ---
215
+
216
+ ## 📋 Checklist de Imagens
217
+
218
+ Use esta checklist ao capturar as imagens:
219
+
220
+ - [ ] `okto_logo.png` - Logo principal
221
+ - [ ] `okto_logo2.png` - Logo alternativo (opcional)
222
+ - [ ] `terminal-validate.png` - Validação
223
+ - [ ] `terminal-train.png` - Treinamento
224
+ - [ ] `terminal-doctor.png` - Diagnóstico
225
+ - [ ] `terminal-debug.png` - Modo debug
226
+ - [ ] `terminal-upgrade.png` - Atualização
227
+ - [ ] `terminal-about.png` - Informações
228
+ - [ ] `terminal-init.png` - Inicialização
229
+ - [ ] `terminal-error-debug.png` - Erro com debug (opcional)
230
+
231
+ ---
232
+
233
+ ## 🎨 Especificações Técnicas
234
+
235
+ ### Formato
236
+ - **Tipo:** PNG (preferido) ou JPEG
237
+ - **Qualidade:** Alta resolução
238
+ - **Tamanho máximo:** 2MB por imagem
239
+
240
+ ### Dimensões
241
+ - **Screenshots de terminal:** 1920x1080 ou maior
242
+ - **Logos:** Proporção 4:1 (ex: 800x200px)
243
+ - **Banners:** Proporção 16:9 (ex: 1920x1080px)
244
+
245
+ ### Estilo
246
+ - **Fundo:** Escuro (terminal) ou claro (dependendo do tema)
247
+ - **Texto:** Legível e nítido
248
+ - **Cores:** Manter cores originais do terminal
249
+ - **Emojis:** Mostrar emojis se visíveis no terminal
250
+
251
+ ---
252
+
253
+ ## 📝 Como Capturar
254
+
255
+ ### Windows
256
+ 1. Abra o terminal (PowerShell ou CMD)
257
+ 2. Execute o comando
258
+ 3. Use `Win + Shift + S` para captura de tela
259
+ 4. Ou use ferramenta de screenshot
260
+ 5. Salve como PNG
261
+
262
+ ### Linux
263
+ 1. Use `gnome-screenshot` ou `scrot`
264
+ 2. Ou `Shift + Print Screen`
265
+ 3. Salve como PNG
266
+
267
+ ### macOS
268
+ 1. Use `Cmd + Shift + 4` para captura de área
269
+ 2. Ou `Cmd + Shift + 3` para tela inteira
270
+ 3. Salve como PNG
271
+
272
+ ---
273
+
274
+ ## 📍 Onde Usar Cada Imagem
275
+
276
+ ### README.md
277
+ - `okto_logo.png` - Topo do README
278
+ - `okto_logo2.png` - Logo alternativo (se usado)
279
+ - `terminal-train.png` - Seção de exemplos
280
+ - `terminal-validate.png` - Seção de validação
281
+
282
+ ### docs/GETTING_STARTED.md
283
+ - `terminal-init.png` - Seção de inicialização
284
+ - `terminal-validate.png` - Seção de validação
285
+ - `terminal-train.png` - Seção de treinamento
286
+
287
+ ### docs/CLI_REFERENCE.md
288
+ - Screenshots de cada comando nas respectivas seções
289
+
290
+ ### docs/DEBUG_GUIDE.md
291
+ - `terminal-debug.png` - Exemplo de debug mode
292
+ - `terminal-error-debug.png` - Exemplo de erro com debug
293
+
294
+ ---
295
+
296
+ ## ✅ Checklist Final
297
+
298
+ Antes de enviar as imagens, verifique:
299
+
300
+ - [ ] Todas as imagens têm os nomes corretos
301
+ - [ ] Imagens estão em formato PNG ou JPEG
302
+ - [ ] Texto está legível
303
+ - [ ] Cores estão corretas
304
+ - [ ] Tamanho está adequado (< 2MB)
305
+ - [ ] Resolução é suficiente (1920x1080+)
306
+ - [ ] Screenshots mostram comandos reais funcionando
307
+
308
+ ---
309
+
310
+ ## 📧 Envio
311
+
312
+ Envie as imagens com os nomes exatos listados acima para:
313
+ - **Email:** service@oktoseek.com
314
+ - **Ou adicione diretamente na pasta `assets/`**
315
+
316
+ ---
317
+
318
+ **Nota:** Se alguma imagem não estiver disponível, podemos usar placeholders temporários ou criar screenshots de exemplo.
319
+
assets/okto_logo.png ADDED

Git LFS Details

  • SHA256: 2d15a700ad521021cbe19561298e6ca69cfab8a62a62a8d5451e5f81e7a45b83
  • Pointer size: 132 Bytes
  • Size of remote file: 2 MB
assets/okto_logo2.png ADDED

Git LFS Details

  • SHA256: 9257b5cac1dedf65e6b6b0822d00f5b0d0290929323f86b0eee2df23bcb2756b
  • Pointer size: 131 Bytes
  • Size of remote file: 308 kB
assets/terminal-about.png ADDED
assets/terminal-debug.png ADDED

Git LFS Details

  • SHA256: c6d23b0c2cac44b7b95fc269272558ad2b888d92b97a476c01f08fed079c37a6
  • Pointer size: 131 Bytes
  • Size of remote file: 173 kB
assets/terminal-doctor.png ADDED
assets/terminal-init.png ADDED
assets/terminal-train.png ADDED
assets/terminal-validate.png ADDED
docs/CLI_REFERENCE.md ADDED
@@ -0,0 +1,1173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OktoEngine CLI Reference
2
+
3
+ Complete reference for all OktoEngine CLI commands and options.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [Command Overview](#command-overview)
10
+ 2. [Core Commands](#core-commands)
11
+ 3. [Utility Commands](#utility-commands)
12
+ 4. [Global Flags](#global-flags)
13
+ 5. [Examples](#examples)
14
+
15
+ ---
16
+
17
+ ## Command Overview
18
+
19
+ ```bash
20
+ okto [FLAGS] <COMMAND>
21
+ ```
22
+
23
+ ### Available Commands
24
+
25
+ | Command | Description | Usage |
26
+ |---------|-------------|-------|
27
+ | `init` | Initialize new project | `okto init <name>` |
28
+ | `validate` | Validate OktoScript file | `okto validate [--file <path>]` |
29
+ | `train` | Train a model | `okto train [--file <path>]` |
30
+ | `eval` | Evaluate a model | `okto eval [--file <path>]` |
31
+ | `export` | Export a model | `okto export [--format <fmt>] [--file <path>]` |
32
+ | `convert` | Convert model formats | `okto convert --input <path> --from <fmt> --to <fmt> --output <path>` |
33
+ | `infer` | Direct inference (single input/output) | `okto infer --model <path> --text "<input>"` |
34
+ | `chat` | Interactive chat mode | `okto chat --model <path>` |
35
+ | `compare` | Compare two models | `okto compare <model1> <model2>` |
36
+ | `logs` | View historical logs | `okto logs <model_or_run_id>` |
37
+ | `tune` | Auto-tune training | `okto tune [--file <path>]` |
38
+ | `list` | List resources | `okto list <projects|models|datasets|exports>` |
39
+ | `doctor` | System diagnostics | `okto doctor [--install]` |
40
+ | `about` | Show information | `okto about` |
41
+ | `upgrade` | Upgrade engine | `okto upgrade` |
42
+ | `exit` | Exit interactive mode | `okto exit` |
43
+
44
+ ---
45
+
46
+ ## Core Commands
47
+
48
+ ### `okto init`
49
+
50
+ Initialize a new OktoScript project with proper folder structure.
51
+
52
+ **Usage:**
53
+ ```bash
54
+ okto init <project-name>
55
+ ```
56
+
57
+ **Example:**
58
+ ```bash
59
+ okto init my-ai-model
60
+ ```
61
+
62
+ **Creates:**
63
+ ```
64
+ my-ai-model/
65
+ ├── scripts/
66
+ │ └── train.okt
67
+ ├── dataset/
68
+ │ ├── train.jsonl
69
+ │ └── val.jsonl
70
+ └── export/
71
+ ```
72
+
73
+ **Output:**
74
+ ```
75
+ 🚀 Initializing OktoScript project: my-ai-model
76
+ ✅ Project 'my-ai-model' initialized successfully!
77
+
78
+ Next steps:
79
+ cd my-ai-model
80
+ okto validate
81
+ okto train
82
+ ```
83
+
84
+ ---
85
+
86
+ ### `okto validate`
87
+
88
+ Validate an OktoScript file for syntax errors and configuration issues.
89
+
90
+ **Usage:**
91
+ ```bash
92
+ okto validate [--file <path>]
93
+ okto validate -f scripts/train.okt
94
+ ```
95
+
96
+ **Default:** Validates `scripts/train.okt` in current directory
97
+
98
+ **Options:**
99
+ - `-f, --file <PATH>` - Path to OktoScript file
100
+
101
+ **Example:**
102
+ ```bash
103
+ okto validate
104
+ okto validate --file scripts/train.okt
105
+ okto validate --debug # Enable debug mode
106
+ ```
107
+
108
+ **Output:**
109
+ ```
110
+ 🐙 OktoEngine v0.1
111
+ 🔍 Validating OktoScript file: "scripts/train.okt"
112
+ 📄 File: "scripts/train.okt"
113
+ 📄 Size: 382 bytes
114
+ 📄 Lines: 31
115
+
116
+ ✔ File parsed successfully
117
+
118
+ 📋 Validation Results:
119
+ ✅ Validation passed! No errors or warnings.
120
+
121
+ 📊 Summary:
122
+ Project: my-model
123
+ ENV: Configured
124
+ Dataset: dataset/train.jsonl
125
+ Model: gpt2
126
+ Training: 5 epochs, batch size 32
127
+ Export: ["okm"]
128
+ ```
129
+
130
+ **Exit Codes:**
131
+ - `0` - Validation passed
132
+ - `1` - Validation failed
133
+
134
+ ---
135
+
136
+ ### `okto train`
137
+
138
+ Train a model from an OktoScript configuration file.
139
+
140
+ **Usage:**
141
+ ```bash
142
+ okto train [--file <path>]
143
+ okto train -f scripts/train.okt
144
+ ```
145
+
146
+ **Default:** Uses `scripts/train.okt` in current directory
147
+
148
+ **Options:**
149
+ - `-f, --file <PATH>` - Path to OktoScript file
150
+ - `--debug` - Enable debug mode
151
+
152
+ **Example:**
153
+ ```bash
154
+ okto train
155
+ okto train --file scripts/train.okt
156
+ okto train --debug # Show detailed logs
157
+ ```
158
+
159
+ **Output:**
160
+ ```
161
+ 🐙 OktoEngine v0.1
162
+ 📄 Reading: "scripts/train.okt"
163
+
164
+ 📊 Environment Check:
165
+ ✔ Runtime: Python 3.14.0
166
+ ✔ GPU: NVIDIA GeForce RTX 4070
167
+ ✔ RAM: 63GB (40GB available)
168
+ ✔ Platform: windows
169
+
170
+ 📦 Checking dependencies...
171
+ ✔ All dependencies available
172
+
173
+ 🚀 Starting training pipeline...
174
+
175
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
176
+ Loss: 2.345 → 1.892
177
+ Learning Rate: 5e-5
178
+ GPU Memory: 8.2GB / 12GB
179
+
180
+ ✅ Training completed successfully!
181
+ 📁 Output: runs/my-model/
182
+ ```
183
+
184
+ **What it does:**
185
+ 1. Parses and validates OktoScript file
186
+ 2. Checks system environment
187
+ 3. Verifies dependencies
188
+ 4. Loads dataset
189
+ 5. Initializes model
190
+ 6. Executes training loop
191
+ 7. Saves checkpoints
192
+ 8. Exports model (if configured)
193
+
194
+ ---
195
+
196
+ ### `okto eval`
197
+
198
+ Evaluate a trained model against test datasets.
199
+
200
+ **Usage:**
201
+ ```bash
202
+ okto eval [--file <path>]
203
+ okto eval -f scripts/train.okt
204
+ ```
205
+
206
+ **Options:**
207
+ - `-f, --file <PATH>` - Path to OktoScript file
208
+
209
+ **Example:**
210
+ ```bash
211
+ okto eval
212
+ okto eval --file scripts/train.okt
213
+ ```
214
+
215
+ **Output:**
216
+ ```
217
+ 🐙 OktoEngine v0.1
218
+ 📊 Evaluating model...
219
+
220
+ 📈 Evaluation Results:
221
+ Accuracy: 0.892
222
+ Loss: 1.234
223
+ Perplexity: 2.456
224
+ F1-Score: 0.876
225
+
226
+ ✅ Evaluation completed!
227
+ ```
228
+
229
+ ---
230
+
231
+ ### `okto export`
232
+
233
+ Export a trained model to various formats.
234
+
235
+ **Usage:**
236
+ ```bash
237
+ okto export [--format <fmt>] [--file <path>]
238
+ okto export --format okm
239
+ okto export --format onnx --file scripts/train.okt
240
+ ```
241
+
242
+ **Options:**
243
+ - `-f, --format <FORMAT>` - Export format (okm, onnx, gguf, safetensors)
244
+ - `--file <PATH>` - Path to OktoScript file
245
+
246
+ **Supported Formats:**
247
+ - `okm` - OktoSeek Model format (optimized)
248
+ - `onnx` - ONNX format (universal)
249
+ - `gguf` - GGUF format (local inference)
250
+ - `safetensors` - SafeTensors format (HuggingFace)
251
+
252
+ **Example:**
253
+ ```bash
254
+ okto export --format okm
255
+ okto export --format onnx
256
+ okto export --format okm,onnx # Multiple formats
257
+ ```
258
+
259
+ **Output:**
260
+ ```
261
+ 🐙 OktoEngine v0.1
262
+ 📦 Exporting model...
263
+
264
+ ✅ Exported to: export/model.okm
265
+ ✅ Exported to: export/model.onnx
266
+
267
+ 📁 Export directory: export/
268
+ ```
269
+
270
+ ---
271
+
272
+ ### `okto list`
273
+
274
+ List available projects, models, or datasets.
275
+
276
+ **Usage:**
277
+ ```bash
278
+ okto list <projects|models|datasets>
279
+ ```
280
+
281
+ **Examples:**
282
+ ```bash
283
+ okto list projects
284
+ okto list models
285
+ okto list datasets
286
+ ```
287
+
288
+ **Output:**
289
+ ```
290
+ 📋 Available Projects:
291
+ • my-chatbot
292
+ • vision-model
293
+ • recommender-system
294
+
295
+ 📋 Available Models:
296
+ • runs/my-chatbot/checkpoint-500
297
+ • runs/vision-model/checkpoint-1000
298
+
299
+ 📋 Available Datasets:
300
+ • dataset/train.jsonl
301
+ • dataset/val.jsonl
302
+ • dataset/test.jsonl
303
+ ```
304
+
305
+ ---
306
+
307
+ ### `okto convert`
308
+
309
+ Convert a trained model between different formats.
310
+
311
+ **Usage:**
312
+ ```bash
313
+ okto convert --input <model_path> --from <format> --to <format> --output <output_path>
314
+ ```
315
+
316
+ **Options:**
317
+ - `--input <PATH>` - Path to input model file
318
+ - `--from <FORMAT>` - Source format (pt, bin, onnx, tflite, gguf, okm, safetensors)
319
+ - `--to <FORMAT>` - Target format (onnx, tflite, gguf, okm, safetensors)
320
+ - `--output <PATH>` - Path to output file
321
+
322
+ **Supported Formats:**
323
+
324
+ | Format | From | To | Usage |
325
+ |--------|------|-----|-------|
326
+ | `pt`, `bin` | ✅ | ❌ | PyTorch format |
327
+ | `onnx` | ✅ | ✅ | Web / Interoperability |
328
+ | `tflite` | ✅ | ✅ | Mobile (Android / iOS) |
329
+ | `gguf` | ✅ | ✅ | Local LLMs (llama.cpp) |
330
+ | `okm` | ✅ | ✅ | Okto Model Format |
331
+ | `safetensors` | ✅ | ✅ | Safe and fast |
332
+
333
+ **Examples:**
334
+
335
+ ```bash
336
+ # PyTorch → GGUF (local inference)
337
+ okto convert --input model.pt --from pt --to gguf --output model.gguf
338
+
339
+ # PyTorch → TFLite (mobile)
340
+ okto convert --input model.pt --from pt --to tflite --output model.tflite
341
+
342
+ # PyTorch → ONNX (web)
343
+ okto convert --input model.pt --from pt --to onnx --output model.onnx
344
+
345
+ # ONNX → OktoModel (OktoSeek optimized)
346
+ okto convert --input model.onnx --from onnx --to okm --output model.okm
347
+ ```
348
+
349
+ **Output:**
350
+ ```
351
+ 🐙 OktoEngine v0.1
352
+ 🔄 Converting model...
353
+
354
+ 📦 Input: model.pt (PyTorch format)
355
+ 📦 Output: model.gguf (GGUF format)
356
+
357
+ ⏳ Converting...
358
+ ✓ Loading model: model.pt
359
+ ✓ Quantizing to GGUF...
360
+ ✓ Writing output: model.gguf
361
+
362
+ ✅ Conversion completed!
363
+ 📁 Output: model.gguf (245 MB)
364
+ ```
365
+
366
+ ---
367
+
368
+ ### `okto infer`
369
+
370
+ Run direct inference on a trained model (single input/output).
371
+
372
+ **Usage:**
373
+ ```bash
374
+ okto infer --model <model_path> --text "<input>"
375
+ ```
376
+
377
+ **Options:**
378
+ - `--model <PATH>` - Path to trained model
379
+ - `--text <STRING>` - Input text for inference
380
+
381
+ **What it respects:**
382
+ - `BEHAVIOR` block settings (personality, verbosity, language)
383
+ - `GUARD` block rules (safety, content filtering)
384
+ - `INFERENCE` block parameters (temperature, max_length, etc.)
385
+ - `CONTROL` block logic (if defined)
386
+
387
+ **Example:**
388
+ ```bash
389
+ okto infer --model models/pizzabot.okm --text "Good evening, I want a pizza"
390
+ ```
391
+
392
+ **Output:**
393
+ ```
394
+ 🐙 OktoEngine v0.1
395
+ 🤖 Loading model: models/pizzabot.okm
396
+
397
+ 📋 Model Configuration:
398
+ ✓ BEHAVIOR: friendly, medium verbosity, English
399
+ ✓ GUARD: toxicity, bias, hallucination protection enabled
400
+ ✓ INFERENCE: temperature=0.7, max_length=120
401
+
402
+ 💭 Input: "Good evening, I want a pizza"
403
+
404
+ 🤖 Processing...
405
+ ✓ Guard check passed
406
+ ✓ Inference parameters applied
407
+ ✓ CONTROL rules evaluated
408
+
409
+ 📤 Output: "Good evening! I'd be happy to help you order a pizza. What size and toppings would you like?"
410
+
411
+ ✅ Inference completed in 0.23s
412
+ ```
413
+
414
+ **Advanced Example with Multiple Inputs:**
415
+ ```bash
416
+ # Single inference
417
+ okto infer --model models/chatbot.okm --text "What are your business hours?"
418
+
419
+ # Batch inference (via file)
420
+ echo "What are your business hours?" > input.txt
421
+ echo "Do you deliver?" >> input.txt
422
+ okto infer --model models/chatbot.okm --file input.txt
423
+ ```
424
+
425
+ **Error Handling:**
426
+ ```
427
+ ⚠️ Guard violation detected: toxicity
428
+ 🛡️ Content blocked by GUARD rules
429
+ 📤 Output: "Sorry, this request is not allowed."
430
+ ```
431
+
432
+ ---
433
+
434
+ ### `okto chat`
435
+
436
+ Start an interactive chat session with a trained model.
437
+
438
+ **Usage:**
439
+ ```bash
440
+ okto chat --model <model_path>
441
+ ```
442
+
443
+ **Options:**
444
+ - `--model <PATH>` - Path to trained model
445
+
446
+ **Features:**
447
+ - Uses `prompt_style` from BEHAVIOR block
448
+ - Respects BEHAVIOR settings (personality, verbosity, language)
449
+ - Enforces GUARD rules in real-time
450
+ - Can use MEMORY in the future (session context)
451
+ - Type `/exit` or `exit` to quit
452
+
453
+ **Example:**
454
+ ```bash
455
+ okto chat --model models/pizzabot.okm
456
+ ```
457
+
458
+ **Interactive Session:**
459
+ ```
460
+ 🐙 OktoEngine v0.1
461
+ 🤖 Loading model: models/pizzabot.okm
462
+
463
+ 📋 Model Configuration:
464
+ ✓ BEHAVIOR: friendly, medium verbosity, English
465
+ ✓ GUARD: enabled
466
+ ✓ INFERENCE: chat mode
467
+ ✓ Exit command: /exit
468
+
469
+ 🟢 Okto Chat started (type '/exit' to quit)
470
+
471
+ ─────────────────────────────────────────
472
+
473
+ You: hi
474
+ Bot: Hello! How can I help you today?
475
+
476
+ You: what flavors do you have?
477
+ Bot: We have a great selection of pizza flavors! Here are some popular options:
478
+
479
+ • Margherita - Classic tomato, mozzarella, and basil
480
+ • Pepperoni - Spicy pepperoni with mozzarella
481
+ • Four Cheese - Mozzarella, gorgonzola, parmesan, and provolone
482
+ • Hawaiian - Ham and pineapple
483
+ • Vegetarian - Fresh vegetables and herbs
484
+
485
+ What sounds good to you?
486
+
487
+ You: do you deliver?
488
+ Bot: Yes, we offer delivery! Our delivery service is available in your area.
489
+
490
+ Delivery time is typically 30-45 minutes, and we have a minimum order of $15 for delivery.
491
+
492
+ Would you like to place an order?
493
+
494
+ You: /exit
495
+ 🔴 Session ended
496
+
497
+ 📊 Session Summary:
498
+ Messages: 6 (3 user, 3 bot)
499
+ Duration: 2m 15s
500
+ Guard checks: 3 (all passed)
501
+ ```
502
+
503
+ **Advanced Features:**
504
+ ```
505
+ You: tell me a joke
506
+ Bot: I'd love to share a joke! Here's a light one:
507
+
508
+ Why did the pizza maker go to art school?
509
+ Because they wanted to learn how to make a masterpiece!
510
+
511
+ 🍕 Hope that made you smile! Is there anything else I can help you with?
512
+
513
+ You: [tries to input toxic content]
514
+ 🛡️ Guard: Content violation detected
515
+ Bot: I cannot assist with that request. How else can I help you?
516
+
517
+ You: /exit
518
+ 🔴 Session ended
519
+ ```
520
+
521
+ **Session Context (Future):**
522
+ ```
523
+ You: my name is John
524
+ Bot: Nice to meet you, John! How can I help you today?
525
+
526
+ You: what's my name?
527
+ Bot: Your name is John! Is there anything else you'd like to know?
528
+ ```
529
+
530
+ ---
531
+
532
+ ### `okto compare`
533
+
534
+ Compare two trained models using the same test inputs.
535
+
536
+ **Usage:**
537
+ ```bash
538
+ okto compare <model1> <model2>
539
+ ```
540
+
541
+ **Options:**
542
+ - `<model1>` - Path to first model
543
+ - `<model2>` - Path to second model
544
+
545
+ **What it compares:**
546
+ - Latency (inference speed)
547
+ - Accuracy (if test dataset provided)
548
+ - Loss values
549
+ - Response quality
550
+ - Resource usage
551
+
552
+ **Example:**
553
+ ```bash
554
+ okto compare models/pizza_v1.okm models/pizza_v2.okm
555
+ ```
556
+
557
+ **Output:**
558
+ ```
559
+ 🐙 OktoEngine v0.1
560
+ 📊 Comparing models...
561
+
562
+ 📦 Model 1: models/pizza_v1.okm
563
+ 📦 Model 2: models/pizza_v2.okm
564
+
565
+ ⏳ Running comparison tests...
566
+ ✓ Loading models...
567
+ ✓ Running inference on 100 test samples...
568
+ ✓ Measuring metrics...
569
+
570
+ 📈 Comparison Results:
571
+
572
+ ┌─────────────────────┬──────────────┬──────────────┬─────────────┐
573
+ │ Metric │ Model 1 (V1) │ Model 2 (V2) │ Difference │
574
+ ├─────────────────────┼──────────────┼──────────────┼─────────────┤
575
+ │ Latency (avg) │ 245ms │ 189ms │ V2 -23% ⚡ │
576
+ │ Accuracy │ 0.892 │ 0.856 │ V1 +4% 📈 │
577
+ │ Loss │ 1.234 │ 1.156 │ V2 -6% 📉 │
578
+ │ GPU Memory │ 2.1GB │ 2.3GB │ V2 +9% │
579
+ │ Response Quality │ 8.5/10 │ 8.2/10 │ V1 +0.3 │
580
+ └─────────────────────┴──────────────┴──────────────┴─────────────┘
581
+
582
+ 💡 Recommendation: V2
583
+ • 23% faster inference
584
+ • Lower loss
585
+ • Slightly lower accuracy (acceptable trade-off)
586
+
587
+ ✅ Comparison completed!
588
+ ```
589
+
590
+ **With Test Dataset:**
591
+ ```bash
592
+ okto compare models/v1.okm models/v2.okm --dataset dataset/test.jsonl
593
+ ```
594
+
595
+ ---
596
+
597
+ ### `okto logs`
598
+
599
+ View historical training logs and metrics saved by CONTROL and MONITOR blocks.
600
+
601
+ **Usage:**
602
+ ```bash
603
+ okto logs <model_or_run_id>
604
+ ```
605
+
606
+ **Options:**
607
+ - `<model_or_run_id>` - Model name or run ID
608
+
609
+ **What it shows:**
610
+ - Loss per epoch
611
+ - Validation loss
612
+ - Accuracy metrics
613
+ - CPU/GPU/RAM usage
614
+ - Decisions made by CONTROL block
615
+ - System metrics from MONITOR block
616
+
617
+ **Example:**
618
+ ```bash
619
+ okto logs pizzabot_v1
620
+ ```
621
+
622
+ **Output:**
623
+ ```
624
+ 🐙 OktoEngine v0.1
625
+ 📊 Viewing logs for: pizzabot_v1
626
+
627
+ 📁 Log file: runs/pizzabot_v1/logs/training.log
628
+
629
+ ═══════════════════════════════════════════════════════════
630
+ 📈 Training Metrics
631
+ ═══════════════════════════════════════════════════════════
632
+
633
+ Epoch 1:
634
+ Loss: 2.345 → 1.892
635
+ Val Loss: 2.123 → 1.756
636
+ Accuracy: 0.654 → 0.723
637
+ GPU Usage: 78% (9.2GB / 12GB)
638
+ RAM Usage: 12.3GB
639
+
640
+ Epoch 2:
641
+ Loss: 1.892 → 1.654
642
+ Val Loss: 1.756 → 1.523
643
+ Accuracy: 0.723 → 0.789
644
+ GPU Usage: 82% (9.8GB / 12GB)
645
+ RAM Usage: 12.5GB
646
+
647
+ Epoch 3:
648
+ Loss: 1.654 → 1.456
649
+ Val Loss: 1.523 → 1.312
650
+ Accuracy: 0.789 → 0.834
651
+ GPU Usage: 85% (10.1GB / 12GB)
652
+ RAM Usage: 12.7GB
653
+ ⚠️ CONTROL: High loss detected, reducing learning rate
654
+ ✓ CONTROL: Learning rate set to 0.00005
655
+
656
+ Epoch 4:
657
+ Loss: 1.456 → 1.234
658
+ Val Loss: 1.312 → 1.156
659
+ Accuracy: 0.834 → 0.867
660
+ GPU Usage: 88% (10.5GB / 12GB)
661
+ RAM Usage: 12.9GB
662
+ ✓ CONTROL: Best model saved (accuracy > 0.85)
663
+
664
+ Epoch 5:
665
+ Loss: 1.234 → 1.123
666
+ Val Loss: 1.156 → 1.089
667
+ Accuracy: 0.867 → 0.892
668
+ GPU Usage: 90% (10.8GB / 12GB)
669
+ RAM Usage: 13.1GB
670
+ ✓ CONTROL: Training completed successfully
671
+
672
+ ═══════════════════════════════════════════════════════════
673
+ 🎯 CONTROL Decisions
674
+ ═══════════════════════════════════════════════════════════
675
+
676
+ Step 500:
677
+ ✓ LOG: loss = 1.892
678
+
679
+ Step 1000:
680
+ ✓ SAVE: checkpoint saved
681
+
682
+ Epoch 3, Step 1500:
683
+ ⚠️ IF loss > 2.0: SET LR = 0.00005
684
+ ✓ LOG: "High loss detected"
685
+
686
+ Epoch 4, Step 2000:
687
+ ✓ IF accuracy > 0.85: SAVE "best_model"
688
+
689
+ ═══════════════════════════════════════════════════════════
690
+ 📊 System Metrics
691
+ ═══════════════════════════════════════════════════════════
692
+
693
+ Average GPU Usage: 82.6%
694
+ Peak GPU Usage: 92%
695
+ Average RAM Usage: 12.7GB
696
+ Peak RAM Usage: 13.5GB
697
+ Average Temperature: 72°C
698
+ Peak Temperature: 78°C
699
+
700
+ Throughput: 3.7 samples/sec
701
+ Average Latency: 270ms/step
702
+ ```
703
+
704
+ **Filter by Metric:**
705
+ ```bash
706
+ okto logs pizzabot_v1 --metric loss
707
+ okto logs pizzabot_v1 --metric accuracy
708
+ okto logs pizzabot_v1 --metric gpu_usage
709
+ ```
710
+
711
+ ---
712
+
713
+ ### `okto tune`
714
+
715
+ Auto-tune training parameters using the CONTROL block for intelligent optimization.
716
+
717
+ **Usage:**
718
+ ```bash
719
+ okto tune [--file <path>]
720
+ ```
721
+
722
+ **Options:**
723
+ - `--file <PATH>` - Path to OktoScript file (default: `scripts/train.okt`)
724
+
725
+ **What it does:**
726
+ - Uses CONTROL block logic to auto-adjust training
727
+ - Can adjust learning rate dynamically
728
+ - Can change batch size based on memory
729
+ - Can activate early stopping
730
+ - Can balance classes automatically
731
+ - This is unique in the market
732
+
733
+ **Example:**
734
+ ```bash
735
+ okto tune
736
+ okto tune --file scripts/train.okt
737
+ ```
738
+
739
+ **Output:**
740
+ ```
741
+ 🐙 OktoEngine v0.1
742
+ 🎛️ Auto-tuning training...
743
+
744
+ 📄 Reading: scripts/train.okt
745
+ ✓ CONTROL block detected
746
+ ✓ MONITOR block detected
747
+
748
+ 🚀 Starting tuned training...
749
+
750
+ Epoch 1:
751
+ Loss: 2.345
752
+ ✓ CONTROL: Monitoring metrics...
753
+
754
+ Epoch 2:
755
+ Loss: 1.892
756
+ ✓ CONTROL: Loss improving, continuing...
757
+
758
+ Epoch 3:
759
+ Loss: 1.654
760
+ ⚠️ CONTROL: Loss plateau detected
761
+ ✓ CONTROL: Reducing learning rate from 0.0001 to 0.00005
762
+ ✓ CONTROL: Adjusting batch size from 32 to 16
763
+
764
+ Epoch 4:
765
+ Loss: 1.456
766
+ ✓ CONTROL: Learning rate adjustment successful
767
+ ✓ CONTROL: Loss improving again
768
+
769
+ Epoch 5:
770
+ Loss: 1.234
771
+ ✓ CONTROL: Best model saved (accuracy improved)
772
+
773
+ ✅ Auto-tuning completed!
774
+ 📊 Final metrics:
775
+ Loss: 1.234 (improved from 2.345)
776
+ Accuracy: 0.892 (improved from 0.654)
777
+ Optimizations applied: 3
778
+ ```
779
+
780
+ **What makes it unique:**
781
+ - Real-time parameter adjustment based on metrics
782
+ - Uses CONTROL block logic for decision-making
783
+ - No manual intervention needed
784
+ - Adapts to training conditions automatically
785
+
786
+ ---
787
+
788
+ ### `okto exit`
789
+
790
+ Exit interactive mode (chat, tune, or other interactive sessions).
791
+
792
+ **Usage:**
793
+ ```bash
794
+ okto exit
795
+ ```
796
+
797
+ **When to use:**
798
+ - Exiting chat mode (alternative to `/exit` command)
799
+ - Exiting interactive tuning session
800
+ - Exiting session context
801
+
802
+ **Example:**
803
+ ```bash
804
+ # In chat mode
805
+ You: /exit
806
+ # or
807
+ okto exit
808
+
809
+ # In interactive tuning
810
+ okto tune --interactive
811
+ # ... tuning session ...
812
+ okto exit
813
+ ```
814
+
815
+ ---
816
+
817
+ ## Utility Commands
818
+
819
+ ### `okto doctor`
820
+
821
+ System diagnostics and environment checking.
822
+
823
+ **Usage:**
824
+ ```bash
825
+ okto doctor
826
+ okto doctor --install
827
+ ```
828
+
829
+ **Options:**
830
+ - `--install` - Automatically install missing dependencies
831
+
832
+ **Example:**
833
+ ```bash
834
+ okto doctor # Check system
835
+ okto doctor --install # Check and install dependencies
836
+ ```
837
+
838
+ **Output:**
839
+ ```
840
+ 🐙 OktoEngine v0.1 - System Diagnostics
841
+
842
+ 🖥️ Platform: Windows
843
+ 💾 RAM: 63GB total, 40GB available
844
+ ⚙️ CPU: 32 cores
845
+ 🎮 GPU: Checking...
846
+ ✔ GPU found: NVIDIA GeForce RTX 4070 Laptop GPU
847
+ 🔧 CUDA: Checking...
848
+ ✔ CUDA available: 576.02
849
+ 🔧 Runtime: Checking...
850
+ ✔ Runtime available: Python 3.14.0
851
+ 📦 Dependencies: Checking...
852
+ ✔ All required packages installed
853
+
854
+ ✅ Diagnostics complete
855
+ ```
856
+
857
+ **With `--install`:**
858
+ ```
859
+ 📦 Dependencies: Checking...
860
+ ❌ Missing packages: torch, transformers
861
+
862
+ 💡 To install missing packages, run:
863
+ pip install torch transformers datasets safetensors
864
+
865
+ 🔧 Auto-installing missing packages...
866
+ ✔ Successfully installed all packages!
867
+ ```
868
+
869
+ ---
870
+
871
+ ### `okto upgrade`
872
+
873
+ Upgrade OktoEngine to the latest version.
874
+
875
+ **Usage:**
876
+ ```bash
877
+ okto upgrade
878
+ ```
879
+
880
+ **Example:**
881
+ ```bash
882
+ okto upgrade
883
+ ```
884
+
885
+ **Output:**
886
+ ```
887
+ 🐙 OktoEngine Upgrader
888
+ Current version: 0.1.0
889
+ 🔍 Checking for updates...
890
+
891
+ 📦 Downloading OktoEngine v0.2.0...
892
+ ████████████████████ 100% [00:15<00:00]
893
+
894
+ ✅ Updated successfully to v0.2.0
895
+ ```
896
+
897
+ **What it does:**
898
+ 1. Checks GitHub Releases for latest version
899
+ 2. Compares with current version
900
+ 3. Downloads appropriate binary for your OS
901
+ 4. Replaces current binary
902
+ 5. Makes it executable (Linux/Mac)
903
+
904
+ **Requirements:**
905
+ - Internet connection
906
+ - Write permissions to OktoEngine directory
907
+
908
+ ---
909
+
910
+ ### `okto about`
911
+
912
+ Show information about OktoEngine and OktoScript.
913
+
914
+ **Usage:**
915
+ ```bash
916
+ okto about
917
+ ```
918
+
919
+ **Output:**
920
+ ```
921
+ 🐙 OktoScript & OktoEngine
922
+
923
+ 📚 Language: OktoScript
924
+ 📝 Description: Domain-specific programming language for building, training, evaluating and exporting AI models
925
+ 👤 Author: OktoSeek AI
926
+ 📦 Version: 1.1
927
+ 🌐 Website: https://www.oktoseek.com
928
+ 💻 GitHub: https://github.com/oktoseek/oktoscript
929
+
930
+ 🔧 OktoEngine:
931
+ Official execution engine for OktoScript
932
+ Repository: https://github.com/oktoseek/oktoengine
933
+ Version: 0.1.0
934
+
935
+ 📖 Learn more:
936
+ - Grammar: https://github.com/oktoseek/oktoscript/blob/main/docs/grammar.md
937
+ - Getting Started: https://github.com/oktoseek/oktoscript/blob/main/docs/GETTING_STARTED.md
938
+ - FAQ: https://github.com/oktoseek/oktoscript/blob/main/docs/FAQ.md
939
+ ```
940
+
941
+ ---
942
+
943
+ ## Global Flags
944
+
945
+ ### `--debug`
946
+
947
+ Enable debug mode for detailed logging.
948
+
949
+ **Usage:**
950
+ ```bash
951
+ okto <command> --debug
952
+ OKTO_DEBUG=1 okto <command>
953
+ ```
954
+
955
+ **Example:**
956
+ ```bash
957
+ okto validate --debug
958
+ okto train --debug
959
+ OKTO_DEBUG=1 okto train
960
+ ```
961
+
962
+ **What it shows:**
963
+ - Detailed parsing logs
964
+ - Execution flow
965
+ - Error diagnostics
966
+ - Performance metrics
967
+
968
+ **Use cases:**
969
+ - Troubleshooting parsing errors
970
+ - Understanding execution flow
971
+ - Performance analysis
972
+ - Configuration debugging
973
+
974
+ ---
975
+
976
+ ### `--help`
977
+
978
+ Show help information for a command.
979
+
980
+ **Usage:**
981
+ ```bash
982
+ okto --help
983
+ okto <command> --help
984
+ ```
985
+
986
+ **Example:**
987
+ ```bash
988
+ okto --help
989
+ okto train --help
990
+ ```
991
+
992
+ ---
993
+
994
+ ### `--version`
995
+
996
+ Show OktoEngine version.
997
+
998
+ **Usage:**
999
+ ```bash
1000
+ okto --version
1001
+ ```
1002
+
1003
+ **Output:**
1004
+ ```
1005
+ okto 0.1.0
1006
+ ```
1007
+
1008
+ ---
1009
+
1010
+ ## Examples
1011
+
1012
+ ### Complete Workflow
1013
+
1014
+ ```bash
1015
+ # 1. Initialize project
1016
+ okto init my-chatbot
1017
+ cd my-chatbot
1018
+
1019
+ # 2. Validate configuration
1020
+ okto validate
1021
+
1022
+ # 3. Check system
1023
+ okto doctor
1024
+
1025
+ # 4. Train model
1026
+ okto train
1027
+
1028
+ # 5. Evaluate model
1029
+ okto eval
1030
+
1031
+ # 6. Export model
1032
+ okto export --format okm
1033
+
1034
+ # 7. Convert to different formats
1035
+ okto convert --input export/model.okm --from okm --to onnx --output export/model.onnx
1036
+
1037
+ # 8. Test inference
1038
+ okto infer --model export/model.okm --text "Hello, how can I help?"
1039
+
1040
+ # 9. Interactive chat
1041
+ okto chat --model export/model.okm
1042
+
1043
+ # 10. View training logs
1044
+ okto logs my-chatbot
1045
+ ```
1046
+
1047
+ ### Inference Workflow
1048
+
1049
+ ```bash
1050
+ # Direct inference
1051
+ okto infer --model models/chatbot.okm --text "What are your business hours?"
1052
+
1053
+ # Interactive chat session
1054
+ okto chat --model models/chatbot.okm
1055
+ # ... chat interaction ...
1056
+ # Type '/exit' to quit
1057
+
1058
+ # Compare two model versions
1059
+ okto compare models/v1.okm models/v2.okm
1060
+ ```
1061
+
1062
+ ### Conversion Workflow
1063
+
1064
+ ```bash
1065
+ # Convert PyTorch to multiple formats
1066
+ okto convert --input model.pt --from pt --to gguf --output model.gguf
1067
+ okto convert --input model.pt --from pt --to onnx --output model.onnx
1068
+ okto convert --input model.pt --from pt --to tflite --output model.tflite
1069
+
1070
+ # Convert for mobile deployment
1071
+ okto convert --input model.pt --from pt --to tflite --output model.tflite
1072
+
1073
+ # Convert for web deployment
1074
+ okto convert --input model.pt --from pt --to onnx --output model.onnx
1075
+ ```
1076
+
1077
+ ### Monitoring and Analysis Workflow
1078
+
1079
+ ```bash
1080
+ # View training logs
1081
+ okto logs my-model
1082
+
1083
+ # View specific metrics
1084
+ okto logs my-model --metric loss
1085
+ okto logs my-model --metric gpu_usage
1086
+
1087
+ # Auto-tune training
1088
+ okto tune
1089
+
1090
+ # Compare model versions
1091
+ okto compare models/v1.okm models/v2.okm
1092
+ ```
1093
+
1094
+ ### Debug Workflow
1095
+
1096
+ ```bash
1097
+ # Validate with debug
1098
+ okto validate --debug
1099
+
1100
+ # Train with debug
1101
+ okto train --debug
1102
+
1103
+ # Or use environment variable
1104
+ OKTO_DEBUG=1 okto train
1105
+ ```
1106
+
1107
+ ### Update and Check
1108
+
1109
+ ```bash
1110
+ # Update engine
1111
+ okto upgrade
1112
+
1113
+ # Check system
1114
+ okto doctor
1115
+
1116
+ # Show information
1117
+ okto about
1118
+ ```
1119
+
1120
+ ---
1121
+
1122
+ ## Exit Codes
1123
+
1124
+ | Code | Meaning |
1125
+ |------|---------|
1126
+ | `0` | Success |
1127
+ | `1` | Error (general) |
1128
+ | `2` | Validation error |
1129
+ | `3` | Training error |
1130
+ | `4` | System error |
1131
+
1132
+ ---
1133
+
1134
+ ## Environment Variables
1135
+
1136
+ | Variable | Description |
1137
+ |----------|-------------|
1138
+ | `OKTO_DEBUG` | Enable debug mode (any value) |
1139
+ | `OKTO_LOG_LEVEL` | Set log level (debug, info, warn, error) |
1140
+
1141
+ ---
1142
+
1143
+ ## Tips & Best Practices
1144
+
1145
+ 1. **Always validate before training:**
1146
+ ```bash
1147
+ okto validate && okto train
1148
+ ```
1149
+
1150
+ 2. **Use debug mode for troubleshooting:**
1151
+ ```bash
1152
+ okto train --debug
1153
+ ```
1154
+
1155
+ 3. **Check system before training:**
1156
+ ```bash
1157
+ okto doctor
1158
+ ```
1159
+
1160
+ 4. **Keep engine updated:**
1161
+ ```bash
1162
+ okto upgrade
1163
+ ```
1164
+
1165
+ 5. **Use absolute paths for clarity:**
1166
+ ```bash
1167
+ okto train --file /path/to/scripts/train.okt
1168
+ ```
1169
+
1170
+ ---
1171
+
1172
+ **Need more help?** Check the [FAQ](./FAQ.md) or [Getting Started Guide](./GETTING_STARTED.md).
1173
+
docs/DEBUG_GUIDE.md ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OktoEngine Debug Guide
2
+
3
+ Complete guide to using debug mode for troubleshooting and understanding OktoEngine's operation.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [What is Debug Mode?](#what-is-debug-mode)
10
+ 2. [Enabling Debug Mode](#enabling-debug-mode)
11
+ 3. [What Debug Mode Shows](#what-debug-mode-shows)
12
+ 4. [Use Cases](#use-cases)
13
+ 5. [Interpreting Debug Output](#interpreting-debug-output)
14
+ 6. [Common Debug Scenarios](#common-debug-scenarios)
15
+
16
+ ---
17
+
18
+ ## What is Debug Mode?
19
+
20
+ Debug mode provides detailed, real-time logging of OktoEngine's internal operations. It shows:
21
+
22
+ - **Parsing details** - How your OktoScript is being parsed
23
+ - **Execution flow** - Step-by-step execution of commands
24
+ - **Error diagnostics** - Detailed error information
25
+ - **Performance metrics** - Timing and resource usage
26
+
27
+ **When to use:**
28
+ - Troubleshooting parsing errors
29
+ - Understanding execution flow
30
+ - Performance analysis
31
+ - Configuration debugging
32
+ - Learning how OktoEngine works
33
+
34
+ ---
35
+
36
+ ## Enabling Debug Mode
37
+
38
+ ### Method 1: Command Flag
39
+
40
+ ```bash
41
+ okto validate --debug
42
+ okto train --debug
43
+ okto export --debug
44
+ ```
45
+
46
+ ### Method 2: Environment Variable
47
+
48
+ ```bash
49
+ # Linux/Mac
50
+ OKTO_DEBUG=1 okto train
51
+
52
+ # Windows PowerShell
53
+ $env:OKTO_DEBUG=1; okto train
54
+
55
+ # Windows CMD
56
+ set OKTO_DEBUG=1 && okto train
57
+ ```
58
+
59
+ ### Method 3: Global Flag
60
+
61
+ The `--debug` flag works with all commands:
62
+
63
+ ```bash
64
+ okto <command> --debug
65
+ ```
66
+
67
+ ---
68
+
69
+ ## What Debug Mode Shows
70
+
71
+ ### Parsing Phase
72
+
73
+ **Example output:**
74
+ ```
75
+ DEBUG: Starting parse_oktoscript. Input preview: '# okto_version: "1.0" PROJECT "MyModel" ENV {'
76
+ DEBUG: Parsed version: Some("1.0")
77
+ DEBUG: Parsed project: MyModel
78
+ DEBUG: After PROJECT, remaining input: 'ENV { accelerator: "gpu" min_memory: "8GB"...'
79
+ DEBUG: Attempting to parse ENV block...
80
+ DEBUG: Parsed ENV field: accelerator = gpu
81
+ DEBUG: Parsed ENV field: min_memory = 8GB
82
+ DEBUG: Parsed ENV field: precision = fp16
83
+ DEBUG: Successfully parsed ENV block with 5 fields
84
+ DEBUG: After ENV, remaining input: 'DATASET { train: "dataset/train.jsonl"...'
85
+ ```
86
+
87
+ **What it shows:**
88
+ - How the parser processes your OktoScript
89
+ - Which blocks are being parsed
90
+ - Field-by-field parsing
91
+ - Remaining input after each step
92
+
93
+ ### Execution Phase
94
+
95
+ **Example output:**
96
+ ```
97
+ DEBUG: Parsed DATASET block
98
+ DEBUG: Parsed MODEL block
99
+ DEBUG: After MODEL, remaining input: 'TRAIN { epochs: 5 batch_size: 32...'
100
+ DEBUG: Attempting to parse TRAIN block...
101
+ DEBUG: Parsed TRAIN block
102
+ DEBUG: After TRAIN, remaining input: 'EXPORT { format: ["okm"]...'
103
+ DEBUG: Attempting to parse EXPORT block...
104
+ DEBUG: Parsing EXPORT field: format
105
+ DEBUG: parse_string_list - attempting to parse array. Input: '["okm"] path: "export/" }'
106
+ DEBUG: parse_string_list - parsed 1 items: ["okm"]
107
+ DEBUG: Parsed format: ["okm"]
108
+ DEBUG: Parsed EXPORT block
109
+ DEBUG: Final remaining input: ''
110
+ ```
111
+
112
+ **What it shows:**
113
+ - Block parsing order
114
+ - Field extraction
115
+ - Array/list parsing
116
+ - Final state
117
+
118
+ ### Error Diagnostics
119
+
120
+ **Example output:**
121
+ ```
122
+ DEBUG: Failed to parse key in ENV block. Input: 'accelerator: "gpu"...'
123
+ DEBUG: Failed to parse ':' after key 'accelerator'. Input: '"gpu"...'
124
+ ```
125
+
126
+ **What it shows:**
127
+ - Exact point of failure
128
+ - Input context at failure
129
+ - Parsing step that failed
130
+ - Remaining input
131
+
132
+ ---
133
+
134
+ ## Use Cases
135
+
136
+ ### 1. Troubleshooting Parsing Errors
137
+
138
+ **Problem:** Validation fails with unclear error
139
+
140
+ **Solution:**
141
+ ```bash
142
+ okto validate --debug
143
+ ```
144
+
145
+ **Example:**
146
+ ```
147
+ DEBUG: Failed to parse ':' after key 'accelerator:'. Input: '"gpu"'
148
+ ```
149
+
150
+ **Interpretation:** The parser found `accelerator:` but couldn't find the colon separator. This suggests a syntax issue in the ENV block.
151
+
152
+ **Fix:** Check your OktoScript syntax:
153
+ ```okt
154
+ ENV {
155
+ accelerator: "gpu" # ✅ Correct
156
+ # accelerator: "gpu" # ❌ Wrong (colon in key)
157
+ }
158
+ ```
159
+
160
+ ### 2. Understanding Execution Flow
161
+
162
+ **Use case:** Want to see how OktoEngine processes your configuration
163
+
164
+ **Solution:**
165
+ ```bash
166
+ okto train --debug
167
+ ```
168
+
169
+ **Shows:**
170
+ - Order of block parsing
171
+ - How fields are extracted
172
+ - How arrays are parsed
173
+ - Final parsed structure
174
+
175
+ ### 3. Performance Analysis
176
+
177
+ **Use case:** Training is slow, want to see where time is spent
178
+
179
+ **Solution:**
180
+ ```bash
181
+ okto train --debug
182
+ ```
183
+
184
+ **Look for:**
185
+ - Time spent in parsing
186
+ - Time spent loading datasets
187
+ - Time spent initializing models
188
+ - Training loop performance
189
+
190
+ ### 4. Configuration Debugging
191
+
192
+ **Use case:** Configuration works but results are unexpected
193
+
194
+ **Solution:**
195
+ ```bash
196
+ okto validate --debug
197
+ okto train --debug
198
+ ```
199
+
200
+ **Check:**
201
+ - Are all fields parsed correctly?
202
+ - Are values what you expect?
203
+ - Are arrays parsed correctly?
204
+ - Are boolean values correct?
205
+
206
+ ---
207
+
208
+ ## Interpreting Debug Output
209
+
210
+ ### Parsing Flow
211
+
212
+ **Normal flow:**
213
+ ```
214
+ DEBUG: Starting parse_oktoscript...
215
+ DEBUG: Parsed version: Some("1.0")
216
+ DEBUG: Parsed project: MyModel
217
+ DEBUG: After PROJECT, remaining input: 'ENV {...'
218
+ DEBUG: Attempting to parse ENV block...
219
+ DEBUG: Successfully parsed ENV block
220
+ DEBUG: After ENV, remaining input: 'DATASET {...'
221
+ ...
222
+ DEBUG: Final remaining input: ''
223
+ ```
224
+
225
+ **What to look for:**
226
+ - ✅ Each block parsed successfully
227
+ - ✅ Remaining input decreases after each block
228
+ - ✅ Final remaining input is empty
229
+
230
+ **Error indicators:**
231
+ - ❌ "Failed to parse" messages
232
+ - ❌ Remaining input contains unexpected content
233
+ - ❌ Blocks not parsed in expected order
234
+
235
+ ### Field Parsing
236
+
237
+ **Normal:**
238
+ ```
239
+ DEBUG: Parsed ENV field: accelerator = gpu
240
+ DEBUG: Parsed ENV field: precision = fp16
241
+ ```
242
+
243
+ **Error:**
244
+ ```
245
+ DEBUG: Failed to parse value for key 'accelerator'. Input: 'gpu min_memory...'
246
+ ```
247
+
248
+ **Interpretation:** The parser couldn't extract the value for `accelerator`. This might indicate:
249
+ - Missing quotes around string values
250
+ - Syntax error in value
251
+ - Unexpected character
252
+
253
+ ### Array Parsing
254
+
255
+ **Normal:**
256
+ ```
257
+ DEBUG: parse_string_list - attempting to parse array. Input: '["okm"] path: "export/"'
258
+ DEBUG: parse_string_list - parsed 1 items: ["okm"]
259
+ ```
260
+
261
+ **Error:**
262
+ ```
263
+ DEBUG: parse_string_list - failed to parse array. Input: '[okm] path: "export/"'
264
+ ```
265
+
266
+ **Interpretation:** Array parsing failed. Common causes:
267
+ - Missing quotes around array items
268
+ - Invalid array syntax
269
+ - Unexpected characters
270
+
271
+ ---
272
+
273
+ ## Common Debug Scenarios
274
+
275
+ ### Scenario 1: Validation Fails
276
+
277
+ **Problem:**
278
+ ```bash
279
+ $ okto validate
280
+ ❌ Parsing failed!
281
+ ```
282
+
283
+ **Debug:**
284
+ ```bash
285
+ $ okto validate --debug
286
+ DEBUG: Starting parse_oktoscript...
287
+ DEBUG: Failed to parse PROJECT block. Input: 'ENV { accelerator: "gpu"...'
288
+ ```
289
+
290
+ **Solution:** Missing PROJECT block or syntax error before PROJECT.
291
+
292
+ ### Scenario 2: Training Fails
293
+
294
+ **Problem:**
295
+ ```bash
296
+ $ okto train
297
+ ❌ Training failed!
298
+ ```
299
+
300
+ **Debug:**
301
+ ```bash
302
+ $ okto train --debug
303
+ DEBUG: Parsed ENV field: accelerator = gpu
304
+ DEBUG: Parsed ENV field: precision = fp16
305
+ DEBUG: After ENV, remaining input: 'DATASET { train: "dataset/train.jsonl"...'
306
+ DEBUG: Parsed DATASET block
307
+ DEBUG: After DATASET, remaining input: 'MODEL { base: "gpt2" } TRAIN...'
308
+ DEBUG: Parsed MODEL block
309
+ DEBUG: After MODEL, remaining input: 'TRAIN { epochs: 5...'
310
+ ...
311
+ Training error: Dataset file not found
312
+ ```
313
+
314
+ **Solution:** Dataset file path is incorrect. Check the path in DATASET block.
315
+
316
+ ### Scenario 3: Export Fails
317
+
318
+ **Problem:**
319
+ ```bash
320
+ $ okto export
321
+ ❌ Export failed!
322
+ ```
323
+
324
+ **Debug:**
325
+ ```bash
326
+ $ okto export --debug
327
+ DEBUG: Parsing EXPORT field: format
328
+ DEBUG: parse_string_list - attempting to parse array. Input: '["okm"] path: "export/"'
329
+ DEBUG: parse_string_list - parsed 1 items: ["okm"]
330
+ DEBUG: Parsed format: ["okm"]
331
+ DEBUG: Parsed EXPORT block
332
+ Export error: Model not found at runs/MyModel/
333
+ ```
334
+
335
+ **Solution:** Model hasn't been trained yet. Run `okto train` first.
336
+
337
+ ---
338
+
339
+ ## Tips for Effective Debugging
340
+
341
+ 1. **Start with validation:**
342
+ ```bash
343
+ okto validate --debug
344
+ ```
345
+ Fix parsing errors before training.
346
+
347
+ 2. **Use debug for training:**
348
+ ```bash
349
+ okto train --debug
350
+ ```
351
+ See full execution flow.
352
+
353
+ 3. **Look for patterns:**
354
+ - Multiple "Failed to parse" messages indicate syntax issues
355
+ - "Remaining input" shows what wasn't parsed
356
+ - Field parsing shows exact values extracted
357
+
358
+ 4. **Compare working vs. broken:**
359
+ - Run debug on a working configuration
360
+ - Compare output with broken configuration
361
+ - Identify differences
362
+
363
+ 5. **Check final state:**
364
+ - Look for "Final remaining input: ''"
365
+ - Empty means successful parsing
366
+ - Non-empty means unparsed content
367
+
368
+ ---
369
+
370
+ ## Debug Output Examples
371
+
372
+ ### Successful Parsing
373
+
374
+ ```
375
+ DEBUG: Starting parse_oktoscript. Input preview: '# okto_version: "1.0" PROJECT "MyModel"'
376
+ DEBUG: Parsed version: Some("1.0")
377
+ DEBUG: Parsed project: MyModel
378
+ DEBUG: After PROJECT, remaining input: 'ENV { accelerator: "gpu"...'
379
+ DEBUG: Attempting to parse ENV block...
380
+ DEBUG: Parsed ENV field: accelerator = gpu
381
+ DEBUG: Parsed ENV field: precision = fp16
382
+ DEBUG: Successfully parsed ENV block with 2 fields
383
+ DEBUG: After ENV, remaining input: 'DATASET { train: "dataset/train.jsonl"...'
384
+ DEBUG: Parsed DATASET block
385
+ DEBUG: Parsed MODEL block
386
+ DEBUG: Parsed TRAIN block
387
+ DEBUG: Parsed EXPORT block
388
+ DEBUG: Final remaining input: ''
389
+ ```
390
+
391
+ ### Parsing Error
392
+
393
+ ```
394
+ DEBUG: Starting parse_oktoscript...
395
+ DEBUG: Parsed version: Some("1.0")
396
+ DEBUG: Parsed project: MyModel
397
+ DEBUG: After PROJECT, remaining input: 'ENV { accelerator: "gpu"...'
398
+ DEBUG: Attempting to parse ENV block...
399
+ DEBUG: Failed to parse key in ENV block. Input: 'accelerator: "gpu"...'
400
+ ```
401
+
402
+ **Issue:** Key parsing failed. Check ENV block syntax.
403
+
404
+ ---
405
+
406
+ ## Best Practices
407
+
408
+ 1. **Use debug mode proactively:**
409
+ - Enable debug when first setting up
410
+ - Verify configuration is parsed correctly
411
+ - Understand execution flow
412
+
413
+ 2. **Disable when not needed:**
414
+ - Debug output can be verbose
415
+ - Disable for production runs
416
+ - Use only when troubleshooting
417
+
418
+ 3. **Save debug output:**
419
+ ```bash
420
+ okto train --debug > debug.log 2>&1
421
+ ```
422
+ Review later or share for support
423
+
424
+ 4. **Combine with validation:**
425
+ ```bash
426
+ okto validate --debug && okto train --debug
427
+ ```
428
+ Fix parsing issues before training
429
+
430
+ ---
431
+
432
+ **Need more help?** Check the [FAQ](./FAQ.md) or open an issue on [GitHub](https://github.com/oktoseek/oktoengine/issues).
433
+
docs/FAQ.md ADDED
@@ -0,0 +1,347 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OktoEngine FAQ
2
+
3
+ Frequently Asked Questions about OktoEngine CLI.
4
+
5
+ ---
6
+
7
+ ## General Questions
8
+
9
+ ### Q: What is OktoEngine?
10
+
11
+ **A:** OktoEngine is the official execution engine for OktoScript—a professional CLI tool that transforms declarative AI configurations into trained, production-ready models. It provides a complete command-line interface for training, evaluating, and exporting AI models.
12
+
13
+ ### Q: Do I need to know Python to use OktoEngine?
14
+
15
+ **A:** No! OktoEngine provides a complete CLI interface. You only need to write OktoScript configuration files. The engine handles all the complex operations behind the scenes.
16
+
17
+ ### Q: What models can I train with OktoEngine?
18
+
19
+ **A:** OktoEngine supports any model compatible with modern AI frameworks. From small models (millions of parameters) to large language models (billions of parameters). The engine automatically handles model loading, training, and optimization.
20
+
21
+ ### Q: Is OktoEngine free?
22
+
23
+ **A:** OktoEngine binary releases are available for download. See the [LICENSE](../LICENSE) file for licensing terms.
24
+
25
+ ---
26
+
27
+ ## Installation & Setup
28
+
29
+ ### Q: How do I install OktoEngine?
30
+
31
+ **A:** Download the latest release from [GitHub Releases](https://github.com/oktoseek/oktoengine/releases) for your platform:
32
+ - Windows: `okto-windows.exe`
33
+ - Linux: `okto-linux`
34
+ - macOS: `okto-macos`
35
+
36
+ Make it executable (Linux/Mac) and optionally add to PATH.
37
+
38
+ ### Q: How do I update OktoEngine?
39
+
40
+ **A:** Simply run:
41
+ ```bash
42
+ okto upgrade
43
+ ```
44
+
45
+ This automatically downloads and installs the latest version.
46
+
47
+ ### Q: What are the system requirements?
48
+
49
+ **A:**
50
+ - **Minimum:** 8GB RAM, 10GB storage, compatible runtime
51
+ - **Recommended for training:** GPU with CUDA, 32GB+ RAM, 50GB+ SSD storage
52
+
53
+ Check your system:
54
+ ```bash
55
+ okto doctor
56
+ ```
57
+
58
+ ---
59
+
60
+ ## Training
61
+
62
+ ### Q: Can I train models without a GPU?
63
+
64
+ **A:** Yes! OktoEngine automatically detects available hardware and uses CPU when GPU is not available. Training will be slower but fully functional. Set `device: "auto"` in your TRAIN block for automatic detection.
65
+
66
+ ### Q: How long does training take?
67
+
68
+ **A:** Training time depends on:
69
+ - Model size (parameters)
70
+ - Dataset size
71
+ - Hardware (GPU/CPU)
72
+ - Number of epochs
73
+
74
+ **Rough estimates:**
75
+ - Small models (100M params): 5-15 minutes
76
+ - Medium models (1B params): 30-60 minutes
77
+ - Large models (7B params): Several hours
78
+
79
+ ### Q: Can I resume training from a checkpoint?
80
+
81
+ **A:** Yes! OktoEngine automatically saves checkpoints during training. You can resume from any checkpoint by configuring your OktoScript file.
82
+
83
+ ### Q: What if training fails?
84
+
85
+ **A:**
86
+ 1. Check system: `okto doctor`
87
+ 2. Validate configuration: `okto validate --debug`
88
+ 3. Check error messages for specific issues
89
+ 4. Common fixes:
90
+ - Reduce `batch_size` if out of memory
91
+ - Verify dataset paths exist
92
+ - Check model name is valid
93
+ - Install missing dependencies: `okto doctor --install`
94
+
95
+ ---
96
+
97
+ ## Configuration
98
+
99
+ ### Q: How do I validate my OktoScript file?
100
+
101
+ **A:**
102
+ ```bash
103
+ okto validate
104
+ ```
105
+
106
+ Or with debug mode:
107
+ ```bash
108
+ okto validate --debug
109
+ ```
110
+
111
+ ### Q: What if validation fails?
112
+
113
+ **A:**
114
+ 1. Enable debug mode: `okto validate --debug`
115
+ 2. Check error messages
116
+ 3. Verify syntax matches OktoScript grammar
117
+ 4. Check file paths exist
118
+ 5. Verify values are within allowed ranges
119
+
120
+ ### Q: Can I use models from HuggingFace?
121
+
122
+ **A:** Yes! OktoEngine automatically downloads models from HuggingFace. Just specify the model identifier in your MODEL block:
123
+
124
+ ```okt
125
+ MODEL {
126
+ base: "gpt2" # Downloads automatically
127
+ }
128
+ ```
129
+
130
+ ### Q: What export formats are supported?
131
+
132
+ **A:** OktoEngine supports multiple formats:
133
+ - `okm` - OktoSeek Model format (optimized)
134
+ - `onnx` - ONNX format (universal)
135
+ - `gguf` - GGUF format (local inference)
136
+ - `safetensors` - SafeTensors format (HuggingFace)
137
+
138
+ ---
139
+
140
+ ## Debug Mode
141
+
142
+ ### Q: What is debug mode?
143
+
144
+ **A:** Debug mode provides detailed, real-time logging of OktoEngine's internal operations. It shows parsing details, execution flow, and error diagnostics.
145
+
146
+ ### Q: How do I enable debug mode?
147
+
148
+ **A:**
149
+ ```bash
150
+ okto train --debug
151
+ okto validate --debug
152
+ ```
153
+
154
+ Or via environment variable:
155
+ ```bash
156
+ OKTO_DEBUG=1 okto train
157
+ ```
158
+
159
+ ### Q: When should I use debug mode?
160
+
161
+ **A:** Use debug mode when:
162
+ - Troubleshooting parsing errors
163
+ - Understanding execution flow
164
+ - Performance analysis
165
+ - Configuration debugging
166
+
167
+ ---
168
+
169
+ ## System & Dependencies
170
+
171
+ ### Q: How do I check my system?
172
+
173
+ **A:**
174
+ ```bash
175
+ okto doctor
176
+ ```
177
+
178
+ Shows GPU, CUDA, RAM, runtime, and dependencies.
179
+
180
+ ### Q: How do I install missing dependencies?
181
+
182
+ **A:**
183
+ ```bash
184
+ okto doctor --install
185
+ ```
186
+
187
+ Automatically installs missing dependencies.
188
+
189
+ ### Q: What dependencies are required?
190
+
191
+ **A:** OktoEngine automatically manages dependencies. Required packages are installed automatically when needed. Check with:
192
+ ```bash
193
+ okto doctor
194
+ ```
195
+
196
+ ---
197
+
198
+ ## Errors & Troubleshooting
199
+
200
+ ### Q: Training fails with "Model not found"
201
+
202
+ **A:**
203
+ 1. Check the model name in MODEL block is valid
204
+ 2. Verify it's a valid HuggingFace model identifier
205
+ 3. Check internet connection (for downloading)
206
+ 4. Try a different model: `gpt2`, `distilgpt2`, etc.
207
+
208
+ ### Q: Training fails with "Dataset not found"
209
+
210
+ **A:**
211
+ 1. Verify dataset paths in DATASET block
212
+ 2. Check files exist at specified paths
213
+ 3. Use absolute paths if relative paths fail
214
+ 4. Verify file format (JSONL, CSV, etc.)
215
+
216
+ ### Q: Training fails with "Out of memory"
217
+
218
+ **A:**
219
+ 1. Reduce `batch_size` in TRAIN block
220
+ 2. Use LoRA fine-tuning instead of full fine-tuning
221
+ 3. Reduce model size
222
+ 4. Close other applications
223
+ 5. Use CPU if GPU memory is insufficient
224
+
225
+ ### Q: Validation fails with syntax error
226
+
227
+ **A:**
228
+ 1. Enable debug mode: `okto validate --debug`
229
+ 2. Check OktoScript syntax matches grammar
230
+ 3. Verify all required blocks are present
231
+ 4. Check for typos in block names
232
+ 5. Verify quotes around string values
233
+
234
+ ---
235
+
236
+ ## Performance
237
+
238
+ ### Q: How can I speed up training?
239
+
240
+ **A:**
241
+ 1. Use GPU: Set `accelerator: "gpu"` in ENV block
242
+ 2. Use mixed precision: Set `precision: "fp16"` in ENV block
243
+ 3. Increase batch size (if memory allows)
244
+ 4. Use LoRA fine-tuning for large models
245
+ 5. Use SSD storage for datasets
246
+
247
+ ### Q: How do I monitor training progress?
248
+
249
+ **A:** Training progress is shown in real-time in the terminal:
250
+ - Progress bars
251
+ - Loss values
252
+ - Learning rate
253
+ - GPU memory usage
254
+ - Epoch progress
255
+
256
+ ### Q: Can I train multiple models simultaneously?
257
+
258
+ **A:** Yes, but ensure you have sufficient resources (GPU memory, RAM). Run training in separate terminals or use different GPU devices.
259
+
260
+ ---
261
+
262
+ ## Integration
263
+
264
+ ### Q: Will OktoEngine be integrated into OktoSeek IDE?
265
+
266
+ **A:** Yes! OktoEngine will be integrated into OktoSeek IDE for visual training workflows, including:
267
+ - Visual pipeline builder
268
+ - Real-time dashboard
269
+ - One-click training
270
+ - Project management
271
+
272
+ ### Q: Can I use OktoEngine in scripts?
273
+
274
+ **A:** Yes! OktoEngine is designed for CLI usage and can be integrated into scripts, CI/CD pipelines, and automation workflows.
275
+
276
+ ---
277
+
278
+ ## Licensing
279
+
280
+ ### Q: Is OktoEngine open source?
281
+
282
+ **A:** No. OktoEngine is proprietary software. Binary releases are available for download, but the source code is proprietary. See [LICENSE](../LICENSE) for details.
283
+
284
+ ### Q: Can I redistribute OktoEngine?
285
+
286
+ **A:** See the [LICENSE](../LICENSE) file for redistribution terms.
287
+
288
+ ---
289
+
290
+ ## Support
291
+
292
+ ### Q: Where can I get help?
293
+
294
+ **A:**
295
+ - **Documentation:** Check [docs/](./) folder
296
+ - **GitHub Issues:** https://github.com/oktoseek/oktoengine/issues
297
+ - **Email:** service@oktoseek.com
298
+ - **Website:** https://www.oktoseek.com
299
+
300
+ ### Q: How do I report a bug?
301
+
302
+ **A:**
303
+ 1. Open an issue on [GitHub](https://github.com/oktoseek/oktoengine/issues)
304
+ 2. Include:
305
+ - OktoEngine version: `okto --version`
306
+ - System information: `okto doctor`
307
+ - Error messages
308
+ - Steps to reproduce
309
+ - Debug output (if applicable)
310
+
311
+ ---
312
+
313
+ ## Advanced
314
+
315
+ ### Q: Can I customize training behavior?
316
+
317
+ **A:** Yes, through OktoScript configuration:
318
+ - Training parameters (epochs, batch size, learning rate)
319
+ - Optimizer settings
320
+ - Scheduler configuration
321
+ - Checkpoint settings
322
+ - Export formats
323
+
324
+ ### Q: Can I use custom datasets?
325
+
326
+ **A:** Yes! OktoEngine supports multiple dataset formats:
327
+ - JSONL (recommended)
328
+ - CSV
329
+ - TXT
330
+ - Parquet
331
+
332
+ Just specify the path in your DATASET block.
333
+
334
+ ### Q: How do I export to multiple formats?
335
+
336
+ **A:**
337
+ ```okt
338
+ EXPORT {
339
+ format: ["okm", "onnx", "gguf"]
340
+ path: "export/"
341
+ }
342
+ ```
343
+
344
+ ---
345
+
346
+ **Need more help?** Check the [Getting Started Guide](./GETTING_STARTED.md) or [CLI Reference](./CLI_REFERENCE.md).
347
+
docs/GETTING_STARTED.md ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Getting Started with OktoEngine
2
+
3
+ **Your first 5 minutes with OktoEngine** - A quick guide to get you up and running.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - OktoEngine installed (download from [GitHub Releases](https://github.com/oktoseek/oktoengine/releases))
10
+ - Basic understanding of AI/ML concepts
11
+ - A dataset ready for training (optional for first run)
12
+
13
+ ---
14
+
15
+ ## Step 1: Install OktoEngine
16
+
17
+ ### Download Pre-built Binary
18
+
19
+ 1. Visit [GitHub Releases](https://github.com/oktoseek/oktoengine/releases)
20
+ 2. Download the binary for your platform:
21
+ - **Windows:** `okto-windows.exe`
22
+ - **Linux:** `okto-linux`
23
+ - **macOS:** `okto-macos`
24
+ 3. Make it executable (Linux/Mac):
25
+ ```bash
26
+ chmod +x okto-linux
27
+ ```
28
+ 4. Add to PATH (optional but recommended)
29
+
30
+ ### Verify Installation
31
+
32
+ ```bash
33
+ okto --version
34
+ ```
35
+
36
+ Should output: `okto 0.1.0`
37
+
38
+ ---
39
+
40
+ ## Step 2: Check Your System
41
+
42
+ Before starting, check if your system is ready:
43
+
44
+ ```bash
45
+ okto doctor
46
+ ```
47
+
48
+ This will show:
49
+ - ✅ Platform information
50
+ - ✅ RAM and CPU
51
+ - ✅ GPU detection
52
+ - ✅ CUDA availability
53
+ - ✅ Runtime environment
54
+ - ✅ Dependencies status
55
+
56
+ **If dependencies are missing:**
57
+ ```bash
58
+ okto doctor --install
59
+ ```
60
+
61
+ Automatically installs missing dependencies.
62
+
63
+ ---
64
+
65
+ ## Step 3: Create Your First Project
66
+
67
+ Initialize a new OktoScript project:
68
+
69
+ ```bash
70
+ okto init my-first-model
71
+ cd my-first-model
72
+ ```
73
+
74
+ This creates:
75
+ ```
76
+ my-first-model/
77
+ ├── scripts/
78
+ │ └── train.okt # Your training configuration
79
+ ├── dataset/
80
+ │ ├── train.jsonl # Training data (sample)
81
+ │ └── val.jsonl # Validation data (sample)
82
+ └── export/ # Where models will be exported
83
+ ```
84
+
85
+ ---
86
+
87
+ ## Step 4: Prepare Your Dataset
88
+
89
+ Edit `dataset/train.jsonl` with your training data:
90
+
91
+ **dataset/train.jsonl:**
92
+ ```json
93
+ {"input":"Hello","output":"Hi! How can I help you?"}
94
+ {"input":"What's the weather?","output":"I don't have access to weather data."}
95
+ {"input":"Thank you","output":"You're welcome!"}
96
+ ```
97
+
98
+ **Minimum requirements:**
99
+ - At least 10 examples for basic training
100
+ - Consistent format (JSONL recommended)
101
+ - Valid JSON on each line
102
+
103
+ **Supported formats:**
104
+ - JSONL (recommended)
105
+ - CSV
106
+ - TXT
107
+ - Parquet
108
+
109
+ ---
110
+
111
+ ## Step 5: Configure Your Training
112
+
113
+ Edit `scripts/train.okt`:
114
+
115
+ ```okt
116
+ PROJECT "MyFirstModel"
117
+ DESCRIPTION "My first AI model with OktoEngine"
118
+
119
+ ENV {
120
+ accelerator: "gpu"
121
+ min_memory: "8GB"
122
+ precision: "fp16"
123
+ install_missing: true
124
+ }
125
+
126
+ DATASET {
127
+ train: "dataset/train.jsonl"
128
+ validation: "dataset/val.jsonl"
129
+ }
130
+
131
+ MODEL {
132
+ base: "gpt2"
133
+ }
134
+
135
+ TRAIN {
136
+ epochs: 5
137
+ batch_size: 32
138
+ device: "auto"
139
+ }
140
+
141
+ EXPORT {
142
+ format: ["okm"]
143
+ path: "export/"
144
+ }
145
+ ```
146
+
147
+ **Key settings:**
148
+ - `PROJECT` - Your model name
149
+ - `MODEL.base` - Base model (gpt2, distilgpt2, etc.)
150
+ - `TRAIN.epochs` - Number of training epochs
151
+ - `TRAIN.batch_size` - Batch size
152
+ - `TRAIN.device` - "auto" detects GPU/CPU automatically
153
+ - `EXPORT.format` - Output format
154
+
155
+ ---
156
+
157
+ ## Step 6: Validate Your Configuration
158
+
159
+ Before training, validate your configuration:
160
+
161
+ ```bash
162
+ okto validate
163
+ ```
164
+
165
+ **What it checks:**
166
+ - ✅ Syntax is correct
167
+ - ✅ All required fields are present
168
+ - ✅ Dataset files exist
169
+ - ✅ Model paths are valid
170
+ - ✅ Values are within allowed ranges
171
+
172
+ **Example output:**
173
+ ```
174
+ 🐙 OktoEngine v0.1
175
+ 🔍 Validating OktoScript file: "scripts/train.okt"
176
+ 📄 File: "scripts/train.okt"
177
+ 📄 Size: 382 bytes
178
+ 📄 Lines: 31
179
+
180
+ ✔ File parsed successfully
181
+
182
+ 📋 Validation Results:
183
+ ✅ Validation passed! No errors or warnings.
184
+
185
+ 📊 Summary:
186
+ Project: MyFirstModel
187
+ ENV: Configured
188
+ Dataset: dataset/train.jsonl
189
+ Model: gpt2
190
+ Training: 5 epochs, batch size 32
191
+ Export: ["okm"]
192
+ ```
193
+
194
+ **If validation fails:**
195
+ - Check error messages
196
+ - Fix syntax errors
197
+ - Verify file paths
198
+ - Run `okto validate --debug` for detailed logs
199
+
200
+ ---
201
+
202
+ ## Step 7: Train Your Model
203
+
204
+ Start training:
205
+
206
+ ```bash
207
+ okto train
208
+ ```
209
+
210
+ **What happens:**
211
+ 1. ✅ Configuration is parsed and validated
212
+ 2. ✅ System environment is checked
213
+ 3. ✅ Dependencies are verified
214
+ 4. ✅ Dataset is loaded
215
+ 5. ✅ Model is initialized (downloads from HuggingFace if needed)
216
+ 6. ✅ Training loop starts
217
+ 7. ✅ Progress is shown in real-time
218
+ 8. ✅ Model is saved to `runs/MyFirstModel/`
219
+ 9. ✅ Exported models saved to `export/`
220
+
221
+ **Example output:**
222
+ ```
223
+ 🐙 OktoEngine v0.1
224
+ 📄 Reading: "scripts/train.okt"
225
+
226
+ 📊 Environment Check:
227
+ ✔ Runtime: Python 3.14.0
228
+ ✔ GPU: NVIDIA GeForce RTX 4070
229
+ ✔ RAM: 63GB (40GB available)
230
+ ✔ Platform: windows
231
+
232
+ 📦 Checking dependencies...
233
+ ✔ All dependencies available
234
+
235
+ 🚀 Starting training pipeline...
236
+
237
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
238
+ Loss: 2.345 → 1.892
239
+ Learning Rate: 5e-5
240
+ GPU Memory: 8.2GB / 12GB
241
+
242
+ Epoch 2/5: 100%|████████████| 500/500 [02:14<00:00, 3.72it/s]
243
+ Loss: 1.892 → 1.654
244
+
245
+ ...
246
+
247
+ ✅ Training completed successfully!
248
+ 📁 Output: runs/MyFirstModel/
249
+ ```
250
+
251
+ **Training time:**
252
+ - Small models (100M params): 5-15 minutes
253
+ - Medium models (1B params): 30-60 minutes
254
+ - Large models (7B params): Several hours
255
+
256
+ ---
257
+
258
+ ## Step 8: Check Your Results
259
+
260
+ After training completes:
261
+
262
+ **Check training output:**
263
+ ```bash
264
+ ls runs/MyFirstModel/
265
+ ```
266
+
267
+ **Files created:**
268
+ - `checkpoint-*/` - Training checkpoints
269
+ - `training_logs.json` - Detailed training logs
270
+ - `metrics.json` - Training metrics
271
+ - `tokenizer.json` - Tokenizer configuration
272
+
273
+ **Check exported models:**
274
+ ```bash
275
+ ls export/
276
+ ```
277
+
278
+ **Exported files:**
279
+ - `model.okm` - OktoSeek Model format
280
+
281
+ ---
282
+
283
+ ## Step 9: Evaluate Your Model (Optional)
284
+
285
+ Evaluate your trained model:
286
+
287
+ ```bash
288
+ okto eval
289
+ ```
290
+
291
+ **Output:**
292
+ ```
293
+ 🐙 OktoEngine v0.1
294
+ 📊 Evaluating model...
295
+
296
+ 📈 Evaluation Results:
297
+ Accuracy: 0.892
298
+ Loss: 1.234
299
+ Perplexity: 2.456
300
+ F1-Score: 0.876
301
+
302
+ ✅ Evaluation completed!
303
+ ```
304
+
305
+ ---
306
+
307
+ ## Common First Steps
308
+
309
+ ### Using GPU
310
+
311
+ If you have a GPU, OktoEngine will automatically detect and use it. To ensure GPU usage:
312
+
313
+ ```okt
314
+ ENV {
315
+ accelerator: "gpu"
316
+ precision: "fp16"
317
+ }
318
+
319
+ TRAIN {
320
+ device: "auto" # or "cuda" for explicit GPU
321
+ }
322
+ ```
323
+
324
+ ### Adding More Epochs
325
+
326
+ ```okt
327
+ TRAIN {
328
+ epochs: 10 # Increase from 5
329
+ batch_size: 32
330
+ }
331
+ ```
332
+
333
+ ### Exporting to Multiple Formats
334
+
335
+ ```okt
336
+ EXPORT {
337
+ format: ["okm", "onnx", "gguf"]
338
+ path: "export/"
339
+ }
340
+ ```
341
+
342
+ ### Using Debug Mode
343
+
344
+ For detailed logs during training:
345
+
346
+ ```bash
347
+ okto train --debug
348
+ ```
349
+
350
+ Shows:
351
+ - Parsing details
352
+ - Execution flow
353
+ - Error diagnostics
354
+ - Performance metrics
355
+
356
+ ---
357
+
358
+ ## Troubleshooting
359
+
360
+ ### Training Fails
361
+
362
+ **Check system:**
363
+ ```bash
364
+ okto doctor
365
+ ```
366
+
367
+ **Check configuration:**
368
+ ```bash
369
+ okto validate --debug
370
+ ```
371
+
372
+ **Common issues:**
373
+ - **Out of memory:** Reduce `batch_size` in TRAIN block
374
+ - **Model not found:** Check `MODEL.base` is a valid HuggingFace model
375
+ - **Dataset not found:** Verify paths in DATASET block
376
+ - **Dependencies missing:** Run `okto doctor --install`
377
+
378
+ ### Validation Fails
379
+
380
+ **Enable debug mode:**
381
+ ```bash
382
+ okto validate --debug
383
+ ```
384
+
385
+ **Common errors:**
386
+ - Syntax errors - Check OktoScript syntax
387
+ - Missing fields - Add required blocks
388
+ - Invalid paths - Verify file paths exist
389
+ - Invalid values - Check value ranges
390
+
391
+ ### System Issues
392
+
393
+ **Check system:**
394
+ ```bash
395
+ okto doctor
396
+ ```
397
+
398
+ **Install dependencies:**
399
+ ```bash
400
+ okto doctor --install
401
+ ```
402
+
403
+ ---
404
+
405
+ ## Next Steps
406
+
407
+ - 📚 Read the [Complete CLI Reference](./CLI_REFERENCE.md)
408
+ - 🎯 Check out [Examples](../examples/) for advanced use cases
409
+ - 🐛 Learn about [Debug Mode](./DEBUG_GUIDE.md)
410
+ - 💡 Explore [FAQ](./FAQ.md) for common questions
411
+
412
+ ---
413
+
414
+ ## Quick Reference
415
+
416
+ | Task | Command |
417
+ |------|---------|
418
+ | Initialize project | `okto init <name>` |
419
+ | Validate | `okto validate` |
420
+ | Check system | `okto doctor` |
421
+ | Train | `okto train` |
422
+ | Evaluate | `okto eval` |
423
+ | Export | `okto export --format okm` |
424
+ | Debug mode | `okto train --debug` |
425
+ | Upgrade | `okto upgrade` |
426
+
427
+ ---
428
+
429
+ **Need help?** Check the [FAQ](./FAQ.md) or open an issue on [GitHub](https://github.com/oktoseek/oktoengine/issues).
430
+
examples/README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # OktoEngine Examples
2
+
3
+ Complete working examples demonstrating OktoEngine capabilities.
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [Basic Training](#basic-training)
10
+ 2. [LoRA Fine-tuning](#lora-fine-tuning)
11
+ 3. [Chatbot Training](#chatbot-training)
12
+ 4. [Multi-format Export](#multi-format-export)
13
+
14
+ ---
15
+
16
+ ## Basic Training
17
+
18
+ **Location:** [`basic-training/`](./basic-training/)
19
+
20
+ Minimal working example for training a simple model.
21
+
22
+ **Files:**
23
+ - `scripts/train.okt` - Training configuration
24
+ - `dataset/train.jsonl` - Sample training data
25
+ - `dataset/val.jsonl` - Sample validation data
26
+
27
+ **Usage:**
28
+ ```bash
29
+ cd basic-training
30
+ okto validate
31
+ okto train
32
+ ```
33
+
34
+ ---
35
+
36
+ ## LoRA Fine-tuning
37
+
38
+ **Location:** [`lora-training/`](./lora-training/)
39
+
40
+ Example of efficient LoRA fine-tuning for large models.
41
+
42
+ **Files:**
43
+ - `scripts/train.okt` - LoRA configuration
44
+ - `dataset/train.jsonl` - Training data
45
+
46
+ **Usage:**
47
+ ```bash
48
+ cd lora-training
49
+ okto validate
50
+ okto train
51
+ ```
52
+
53
+ ---
54
+
55
+ ## Chatbot Training
56
+
57
+ **Location:** [`chatbot/`](./chatbot/)
58
+
59
+ Complete example for training a conversational AI model.
60
+
61
+ **Files:**
62
+ - `scripts/train.okt` - Chatbot configuration
63
+ - `dataset/train.jsonl` - Conversation data
64
+ - `dataset/val.jsonl` - Validation conversations
65
+
66
+ **Usage:**
67
+ ```bash
68
+ cd chatbot
69
+ okto validate
70
+ okto train
71
+ okto eval
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Multi-format Export
77
+
78
+ **Location:** [`multi-export/`](./multi-export/)
79
+
80
+ Example showing how to export models to multiple formats.
81
+
82
+ **Files:**
83
+ - `scripts/train.okt` - Configuration with multiple export formats
84
+
85
+ **Usage:**
86
+ ```bash
87
+ cd multi-export
88
+ okto train
89
+ okto export --format okm,onnx,gguf
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Running Examples
95
+
96
+ 1. **Navigate to example directory:**
97
+ ```bash
98
+ cd examples/basic-training
99
+ ```
100
+
101
+ 2. **Validate configuration:**
102
+ ```bash
103
+ okto validate
104
+ ```
105
+
106
+ 3. **Train the model:**
107
+ ```bash
108
+ okto train
109
+ ```
110
+
111
+ 4. **Check results:**
112
+ ```bash
113
+ ls runs/
114
+ ls export/
115
+ ```
116
+
117
+ ---
118
+
119
+ ## Customizing Examples
120
+
121
+ All examples can be customized:
122
+
123
+ 1. **Edit `scripts/train.okt`** - Modify training parameters
124
+ 2. **Replace `dataset/*.jsonl`** - Use your own data
125
+ 3. **Adjust `MODEL.base`** - Use different base models
126
+ 4. **Modify `EXPORT.format`** - Change export formats
127
+
128
+ ---
129
+
130
+ ## Example Output
131
+
132
+ **Training output:**
133
+ ```
134
+ 🐙 OktoEngine v0.1
135
+ 📄 Reading: "scripts/train.okt"
136
+
137
+ 📊 Environment Check:
138
+ ✔ Runtime: Python 3.14.0
139
+ ✔ GPU: NVIDIA GeForce RTX 4070
140
+ ✔ RAM: 63GB (40GB available)
141
+
142
+ 🚀 Starting training pipeline...
143
+
144
+ Epoch 1/5: 100%|████████████| 500/500 [02:15<00:00, 3.70it/s]
145
+ Loss: 2.345 → 1.892
146
+
147
+ ✅ Training completed successfully!
148
+ 📁 Output: runs/MyModel/
149
+ ```
150
+
151
+ ---
152
+
153
+ **Need help?** Check the [Getting Started Guide](../docs/GETTING_STARTED.md) or [FAQ](../docs/FAQ.md).
154
+
examples/basic-training/dataset/train.jsonl ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {"input":"Hello","output":"Hi! How can I help you?"}
2
+ {"input":"What's the weather?","output":"I don't have access to weather data."}
3
+ {"input":"Thank you","output":"You're welcome!"}
4
+ {"input":"What can you do?","output":"I can help answer questions and have conversations."}
5
+ {"input":"Tell me a joke","output":"Why did the AI go to school? To improve its learning!"}
6
+
examples/basic-training/dataset/val.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {"input":"Hello there","output":"Hello! How can I assist you?"}
2
+ {"input":"Thanks","output":"You're welcome!"}
3
+
examples/basic-training/scripts/train.okt ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # okto_version: "1.0"
2
+
3
+ PROJECT "BasicModel"
4
+ DESCRIPTION "Basic training example for OktoEngine"
5
+
6
+ ENV {
7
+ accelerator: "gpu"
8
+ min_memory: "8GB"
9
+ precision: "fp16"
10
+ backend: "oktoseek"
11
+ install_missing: true
12
+ }
13
+
14
+ DATASET {
15
+ train: "dataset/train.jsonl"
16
+ validation: "dataset/val.jsonl"
17
+ }
18
+
19
+ MODEL {
20
+ base: "gpt2"
21
+ }
22
+
23
+ TRAIN {
24
+ epochs: 5
25
+ batch_size: 32
26
+ device: "auto"
27
+ }
28
+
29
+ EXPORT {
30
+ format: ["okm"]
31
+ path: "export/"
32
+ }
33
+
examples/lora-training/dataset/train.jsonl ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {"input":"What is AI?","output":"AI, or Artificial Intelligence, is the simulation of human intelligence by machines."}
2
+ {"input":"Explain machine learning","output":"Machine learning is a subset of AI that enables systems to learn from data."}
3
+ {"input":"What is deep learning?","output":"Deep learning uses neural networks with multiple layers to learn complex patterns."}
4
+
examples/lora-training/dataset/val.jsonl ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ {"input":"What is neural network?","output":"A neural network is a computing system inspired by biological neural networks."}
2
+
examples/lora-training/scripts/train.okt ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # okto_version: "1.0"
2
+
3
+ PROJECT "LoRAModel"
4
+ DESCRIPTION "LoRA fine-tuning example for efficient training"
5
+
6
+ ENV {
7
+ accelerator: "gpu"
8
+ min_memory: "8GB"
9
+ precision: "fp16"
10
+ install_missing: true
11
+ }
12
+
13
+ DATASET {
14
+ train: "dataset/train.jsonl"
15
+ validation: "dataset/val.jsonl"
16
+ }
17
+
18
+ MODEL {
19
+ base: "gpt2"
20
+ }
21
+
22
+ TRAIN {
23
+ epochs: 3
24
+ batch_size: 16
25
+ device: "auto"
26
+ learning_rate: 0.00003
27
+ }
28
+
29
+ FT_LORA {
30
+ lora_rank: 8
31
+ lora_alpha: 32
32
+ target_modules: ["q_proj", "v_proj"]
33
+ }
34
+
35
+ EXPORT {
36
+ format: ["safetensors", "okm"]
37
+ path: "export/"
38
+ }
39
+