lemonade-sdk 8.0.4__py3-none-any.whl → 8.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lemonade-sdk might be problematic. Click here for more details.
- lemonade/api.py +50 -0
- lemonade/cache.py +3 -1
- lemonade/common/inference_engines.py +415 -0
- lemonade/common/system_info.py +493 -47
- lemonade/tools/adapter.py +6 -0
- lemonade/tools/huggingface/utils.py +6 -5
- lemonade/tools/llamacpp/bench.py +26 -46
- lemonade/tools/llamacpp/load.py +104 -196
- lemonade/tools/llamacpp/utils.py +612 -0
- lemonade/tools/management_tools.py +53 -7
- lemonade/tools/oga/bench.py +5 -6
- lemonade/tools/oga/utils.py +8 -2
- lemonade/tools/prompt.py +17 -25
- lemonade/tools/report/table.py +12 -9
- lemonade/tools/server/llamacpp.py +80 -92
- lemonade/tools/server/serve.py +32 -0
- lemonade/tools/server/static/styles.css +137 -58
- lemonade/tools/server/static/webapp.html +34 -8
- lemonade/tools/server/tray.py +7 -0
- lemonade/version.py +1 -1
- lemonade_sdk-8.0.6.dist-info/METADATA +295 -0
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/RECORD +30 -28
- lemonade_server/cli.py +168 -22
- lemonade_server/model_manager.py +4 -148
- lemonade_server/server_models.json +11 -0
- lemonade_sdk-8.0.4.dist-info/METADATA +0 -176
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/WHEEL +0 -0
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/entry_points.txt +0 -0
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/licenses/LICENSE +0 -0
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/licenses/NOTICE.md +0 -0
- {lemonade_sdk-8.0.4.dist-info → lemonade_sdk-8.0.6.dist-info}/top_level.txt +0 -0
|
@@ -1,33 +1,93 @@
|
|
|
1
|
+
/* === CSS Variables === */
|
|
2
|
+
:root {
|
|
3
|
+
/* Colors */
|
|
4
|
+
--primary-yellow: #ffe066;
|
|
5
|
+
--primary-yellow-dark: #ffd43b;
|
|
6
|
+
--accent-gold: #e6b800;
|
|
7
|
+
--accent-gold-dark: #bfa100;
|
|
8
|
+
|
|
9
|
+
--text-primary: #222;
|
|
10
|
+
--text-secondary: #555;
|
|
11
|
+
--text-muted: #666;
|
|
12
|
+
|
|
13
|
+
--bg-primary: #fffbe9;
|
|
14
|
+
--bg-secondary: #fff8dd;
|
|
15
|
+
--bg-tertiary: #fff5d1;
|
|
16
|
+
|
|
17
|
+
/* Transitions */
|
|
18
|
+
--transition-fast: 0.2s ease;
|
|
19
|
+
--transition-medium: 0.3s ease;
|
|
20
|
+
}
|
|
21
|
+
|
|
1
22
|
body {
|
|
2
23
|
margin: 0;
|
|
3
24
|
font-family: 'Segoe UI', 'Arial', sans-serif;
|
|
4
|
-
background:
|
|
5
|
-
color:
|
|
25
|
+
background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
|
|
26
|
+
color: var(--text-primary);
|
|
6
27
|
min-height: 100vh;
|
|
7
28
|
display: flex;
|
|
8
29
|
flex-direction: column;
|
|
9
30
|
padding-bottom: 5rem;
|
|
10
31
|
}
|
|
11
32
|
|
|
33
|
+
body::before {
|
|
34
|
+
content: '';
|
|
35
|
+
position: fixed;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
width: 100%;
|
|
39
|
+
height: 100%;
|
|
40
|
+
background:
|
|
41
|
+
radial-gradient(circle at 20% 20%, rgba(255, 224, 102, 0.1) 0%, transparent 50%),
|
|
42
|
+
radial-gradient(circle at 80% 80%, rgba(255, 212, 59, 0.1) 0%, transparent 50%);
|
|
43
|
+
pointer-events: none;
|
|
44
|
+
z-index: -1;
|
|
45
|
+
}
|
|
46
|
+
|
|
12
47
|
.navbar {
|
|
13
48
|
display: flex;
|
|
14
|
-
justify-content:
|
|
15
|
-
|
|
16
|
-
padding:
|
|
49
|
+
justify-content: space-between;
|
|
50
|
+
align-items: center;
|
|
51
|
+
padding: 1rem 3rem 0.5rem 1rem;
|
|
17
52
|
font-size: 1.25rem;
|
|
18
53
|
font-weight: 500;
|
|
19
54
|
background: transparent;
|
|
20
55
|
letter-spacing: 0.02em;
|
|
56
|
+
position: relative;
|
|
57
|
+
transition: var(--transition-medium);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.navbar-brand {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.brand-title {
|
|
66
|
+
font-size: 1.5rem;
|
|
67
|
+
font-weight: 700;
|
|
68
|
+
color: var(--text-primary);
|
|
69
|
+
text-decoration: none;
|
|
70
|
+
letter-spacing: 0.01em;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.brand-title a {
|
|
74
|
+
color: inherit;
|
|
75
|
+
text-decoration: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.navbar-links {
|
|
79
|
+
display: flex;
|
|
80
|
+
gap: 2.5rem;
|
|
21
81
|
}
|
|
22
82
|
|
|
23
|
-
.navbar a {
|
|
83
|
+
.navbar-links a {
|
|
24
84
|
color: #444;
|
|
25
85
|
text-decoration: none;
|
|
26
|
-
transition:
|
|
86
|
+
transition: var(--transition-fast);
|
|
27
87
|
}
|
|
28
88
|
|
|
29
|
-
.navbar a:hover {
|
|
30
|
-
color:
|
|
89
|
+
.navbar-links a:hover {
|
|
90
|
+
color: var(--accent-gold);
|
|
31
91
|
}
|
|
32
92
|
|
|
33
93
|
.main {
|
|
@@ -37,16 +97,8 @@ body {
|
|
|
37
97
|
align-items: center;
|
|
38
98
|
justify-content: flex-start;
|
|
39
99
|
min-height: 60vh;
|
|
40
|
-
margin-top:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
.title {
|
|
44
|
-
font-size: 3rem;
|
|
45
|
-
font-weight: 700;
|
|
46
|
-
margin-bottom: 2.5rem;
|
|
47
|
-
letter-spacing: 0.01em;
|
|
48
|
-
text-align: center;
|
|
49
|
-
color: #222;
|
|
100
|
+
margin-top: 2rem;
|
|
101
|
+
padding-top: 1rem;
|
|
50
102
|
}
|
|
51
103
|
|
|
52
104
|
.site-footer {
|
|
@@ -54,7 +106,7 @@ body {
|
|
|
54
106
|
left: 0;
|
|
55
107
|
bottom: 0;
|
|
56
108
|
width: 100%;
|
|
57
|
-
background
|
|
109
|
+
background: transparent;
|
|
58
110
|
padding-top: 0.5rem;
|
|
59
111
|
z-index: 100;
|
|
60
112
|
}
|
|
@@ -90,7 +142,10 @@ body {
|
|
|
90
142
|
border-radius: 8px;
|
|
91
143
|
border: 1px solid #e0e0e0;
|
|
92
144
|
max-width: 1000px;
|
|
93
|
-
width:
|
|
145
|
+
min-width: 320px;
|
|
146
|
+
width: calc(100% - 2rem); /* Responsive width with margin */
|
|
147
|
+
margin-left: 1rem;
|
|
148
|
+
margin-right: 1rem;
|
|
94
149
|
}
|
|
95
150
|
|
|
96
151
|
.tabs {
|
|
@@ -130,8 +185,11 @@ body {
|
|
|
130
185
|
.chat-container {
|
|
131
186
|
display: flex;
|
|
132
187
|
flex-direction: column;
|
|
133
|
-
height:
|
|
188
|
+
height: calc(100vh - 650px); /* Subtract space for navbar, title, wall of logos, etc */
|
|
189
|
+
min-height: 300px;
|
|
190
|
+
max-height: 1200px;
|
|
134
191
|
max-width: 800px;
|
|
192
|
+
width: 100%;
|
|
135
193
|
margin: 0 auto;
|
|
136
194
|
border: 1px solid #e0e0e0;
|
|
137
195
|
border-radius: 8px;
|
|
@@ -638,6 +696,7 @@ body {
|
|
|
638
696
|
border-radius: 6px;
|
|
639
697
|
overflow: hidden;
|
|
640
698
|
transition: box-shadow 0.2s ease;
|
|
699
|
+
min-width: 0;
|
|
641
700
|
}
|
|
642
701
|
|
|
643
702
|
.register-model-name-group:focus-within {
|
|
@@ -686,6 +745,8 @@ body {
|
|
|
686
745
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
687
746
|
outline: none;
|
|
688
747
|
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
|
748
|
+
box-sizing: border-box;
|
|
749
|
+
min-width: 0;
|
|
689
750
|
}
|
|
690
751
|
|
|
691
752
|
#register-model-name:focus {
|
|
@@ -709,6 +770,7 @@ body {
|
|
|
709
770
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
710
771
|
outline: none;
|
|
711
772
|
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
|
773
|
+
box-sizing: border-box;
|
|
712
774
|
}
|
|
713
775
|
|
|
714
776
|
#register-recipe:focus {
|
|
@@ -748,6 +810,8 @@ body {
|
|
|
748
810
|
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
749
811
|
outline: none;
|
|
750
812
|
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
|
|
813
|
+
box-sizing: border-box;
|
|
814
|
+
min-width: 0;
|
|
751
815
|
}
|
|
752
816
|
|
|
753
817
|
#register-mmproj:focus, #register-checkpoint:focus {
|
|
@@ -930,6 +994,18 @@ body {
|
|
|
930
994
|
transform: translateX(0) translateY(-2px) !important;
|
|
931
995
|
}
|
|
932
996
|
|
|
997
|
+
@media (max-width: 800px) {
|
|
998
|
+
.model-mgmt-container {
|
|
999
|
+
flex-direction: column;
|
|
1000
|
+
gap: 1.5em;
|
|
1001
|
+
}
|
|
1002
|
+
|
|
1003
|
+
.model-mgmt-pane {
|
|
1004
|
+
flex: none;
|
|
1005
|
+
width: 100%;
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
|
|
933
1009
|
@media (max-width: 600px) {
|
|
934
1010
|
.title {
|
|
935
1011
|
font-size: 2rem;
|
|
@@ -942,61 +1018,64 @@ body {
|
|
|
942
1018
|
margin-top: 1rem;
|
|
943
1019
|
}
|
|
944
1020
|
.model-mgmt-container {
|
|
945
|
-
flex-direction: column;
|
|
946
1021
|
gap: 1em;
|
|
947
1022
|
}
|
|
1023
|
+
|
|
1024
|
+
.tab-container {
|
|
1025
|
+
margin-left: 0.5rem;
|
|
1026
|
+
margin-right: 0.5rem;
|
|
1027
|
+
width: calc(100% - 1rem);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
/* Ensure all input fields are properly constrained on very narrow screens */
|
|
1031
|
+
#register-model-name, #register-mmproj, #register-checkpoint, #register-recipe {
|
|
1032
|
+
max-width: 100%;
|
|
1033
|
+
overflow: hidden;
|
|
1034
|
+
text-overflow: ellipsis;
|
|
1035
|
+
}
|
|
948
1036
|
}
|
|
949
1037
|
|
|
1038
|
+
/* === Responsive Navbar === */
|
|
950
1039
|
@media (max-width: 800px) {
|
|
951
|
-
.
|
|
952
|
-
padding: 1.2em 1em 1em 1em;
|
|
953
|
-
margin: 0 1em 1.5em 1em;
|
|
954
|
-
}
|
|
955
|
-
|
|
956
|
-
.register-form-row {
|
|
1040
|
+
.navbar {
|
|
957
1041
|
flex-direction: column;
|
|
958
|
-
|
|
959
|
-
|
|
1042
|
+
gap: 1rem;
|
|
1043
|
+
padding: 1rem 1rem 0.5rem 1rem;
|
|
1044
|
+
align-items: center;
|
|
960
1045
|
}
|
|
961
1046
|
|
|
962
|
-
.
|
|
963
|
-
|
|
964
|
-
font-size: 0.9em;
|
|
1047
|
+
.navbar-brand {
|
|
1048
|
+
margin-bottom: 0.5rem;
|
|
965
1049
|
}
|
|
966
1050
|
|
|
967
|
-
.
|
|
968
|
-
|
|
969
|
-
margin-top: 0.5em;
|
|
970
|
-
justify-content: flex-start;
|
|
1051
|
+
.brand-title {
|
|
1052
|
+
font-size: 1.3rem;
|
|
971
1053
|
}
|
|
972
1054
|
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
1055
|
+
.navbar-links {
|
|
1056
|
+
gap: 1.5rem;
|
|
1057
|
+
font-size: 1rem;
|
|
976
1058
|
}
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
@media (max-width: 600px) {
|
|
1062
|
+
.navbar {
|
|
1063
|
+
padding: 0.5rem 0.5rem 0.25rem 0.5rem;
|
|
981
1064
|
}
|
|
982
1065
|
|
|
983
|
-
.
|
|
984
|
-
|
|
985
|
-
margin-top: 0.5em;
|
|
986
|
-
align-self: flex-start;
|
|
1066
|
+
.brand-title {
|
|
1067
|
+
font-size: 1.2rem;
|
|
987
1068
|
}
|
|
988
1069
|
|
|
989
|
-
.
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
align-items: center;
|
|
1070
|
+
.navbar-links {
|
|
1071
|
+
gap: 1rem;
|
|
1072
|
+
font-size: 0.9rem;
|
|
993
1073
|
flex-wrap: wrap;
|
|
994
|
-
|
|
1074
|
+
justify-content: center;
|
|
995
1075
|
}
|
|
996
1076
|
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
font-size: 0.9em;
|
|
1077
|
+
.main {
|
|
1078
|
+
margin-top: 0.5rem;
|
|
1000
1079
|
}
|
|
1001
1080
|
}
|
|
1002
1081
|
|
|
@@ -1141,7 +1220,7 @@ body {
|
|
|
1141
1220
|
display: none;
|
|
1142
1221
|
}
|
|
1143
1222
|
|
|
1144
|
-
@media (max-width:
|
|
1223
|
+
@media (max-width: 800px) {
|
|
1145
1224
|
.app-logos-grid {
|
|
1146
1225
|
gap: 0.5rem;
|
|
1147
1226
|
padding: 0 0.5rem;
|
|
@@ -12,14 +12,19 @@
|
|
|
12
12
|
{{SERVER_MODELS_JS}}
|
|
13
13
|
</head>
|
|
14
14
|
<body>
|
|
15
|
-
<nav class="navbar">
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
15
|
+
<nav class="navbar" id="navbar">
|
|
16
|
+
<div class="navbar-brand">
|
|
17
|
+
<span class="brand-title"><a href="https://lemonade-server.ai">🍋 Lemonade Server</a></span>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="navbar-links">
|
|
20
|
+
<a href="https://github.com/lemonade-sdk/lemonade" target="_blank">GitHub</a>
|
|
21
|
+
<a href="https://lemonade-server.ai/docs/" target="_blank">Docs</a>
|
|
22
|
+
<a href="https://lemonade-server.ai/docs/server/server_models/" target="_blank">Models</a>
|
|
23
|
+
<a href="https://lemonade-server.ai/docs/server/apps/" target="_blank">Featured Apps</a>
|
|
24
|
+
<a href="https://lemonade-server.ai/news/" target="_blank">News</a>
|
|
25
|
+
</div>
|
|
20
26
|
</nav>
|
|
21
27
|
<main class="main">
|
|
22
|
-
<div class="title">🍋 Lemonade Server</div>
|
|
23
28
|
<div class="tab-container">
|
|
24
29
|
<div class="tabs">
|
|
25
30
|
<button class="tab active" id="tab-chat" onclick="showTab('chat')">LLM Chat</button>
|
|
@@ -327,7 +332,11 @@
|
|
|
327
332
|
let filteredModels = [];
|
|
328
333
|
let defaultIndex = 0;
|
|
329
334
|
|
|
330
|
-
|
|
335
|
+
// Check if model is specified in URL parameters
|
|
336
|
+
const urlModel = new URLSearchParams(window.location.search).get('model');
|
|
337
|
+
let urlModelIndex = -1;
|
|
338
|
+
|
|
339
|
+
data.data.forEach(function(model, index) {
|
|
331
340
|
const modelId = model.id || model.name || model;
|
|
332
341
|
const modelInfo = allModels[modelId] || {};
|
|
333
342
|
const labels = modelInfo.labels || [];
|
|
@@ -341,9 +350,17 @@
|
|
|
341
350
|
const opt = document.createElement('option');
|
|
342
351
|
opt.value = modelId;
|
|
343
352
|
opt.textContent = modelId;
|
|
353
|
+
|
|
354
|
+
// Check if this model matches the URL parameter
|
|
355
|
+
if (urlModel && modelId === urlModel) {
|
|
356
|
+
urlModelIndex = filteredModels.length - 1;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// Default fallback for backwards compatibility
|
|
344
360
|
if (modelId === 'Llama-3.2-1B-Instruct-Hybrid') {
|
|
345
361
|
defaultIndex = filteredModels.length - 1;
|
|
346
362
|
}
|
|
363
|
+
|
|
347
364
|
select.appendChild(opt);
|
|
348
365
|
});
|
|
349
366
|
|
|
@@ -352,7 +369,16 @@
|
|
|
352
369
|
return;
|
|
353
370
|
}
|
|
354
371
|
|
|
355
|
-
|
|
372
|
+
// Select the URL-specified model if found, otherwise use default
|
|
373
|
+
if (urlModelIndex !== -1) {
|
|
374
|
+
select.selectedIndex = urlModelIndex;
|
|
375
|
+
console.log(`Selected model from URL parameter: ${urlModel}`);
|
|
376
|
+
} else {
|
|
377
|
+
select.selectedIndex = defaultIndex;
|
|
378
|
+
if (urlModel) {
|
|
379
|
+
console.warn(`Model '${urlModel}' specified in URL not found in available models`);
|
|
380
|
+
}
|
|
381
|
+
}
|
|
356
382
|
} catch (e) {
|
|
357
383
|
const select = document.getElementById('model-select');
|
|
358
384
|
select.innerHTML = `<option>Error loading models: ${e.message}</option>`;
|
lemonade/tools/server/tray.py
CHANGED
|
@@ -87,8 +87,15 @@ class LemonadeTray(SystemTray):
|
|
|
87
87
|
Update the latest version information.
|
|
88
88
|
"""
|
|
89
89
|
try:
|
|
90
|
+
# Prepare headers for GitHub API request
|
|
91
|
+
headers = {}
|
|
92
|
+
github_token = os.environ.get("GITHUB_TOKEN")
|
|
93
|
+
if github_token:
|
|
94
|
+
headers["Authorization"] = f"token {github_token}"
|
|
95
|
+
|
|
90
96
|
response = requests.get(
|
|
91
97
|
"https://api.github.com/repos/lemonade-sdk/lemonade/releases/latest",
|
|
98
|
+
headers=headers,
|
|
92
99
|
timeout=10, # Add timeout to prevent hanging
|
|
93
100
|
)
|
|
94
101
|
response.raise_for_status()
|
lemonade/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "8.0.
|
|
1
|
+
__version__ = "8.0.6"
|