Skip to content

Commit 9f57887

Browse files
Merge pull request #43 from drunkenbot-ai/develop
Develop
2 parents afbfaec + 8adfb07 commit 9f57887

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ jobs:
4545
python -m pip install --upgrade pip
4646
python -m pip install -r requirements.txt
4747
python -m pip install pyinstaller
48+
python -m pip install Pillow
4849
4950
- name: Build installer
5051
run: python packager.py

interface/tabs/dataset_tab.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from PySide6.QtCore import Qt
66
from PySide6.QtWidgets import (
7+
QApplication,
78
QCheckBox,
89
QComboBox,
910
QFormLayout,
@@ -111,7 +112,8 @@ def build_dataset_tab(window) -> QWidget:
111112
window._tip(window.auto_vocab_label, "The actual vocabulary size selected after reading the corpus.")
112113
window.min_frequency = window._spin(1, 1000, 2)
113114
window._tip(window.min_frequency, "Minimum token frequency for tokenizer training. Higher values remove rare fragments and can reduce noise.")
114-
window.context_length = window._spin(16, 1000, 128)
115+
context_max = 1000 if not bool(QApplication.instance().property("license_valid")) else 1_000_000
116+
window.context_length = window._spin(16, context_max, 128)
115117
window._tip(window.context_length, "Number of tokens per training sequence. Longer context lets the model learn longer dependencies but uses more memory.")
116118
window.validation_split = window._double_spin(0.0, 0.5, 0.1, 0.01, 3)
117119
window._tip(window.validation_split, "Fraction of tokens held out for validation. Validation helps detect overfitting during training.")

interface/tabs/training_tab.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from PySide6.QtCore import Qt, QTimer
66
from PySide6.QtWidgets import (
7+
QApplication,
78
QCheckBox,
89
QComboBox,
910
QFormLayout,
@@ -113,7 +114,8 @@ def build_training_tab(window) -> QWidget:
113114
window._tip(window.attention_window, "Sliding attention window. 0 uses full context; higher values restrict attention to recent tokens.")
114115
window.n_layer = window._spin(1, 64, 4)
115116
window._tip(window.n_layer, "Transformer layer count. More layers improve capacity and reasoning patterns but slow training.")
116-
window.train_context_length = window._spin(16, 1000, 128)
117+
context_max = 1000 if not bool(QApplication.instance().property("license_valid")) else 1_000_000
118+
window.train_context_length = window._spin(16, context_max, 128)
117119
window._tip(window.train_context_length, "Training context length in tokens. Must fit your GPU/CPU memory.")
118120
window.dropout = window._double_spin(0.0, 0.9, 0.1, 0.01, 3)
119121
window._tip(window.dropout, "Dropout regularization. Higher values reduce overfitting but can slow learning.")

packager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ def _prepare_icon(work_dir: Path) -> Path | None:
5555
from PIL import Image
5656
Image.open(source).convert("RGBA").save(icon, format="ICO", sizes=[(256, 256), (128, 128), (64, 64), (32, 32), (16, 16)])
5757
except ImportError:
58-
return None
58+
bundled_icon = ROOT / "interface" / "drunkenbot_llm_ide.ico"
59+
if bundled_icon.exists():
60+
shutil.copy2(bundled_icon, icon)
61+
else:
62+
return None
5963
return icon
6064

6165

0 commit comments

Comments
 (0)