lemonade-sdk 9.1.1__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.
- lemonade/__init__.py +5 -0
- lemonade/api.py +180 -0
- lemonade/cache.py +92 -0
- lemonade/cli.py +173 -0
- lemonade/common/__init__.py +0 -0
- lemonade/common/build.py +176 -0
- lemonade/common/cli_helpers.py +139 -0
- lemonade/common/exceptions.py +98 -0
- lemonade/common/filesystem.py +368 -0
- lemonade/common/inference_engines.py +408 -0
- lemonade/common/network.py +93 -0
- lemonade/common/printing.py +110 -0
- lemonade/common/status.py +471 -0
- lemonade/common/system_info.py +1411 -0
- lemonade/common/test_helpers.py +28 -0
- lemonade/profilers/__init__.py +1 -0
- lemonade/profilers/agt_power.py +437 -0
- lemonade/profilers/hwinfo_power.py +429 -0
- lemonade/profilers/memory_tracker.py +259 -0
- lemonade/profilers/profiler.py +58 -0
- lemonade/sequence.py +363 -0
- lemonade/state.py +159 -0
- lemonade/tools/__init__.py +1 -0
- lemonade/tools/accuracy.py +432 -0
- lemonade/tools/adapter.py +114 -0
- lemonade/tools/bench.py +302 -0
- lemonade/tools/flm/__init__.py +1 -0
- lemonade/tools/flm/utils.py +305 -0
- lemonade/tools/huggingface/bench.py +187 -0
- lemonade/tools/huggingface/load.py +235 -0
- lemonade/tools/huggingface/utils.py +359 -0
- lemonade/tools/humaneval.py +264 -0
- lemonade/tools/llamacpp/bench.py +255 -0
- lemonade/tools/llamacpp/load.py +222 -0
- lemonade/tools/llamacpp/utils.py +1260 -0
- lemonade/tools/management_tools.py +319 -0
- lemonade/tools/mmlu.py +319 -0
- lemonade/tools/oga/__init__.py +0 -0
- lemonade/tools/oga/bench.py +120 -0
- lemonade/tools/oga/load.py +804 -0
- lemonade/tools/oga/migration.py +403 -0
- lemonade/tools/oga/utils.py +462 -0
- lemonade/tools/perplexity.py +147 -0
- lemonade/tools/prompt.py +263 -0
- lemonade/tools/report/__init__.py +0 -0
- lemonade/tools/report/llm_report.py +203 -0
- lemonade/tools/report/table.py +899 -0
- lemonade/tools/server/__init__.py +0 -0
- lemonade/tools/server/flm.py +133 -0
- lemonade/tools/server/llamacpp.py +320 -0
- lemonade/tools/server/serve.py +2123 -0
- lemonade/tools/server/static/favicon.ico +0 -0
- lemonade/tools/server/static/index.html +279 -0
- lemonade/tools/server/static/js/chat.js +1059 -0
- lemonade/tools/server/static/js/model-settings.js +183 -0
- lemonade/tools/server/static/js/models.js +1395 -0
- lemonade/tools/server/static/js/shared.js +556 -0
- lemonade/tools/server/static/logs.html +191 -0
- lemonade/tools/server/static/styles.css +2654 -0
- lemonade/tools/server/static/webapp.html +321 -0
- lemonade/tools/server/tool_calls.py +153 -0
- lemonade/tools/server/tray.py +664 -0
- lemonade/tools/server/utils/macos_tray.py +226 -0
- lemonade/tools/server/utils/port.py +77 -0
- lemonade/tools/server/utils/thread.py +85 -0
- lemonade/tools/server/utils/windows_tray.py +408 -0
- lemonade/tools/server/webapp.py +34 -0
- lemonade/tools/server/wrapped_server.py +559 -0
- lemonade/tools/tool.py +374 -0
- lemonade/version.py +1 -0
- lemonade_install/__init__.py +1 -0
- lemonade_install/install.py +239 -0
- lemonade_sdk-9.1.1.dist-info/METADATA +276 -0
- lemonade_sdk-9.1.1.dist-info/RECORD +84 -0
- lemonade_sdk-9.1.1.dist-info/WHEEL +5 -0
- lemonade_sdk-9.1.1.dist-info/entry_points.txt +5 -0
- lemonade_sdk-9.1.1.dist-info/licenses/LICENSE +201 -0
- lemonade_sdk-9.1.1.dist-info/licenses/NOTICE.md +47 -0
- lemonade_sdk-9.1.1.dist-info/top_level.txt +3 -0
- lemonade_server/cli.py +805 -0
- lemonade_server/model_manager.py +758 -0
- lemonade_server/pydantic_models.py +159 -0
- lemonade_server/server_models.json +643 -0
- lemonade_server/settings.py +39 -0
|
Binary file
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Lemonade Server</title>
|
|
7
|
+
<style>
|
|
8
|
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600&display=swap');
|
|
9
|
+
|
|
10
|
+
* {
|
|
11
|
+
margin: 0;
|
|
12
|
+
padding: 0;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
body {
|
|
17
|
+
font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
|
|
18
|
+
background: linear-gradient(145deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
|
|
19
|
+
min-height: 100vh;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
color: #e0e0e0;
|
|
24
|
+
padding: 40px 20px;
|
|
25
|
+
position: relative;
|
|
26
|
+
overflow-x: hidden;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
body::before {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: -50%;
|
|
33
|
+
left: -50%;
|
|
34
|
+
width: 200%;
|
|
35
|
+
height: 200%;
|
|
36
|
+
background: radial-gradient(circle at 30% 30%, rgba(255, 220, 0, 0.03) 0%, transparent 40%),
|
|
37
|
+
radial-gradient(circle at 70% 70%, rgba(255, 200, 0, 0.02) 0%, transparent 30%);
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.container {
|
|
42
|
+
max-width: 700px;
|
|
43
|
+
width: 100%;
|
|
44
|
+
text-align: center;
|
|
45
|
+
z-index: 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.logo {
|
|
49
|
+
font-size: 64px;
|
|
50
|
+
margin-bottom: 16px;
|
|
51
|
+
filter: drop-shadow(0 0 30px rgba(255, 220, 0, 0.3));
|
|
52
|
+
animation: float 3s ease-in-out infinite;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes float {
|
|
56
|
+
0%, 100% { transform: translateY(0); }
|
|
57
|
+
50% { transform: translateY(-8px); }
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
h1 {
|
|
61
|
+
font-size: 2.2rem;
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
margin-bottom: 12px;
|
|
64
|
+
background: linear-gradient(135deg, #FFE566 0%, #FFCC00 50%, #FF9500 100%);
|
|
65
|
+
-webkit-background-clip: text;
|
|
66
|
+
-webkit-text-fill-color: transparent;
|
|
67
|
+
background-clip: text;
|
|
68
|
+
letter-spacing: -0.5px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.status {
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: 8px;
|
|
75
|
+
background: rgba(34, 197, 94, 0.1);
|
|
76
|
+
border: 1px solid rgba(34, 197, 94, 0.3);
|
|
77
|
+
padding: 8px 16px;
|
|
78
|
+
border-radius: 20px;
|
|
79
|
+
margin-bottom: 32px;
|
|
80
|
+
font-size: 0.9rem;
|
|
81
|
+
color: #22c55e;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.status-dot {
|
|
85
|
+
width: 8px;
|
|
86
|
+
height: 8px;
|
|
87
|
+
background: #22c55e;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
animation: pulse 2s ease-in-out infinite;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes pulse {
|
|
93
|
+
0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
|
|
94
|
+
50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.card {
|
|
98
|
+
background: rgba(255, 255, 255, 0.03);
|
|
99
|
+
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
100
|
+
border-radius: 16px;
|
|
101
|
+
padding: 24px;
|
|
102
|
+
margin-bottom: 20px;
|
|
103
|
+
backdrop-filter: blur(10px);
|
|
104
|
+
text-align: left;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.card h2 {
|
|
108
|
+
font-size: 1rem;
|
|
109
|
+
font-weight: 500;
|
|
110
|
+
margin-bottom: 16px;
|
|
111
|
+
color: #ffffff;
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: 8px;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.card h2 .icon {
|
|
118
|
+
font-size: 1.1rem;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.code-block {
|
|
122
|
+
background: #0d0d0d;
|
|
123
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
124
|
+
border-radius: 8px;
|
|
125
|
+
padding: 14px 16px;
|
|
126
|
+
font-family: 'JetBrains Mono', monospace;
|
|
127
|
+
font-size: 0.8rem;
|
|
128
|
+
color: #a0a0a0;
|
|
129
|
+
overflow-x: auto;
|
|
130
|
+
margin-bottom: 12px;
|
|
131
|
+
line-height: 1.5;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.code-block:last-child {
|
|
135
|
+
margin-bottom: 0;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.code-block .comment {
|
|
139
|
+
color: #5a5a5a;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.code-block .string {
|
|
143
|
+
color: #98c379;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.code-block .keyword {
|
|
147
|
+
color: #FFCC00;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.code-block code {
|
|
151
|
+
white-space: pre-wrap;
|
|
152
|
+
word-break: break-all;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.copy-btn {
|
|
156
|
+
float: right;
|
|
157
|
+
background: rgba(255, 255, 255, 0.1);
|
|
158
|
+
border: none;
|
|
159
|
+
color: #888;
|
|
160
|
+
padding: 4px 10px;
|
|
161
|
+
border-radius: 4px;
|
|
162
|
+
font-size: 0.7rem;
|
|
163
|
+
cursor: pointer;
|
|
164
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
165
|
+
transition: all 0.2s;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.copy-btn:hover {
|
|
169
|
+
background: rgba(255, 204, 0, 0.2);
|
|
170
|
+
color: #FFCC00;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.footer {
|
|
174
|
+
margin-top: 24px;
|
|
175
|
+
font-size: 0.8rem;
|
|
176
|
+
color: #555;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.footer a {
|
|
180
|
+
color: #888;
|
|
181
|
+
text-decoration: none;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.footer a:hover {
|
|
185
|
+
color: #FFCC00;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.section-desc {
|
|
189
|
+
color: #808080;
|
|
190
|
+
font-size: 0.85rem;
|
|
191
|
+
margin-bottom: 14px;
|
|
192
|
+
line-height: 1.5;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.section-desc code {
|
|
196
|
+
background: rgba(255, 204, 0, 0.15);
|
|
197
|
+
padding: 2px 6px;
|
|
198
|
+
border-radius: 4px;
|
|
199
|
+
font-family: 'JetBrains Mono', monospace;
|
|
200
|
+
font-size: 0.8rem;
|
|
201
|
+
color: #FFCC00;
|
|
202
|
+
}
|
|
203
|
+
</style>
|
|
204
|
+
</head>
|
|
205
|
+
<body>
|
|
206
|
+
<div class="container">
|
|
207
|
+
<div class="logo">๐</div>
|
|
208
|
+
<h1>Lemonade Server</h1>
|
|
209
|
+
<div class="status">
|
|
210
|
+
<span class="status-dot"></span>
|
|
211
|
+
Running on port {{SERVER_PORT}}
|
|
212
|
+
</div>
|
|
213
|
+
|
|
214
|
+
<!-- Quick Start -->
|
|
215
|
+
<div class="card">
|
|
216
|
+
<h2><span class="icon">โก</span> Quick Test</h2>
|
|
217
|
+
<p class="section-desc">Send a chat completion request to verify the server is working:</p>
|
|
218
|
+
<div class="code-block">
|
|
219
|
+
<button class="copy-btn" onclick="copyCode(this)">copy</button>
|
|
220
|
+
<code><span class="comment"># List available models</span>
|
|
221
|
+
curl http://localhost:{{SERVER_PORT}}/api/v1/models</code>
|
|
222
|
+
</div>
|
|
223
|
+
<div class="code-block">
|
|
224
|
+
<button class="copy-btn" onclick="copyCode(this)">copy</button>
|
|
225
|
+
<code><span class="comment"># Chat with a model (replace MODEL_NAME)</span>
|
|
226
|
+
curl -X POST http://localhost:{{SERVER_PORT}}/api/v1/chat/completions \
|
|
227
|
+
-H <span class="string">"Content-Type: application/json"</span> \
|
|
228
|
+
-d <span class="string">'{"model": "MODEL_NAME", "messages": [{"role": "user", "content": "Hello!"}]}'</span></code>
|
|
229
|
+
</div>
|
|
230
|
+
</div>
|
|
231
|
+
|
|
232
|
+
<!-- Desktop App Hint -->
|
|
233
|
+
<div class="card">
|
|
234
|
+
<h2><span class="icon">๐ป</span> Want a GUI?</h2>
|
|
235
|
+
<p class="section-desc" id="gui-hint-windows" style="display: none;">
|
|
236
|
+
If you installed the <strong>full version</strong> of Lemonade, look for the ๐ icon in your system tray to open the desktop app.
|
|
237
|
+
<br><br>
|
|
238
|
+
Using the minimal install? Get the full version from <a href="https://github.com/lemonade-sdk/lemonade">github.com/lemonade-sdk/lemonade</a> for a built-in chat interface and model manager.
|
|
239
|
+
</p>
|
|
240
|
+
<p class="section-desc" id="gui-hint-linux" style="display: none;">
|
|
241
|
+
If you installed the <strong>full version</strong> of Lemonade, launch the UI by running:<br>
|
|
242
|
+
<code>/usr/local/share/lemonade-server/app/lemonade</code>
|
|
243
|
+
<br><br>
|
|
244
|
+
Using the minimal install? Get the full version from <a href="https://github.com/lemonade-sdk/lemonade">github.com/lemonade-sdk/lemonade</a> for a built-in chat interface and model manager.
|
|
245
|
+
</p>
|
|
246
|
+
</div>
|
|
247
|
+
|
|
248
|
+
<div class="footer">
|
|
249
|
+
<a href="https://github.com/lemonade-sdk/lemonade" target="_blank">GitHub</a> ยท
|
|
250
|
+
<a href="https://lemonade-server.ai/docs/" target="_blank">Documentation</a>
|
|
251
|
+
</div>
|
|
252
|
+
</div>
|
|
253
|
+
|
|
254
|
+
<script>
|
|
255
|
+
function copyCode(btn) {
|
|
256
|
+
const codeBlock = btn.parentElement;
|
|
257
|
+
const code = codeBlock.querySelector('code').textContent;
|
|
258
|
+
navigator.clipboard.writeText(code).then(() => {
|
|
259
|
+
btn.textContent = 'copied!';
|
|
260
|
+
setTimeout(() => btn.textContent = 'copy', 1500);
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// Detect platform and show appropriate GUI hint
|
|
265
|
+
(function() {
|
|
266
|
+
const platform = navigator.platform.toLowerCase();
|
|
267
|
+
const isWindows = platform.includes('win');
|
|
268
|
+
const hintWindows = document.getElementById('gui-hint-windows');
|
|
269
|
+
const hintLinux = document.getElementById('gui-hint-linux');
|
|
270
|
+
|
|
271
|
+
if (isWindows) {
|
|
272
|
+
hintWindows.style.display = 'block';
|
|
273
|
+
} else {
|
|
274
|
+
hintLinux.style.display = 'block';
|
|
275
|
+
}
|
|
276
|
+
})();
|
|
277
|
+
</script>
|
|
278
|
+
</body>
|
|
279
|
+
</html>
|