lemonade-sdk 8.1.6__py3-none-any.whl → 8.1.8__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/cli.py +0 -4
- lemonade/tools/report/table.py +1 -1
- lemonade/tools/server/llamacpp.py +16 -1
- lemonade/tools/server/serve.py +39 -9
- lemonade/tools/server/static/js/chat.js +79 -15
- lemonade/tools/server/static/js/models.js +11 -0
- lemonade/tools/server/static/js/shared.js +11 -3
- lemonade/tools/server/static/styles.css +31 -7
- lemonade/tools/server/static/webapp.html +4 -4
- lemonade/tools/server/wrapped_server.py +8 -0
- lemonade/version.py +1 -1
- lemonade_install/install.py +15 -49
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/METADATA +15 -63
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/RECORD +21 -24
- lemonade_server/cli.py +12 -9
- lemonade_server/model_manager.py +10 -9
- lemonade/tools/quark/__init__.py +0 -0
- lemonade/tools/quark/quark_load.py +0 -173
- lemonade/tools/quark/quark_quantize.py +0 -439
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/WHEEL +0 -0
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/entry_points.txt +0 -0
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/licenses/LICENSE +0 -0
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/licenses/NOTICE.md +0 -0
- {lemonade_sdk-8.1.6.dist-info → lemonade_sdk-8.1.8.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: lemonade-sdk
|
|
3
|
-
Version: 8.1.
|
|
3
|
+
Version: 8.1.8
|
|
4
4
|
Summary: Lemonade SDK: Your LLM Aide for Validation and Deployment
|
|
5
5
|
Author-email: lemonade@amd.com
|
|
6
6
|
Requires-Python: >=3.10, <3.14
|
|
@@ -45,42 +45,6 @@ Requires-Dist: human-eval-windows==1.0.4; extra == "dev"
|
|
|
45
45
|
Requires-Dist: lm-eval[api]; extra == "dev"
|
|
46
46
|
Provides-Extra: model-generate
|
|
47
47
|
Requires-Dist: model-generate==1.5.0; (platform_system == "Windows" and python_version == "3.10") and extra == "model-generate"
|
|
48
|
-
Provides-Extra: oga-hybrid
|
|
49
|
-
Requires-Dist: lemonade-sdk[oga-ryzenai]; extra == "oga-hybrid"
|
|
50
|
-
Provides-Extra: oga-unified
|
|
51
|
-
Requires-Dist: lemonade-sdk[oga-ryzenai]; extra == "oga-unified"
|
|
52
|
-
Provides-Extra: oga-hybrid-minimal
|
|
53
|
-
Requires-Dist: lemonade-sdk[oga-ryzenai]; extra == "oga-hybrid-minimal"
|
|
54
|
-
Provides-Extra: oga-cpu-minimal
|
|
55
|
-
Requires-Dist: lemonade-sdk[oga-cpu]; extra == "oga-cpu-minimal"
|
|
56
|
-
Provides-Extra: oga-npu-minimal
|
|
57
|
-
Requires-Dist: lemonade-sdk[oga-ryzenai]; extra == "oga-npu-minimal"
|
|
58
|
-
Provides-Extra: llm
|
|
59
|
-
Requires-Dist: lemonade-sdk[dev]; extra == "llm"
|
|
60
|
-
Provides-Extra: llm-oga-cpu
|
|
61
|
-
Requires-Dist: lemonade-sdk[dev,oga-cpu]; extra == "llm-oga-cpu"
|
|
62
|
-
Provides-Extra: llm-oga-npu
|
|
63
|
-
Requires-Dist: onnx==1.16.0; extra == "llm-oga-npu"
|
|
64
|
-
Requires-Dist: onnxruntime==1.18.0; extra == "llm-oga-npu"
|
|
65
|
-
Requires-Dist: numpy==1.26.4; extra == "llm-oga-npu"
|
|
66
|
-
Requires-Dist: protobuf>=6.30.1; extra == "llm-oga-npu"
|
|
67
|
-
Requires-Dist: lemonade-sdk[dev]; extra == "llm-oga-npu"
|
|
68
|
-
Provides-Extra: llm-oga-hybrid
|
|
69
|
-
Requires-Dist: onnx==1.16.1; extra == "llm-oga-hybrid"
|
|
70
|
-
Requires-Dist: numpy==1.26.4; extra == "llm-oga-hybrid"
|
|
71
|
-
Requires-Dist: protobuf>=6.30.1; extra == "llm-oga-hybrid"
|
|
72
|
-
Provides-Extra: llm-oga-unified
|
|
73
|
-
Requires-Dist: lemonade-sdk[dev,llm-oga-hybrid]; extra == "llm-oga-unified"
|
|
74
|
-
Provides-Extra: llm-oga-igpu
|
|
75
|
-
Requires-Dist: onnxruntime-genai-directml==0.6.0; extra == "llm-oga-igpu"
|
|
76
|
-
Requires-Dist: onnxruntime-directml<1.22.0,>=1.19.0; extra == "llm-oga-igpu"
|
|
77
|
-
Requires-Dist: transformers<4.45.0; extra == "llm-oga-igpu"
|
|
78
|
-
Requires-Dist: lemonade-sdk[dev]; extra == "llm-oga-igpu"
|
|
79
|
-
Provides-Extra: llm-oga-cuda
|
|
80
|
-
Requires-Dist: onnxruntime-genai-cuda==0.8.2; extra == "llm-oga-cuda"
|
|
81
|
-
Requires-Dist: onnxruntime-gpu>=1.22.0; extra == "llm-oga-cuda"
|
|
82
|
-
Requires-Dist: transformers<=4.51.3; extra == "llm-oga-cuda"
|
|
83
|
-
Requires-Dist: lemonade-sdk[dev]; extra == "llm-oga-cuda"
|
|
84
48
|
Dynamic: author-email
|
|
85
49
|
Dynamic: description
|
|
86
50
|
Dynamic: description-content-type
|
|
@@ -94,41 +58,29 @@ Dynamic: summary
|
|
|
94
58
|
|
|
95
59
|
<p align="center">
|
|
96
60
|
<a href="https://discord.gg/5xXzkMu8Zk">
|
|
97
|
-
<img src="https://img.shields.io/badge/Discord-7289DA?logo=discord&logoColor=white" alt="Discord"
|
|
98
|
-
</a>
|
|
61
|
+
<img src="https://img.shields.io/badge/Discord-7289DA?logo=discord&logoColor=white" alt="Discord" /></a>
|
|
99
62
|
<a href="https://github.com/lemonade-sdk/lemonade/tree/main/test" title="Check out our tests">
|
|
100
|
-
<img src="https://github.com/lemonade-sdk/lemonade/actions/workflows/test_lemonade.yml/badge.svg" alt="Lemonade tests"
|
|
101
|
-
</a>
|
|
63
|
+
<img src="https://github.com/lemonade-sdk/lemonade/actions/workflows/test_lemonade.yml/badge.svg" alt="Lemonade tests" /></a>
|
|
102
64
|
<a href="docs/README.md#installation" title="Check out our instructions">
|
|
103
|
-
<img src="https://img.shields.io/badge/Windows-11-0078D6?logo=windows&logoColor=white" alt="Windows 11"
|
|
104
|
-
</a>
|
|
65
|
+
<img src="https://img.shields.io/badge/Windows-11-0078D6?logo=windows&logoColor=white" alt="Windows 11" /></a>
|
|
105
66
|
<a href="https://lemonade-server.ai/#linux" title="Ubuntu 24.04 & 25.04 Supported">
|
|
106
|
-
<img src="https://img.shields.io/badge/Ubuntu-24.04%20%7C%2025.04-E95420?logo=ubuntu&logoColor=white" alt="Ubuntu 24.04 | 25.04"
|
|
107
|
-
</a>
|
|
67
|
+
<img src="https://img.shields.io/badge/Ubuntu-24.04%20%7C%2025.04-E95420?logo=ubuntu&logoColor=white" alt="Ubuntu 24.04 | 25.04" /></a>
|
|
108
68
|
<a href="docs/README.md#installation" title="Check out our instructions">
|
|
109
|
-
<img src="https://img.shields.io/badge/Python-3.10--3.13-blue?logo=python&logoColor=white" alt="Made with Python"
|
|
110
|
-
</a>
|
|
69
|
+
<img src="https://img.shields.io/badge/Python-3.10--3.13-blue?logo=python&logoColor=white" alt="Made with Python" /></a>
|
|
111
70
|
<a href="https://github.com/lemonade-sdk/lemonade/blob/main/docs/contribute.md" title="Contribution Guide">
|
|
112
|
-
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome"
|
|
113
|
-
</a>
|
|
71
|
+
<img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg" alt="PRs Welcome" /></a>
|
|
114
72
|
<a href="https://github.com/lemonade-sdk/lemonade/releases/latest" title="Download the latest release">
|
|
115
|
-
<img src="https://img.shields.io/github/v/release/lemonade-sdk/lemonade?include_prereleases" alt="Latest Release"
|
|
116
|
-
</a>
|
|
73
|
+
<img src="https://img.shields.io/github/v/release/lemonade-sdk/lemonade?include_prereleases" alt="Latest Release" /></a>
|
|
117
74
|
<a href="https://tooomm.github.io/github-release-stats/?username=lemonade-sdk&repository=lemonade">
|
|
118
|
-
<img src="https://img.shields.io/github/downloads/lemonade-sdk/lemonade/total.svg" alt="GitHub downloads"
|
|
119
|
-
</a>
|
|
75
|
+
<img src="https://img.shields.io/github/downloads/lemonade-sdk/lemonade/total.svg" alt="GitHub downloads" /></a>
|
|
120
76
|
<a href="https://github.com/lemonade-sdk/lemonade/issues">
|
|
121
|
-
<img src="https://img.shields.io/github/issues/lemonade-sdk/lemonade" alt="GitHub issues"
|
|
122
|
-
</a>
|
|
77
|
+
<img src="https://img.shields.io/github/issues/lemonade-sdk/lemonade" alt="GitHub issues" /></a>
|
|
123
78
|
<a href="https://github.com/lemonade-sdk/lemonade/blob/main/LICENSE">
|
|
124
|
-
<img src="https://img.shields.io/badge/License-Apache-yellow.svg" alt="License: Apache"
|
|
125
|
-
</a>
|
|
79
|
+
<img src="https://img.shields.io/badge/License-Apache-yellow.svg" alt="License: Apache" /></a>
|
|
126
80
|
<a href="https://github.com/psf/black">
|
|
127
|
-
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"
|
|
128
|
-
</a>
|
|
81
|
+
<img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black" /></a>
|
|
129
82
|
<a href="https://star-history.com/#lemonade-sdk/lemonade">
|
|
130
|
-
<img src="https://img.shields.io/badge/Star%20History-View-brightgreen" alt="Star History Chart"
|
|
131
|
-
</a>
|
|
83
|
+
<img src="https://img.shields.io/badge/Star%20History-View-brightgreen" alt="Star History Chart" /></a>
|
|
132
84
|
</p>
|
|
133
85
|
<p align="center">
|
|
134
86
|
<img src="https://github.com/lemonade-sdk/assets/blob/main/docs/banner.png?raw=true" alt="Lemonade Banner" />
|
|
@@ -156,7 +108,7 @@ Startups such as [Styrk AI](https://styrk.ai/styrk-ai-and-amd-guardrails-for-you
|
|
|
156
108
|
### Use it with your favorite OpenAI-compatible app!
|
|
157
109
|
|
|
158
110
|
<p align="center">
|
|
159
|
-
<a href="https://lemonade-server.ai/docs/server/apps/open-webui/" title="Open WebUI" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/openwebui.jpg" alt="Open WebUI" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/continue/" title="Continue" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/continue_dev.png" alt="Continue" width="60" /></a> <a href="https://github.com/amd/gaia" title="Gaia" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/gaia.ico" alt="Gaia" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/anythingLLM/" title="AnythingLLM" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/anything_llm.png" alt="AnythingLLM" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/ai-dev-gallery/" title="AI Dev Gallery" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/ai_dev_gallery.webp" alt="AI Dev Gallery" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/lm-eval/" title="LM-Eval" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/lm_eval.png" alt="LM-Eval" width="60" /></a> <a href="https://lemonade-
|
|
111
|
+
<a href="https://lemonade-server.ai/docs/server/apps/open-webui/" title="Open WebUI" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/openwebui.jpg" alt="Open WebUI" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/continue/" title="Continue" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/continue_dev.png" alt="Continue" width="60" /></a> <a href="https://github.com/amd/gaia" title="Gaia" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/gaia.ico" alt="Gaia" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/anythingLLM/" title="AnythingLLM" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/anything_llm.png" alt="AnythingLLM" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/ai-dev-gallery/" title="AI Dev Gallery" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/ai_dev_gallery.webp" alt="AI Dev Gallery" width="60" /></a> <a href="https://lemonade-server.ai/docs/server/apps/lm-eval/" title="LM-Eval" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/lm_eval.png" alt="LM-Eval" width="60" /></a> <a href="https://github.com/lemonade-sdk/lemonade-arcade" title="Lemonade Arcade" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/lemonade-arcade/refs/heads/main/docs/assets/favicon.ico" alt="Lemonade Arcade" width="60" /></a> <a href="https://github.com/lemonade-sdk/lemonade/blob/main/docs/server/apps/ai-toolkit.md" title="AI Toolkit" target="_blank"><img src="https://raw.githubusercontent.com/lemonade-sdk/assets/refs/heads/main/partner_logos/ai_toolkit.png" alt="AI Toolkit" width="60" /></a>
|
|
160
112
|
</p>
|
|
161
113
|
|
|
162
114
|
> [!TIP]
|
|
@@ -227,7 +179,7 @@ Lemonade supports the following configurations, while also making it easy to swi
|
|
|
227
179
|
</tr>
|
|
228
180
|
<tr>
|
|
229
181
|
<td><b>gfx120X</b> (RDNA4)</td>
|
|
230
|
-
<td>Windows
|
|
182
|
+
<td>Windows, Ubuntu</td>
|
|
231
183
|
<td>Radeon AI PRO R9700, RX 9070 XT/GRE/9070, RX 9060 XT</td>
|
|
232
184
|
</tr>
|
|
233
185
|
<tr>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
lemonade/__init__.py,sha256=W1Qk7r0rnQqFhPNHp6BIBT_q-OH3s-8Q_POoVfAmKW0,117
|
|
2
2
|
lemonade/api.py,sha256=Oc4yBA3LZg8FrTsbuDq1p9-XE74pqNnIEUhXyKa7qg8,5786
|
|
3
3
|
lemonade/cache.py,sha256=5iZbk273TiTMqK_vdzPOPYTo6VsWW2gNByOISA9zi1w,3002
|
|
4
|
-
lemonade/cli.py,sha256=
|
|
4
|
+
lemonade/cli.py,sha256=2dWGg3u_iCS4zVfLImYhPEOBcw1_JqY2doCaQL6hYpM,4237
|
|
5
5
|
lemonade/sequence.py,sha256=KSH7BPsiyDKsOsg_ziQKEGsDwMmuO_YbgPRBxkZd0pw,13267
|
|
6
6
|
lemonade/state.py,sha256=sdSezla7Cd7KYL90xY3p9kcNV4ndSyN6UvNLOr3vBMA,5261
|
|
7
|
-
lemonade/version.py,sha256=
|
|
7
|
+
lemonade/version.py,sha256=KEEcawgJAxFWpeDw-nZyFzFwfyl_0inM8UDk3-FNKWE,22
|
|
8
8
|
lemonade/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
lemonade/common/build.py,sha256=zTb0m1-kuUx6zw5QHp2SNnVuN6jOTMQ2FCdj9iH374U,6140
|
|
10
10
|
lemonade/common/cli_helpers.py,sha256=hjBfXrTtFl8gmCFlL-ksviXR0mOcdPtTWVNKoEp3PG4,4993
|
|
@@ -39,40 +39,37 @@ lemonade/tools/oga/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
|
39
39
|
lemonade/tools/oga/bench.py,sha256=PJXv4UchcS2YPwijNzef8DY4DSAKYxIYY1ycHuH3T34,5005
|
|
40
40
|
lemonade/tools/oga/load.py,sha256=BH5ChYbZgeP_ZN4E6HoboJD3kZcUIAPgPEVbgUZpVjQ,33778
|
|
41
41
|
lemonade/tools/oga/utils.py,sha256=F8UVLKlfYcLa2SUqlehar8-jaX2Aw4u58DjHNNvLdOA,17675
|
|
42
|
-
lemonade/tools/quark/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
|
-
lemonade/tools/quark/quark_load.py,sha256=FJ4LJKTToZbHHWVEOBLadae1a3jCnnY4KvXySHbkJMA,5589
|
|
44
|
-
lemonade/tools/quark/quark_quantize.py,sha256=hwoaXhpBIORvJ16MvewphPkaDEQn3BAgXq5o82Gc-_s,16599
|
|
45
42
|
lemonade/tools/report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
43
|
lemonade/tools/report/llm_report.py,sha256=bVHhwCINA-Ok2EdSwAsLubsc83N3KWOVuwTguw7jDcE,6676
|
|
47
|
-
lemonade/tools/report/table.py,sha256=
|
|
44
|
+
lemonade/tools/report/table.py,sha256=Kv_Epd8a6KIrdzSC2EgIl6uTKw7E5eMq10Tg16O0WxM,27996
|
|
48
45
|
lemonade/tools/server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
|
-
lemonade/tools/server/llamacpp.py,sha256=
|
|
50
|
-
lemonade/tools/server/serve.py,sha256=
|
|
46
|
+
lemonade/tools/server/llamacpp.py,sha256=a_rO4ElrUbxlMeNx-8Ru6QQvgFhylotE-4-76bVAdr4,9358
|
|
47
|
+
lemonade/tools/server/serve.py,sha256=gwKPs-r-bfQsyCkVxzVyTp0SyNYVqqfMeeUFQ9TivwM,61638
|
|
51
48
|
lemonade/tools/server/tool_calls.py,sha256=xrAlQwKG-nv2xLlf8f9CDSaUbyMn8ZtHkds9iZLG9K8,5230
|
|
52
49
|
lemonade/tools/server/tray.py,sha256=a9z6hdqlfj91H00j6hAExRPQkzWHhE3dnqSumzEgq0U,19599
|
|
53
50
|
lemonade/tools/server/webapp.py,sha256=8Das5yXOaSBLZmSZ_eddJajQFxBhvl5D6GI_hHlGbE0,1040
|
|
54
|
-
lemonade/tools/server/wrapped_server.py,sha256
|
|
51
|
+
lemonade/tools/server/wrapped_server.py,sha256=DlzsGUwLQzjOFRfTTxfnhvmM_9lvAki96jWIAz7Czds,16713
|
|
55
52
|
lemonade/tools/server/static/favicon.ico,sha256=hMmP9qGJNeZ0mFS86JIqPbZstXMZn0Z76_HfHQpREAU,126745
|
|
56
|
-
lemonade/tools/server/static/styles.css,sha256=
|
|
57
|
-
lemonade/tools/server/static/webapp.html,sha256=
|
|
58
|
-
lemonade/tools/server/static/js/chat.js,sha256=
|
|
53
|
+
lemonade/tools/server/static/styles.css,sha256=TivveWAEyWnEXGJX_j22432LLWdwMljpW_70WuwIVsk,43730
|
|
54
|
+
lemonade/tools/server/static/webapp.html,sha256=KbYl8_q0GOXHiZTAv96O1e2RujfWMy6DLA4Wc5IbomY,18173
|
|
55
|
+
lemonade/tools/server/static/js/chat.js,sha256=vTfwJODpxkNPGG3J0AhfIF1WbraWnHNmbCQOsS-Fyc4,29488
|
|
59
56
|
lemonade/tools/server/static/js/model-settings.js,sha256=JXHeG7xVrRU181Hj7CZflERAi1Z6t-qwYFR4aH5nf5I,5820
|
|
60
|
-
lemonade/tools/server/static/js/models.js,sha256=
|
|
61
|
-
lemonade/tools/server/static/js/shared.js,sha256=
|
|
57
|
+
lemonade/tools/server/static/js/models.js,sha256=2ueyUfn7f4UeAvha9vyDCEi3fDk0BxLlut1N0L2f2EE,32862
|
|
58
|
+
lemonade/tools/server/static/js/shared.js,sha256=56dcVnAPiM7hKQwDVszlXCufCgzGiZyfNec9B-ScsHo,17356
|
|
62
59
|
lemonade/tools/server/utils/port.py,sha256=J7-g-Aqygb50jNoHLhhRfBZVM-uhGlcB5-oYBAehvgw,2263
|
|
63
60
|
lemonade/tools/server/utils/system_tray.py,sha256=b9lvNv9chJKQxvmH7qzAuUe6H9HsLu7pdHFqGlAJaL0,12654
|
|
64
61
|
lemonade/tools/server/utils/thread.py,sha256=Z-PDzGcpgfN2qxTmtlROWqrUN0B2fXdPrqo_J10fR_w,2772
|
|
65
62
|
lemonade_install/__init__.py,sha256=26zohKg2jgr_5y7tObduWMYQg8zCTWMZHL8lfi2zZVQ,40
|
|
66
|
-
lemonade_install/install.py,sha256=
|
|
67
|
-
lemonade_sdk-8.1.
|
|
68
|
-
lemonade_sdk-8.1.
|
|
69
|
-
lemonade_server/cli.py,sha256=
|
|
70
|
-
lemonade_server/model_manager.py,sha256=
|
|
63
|
+
lemonade_install/install.py,sha256=Dow7kt-K9WI4PH15hBwkKtOxede3dAaOmH4I1y_P5H4,27008
|
|
64
|
+
lemonade_sdk-8.1.8.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
65
|
+
lemonade_sdk-8.1.8.dist-info/licenses/NOTICE.md,sha256=RSca9LE5e6pvdWA_LXAUCcACIHPmINKqkRX-AVRqBGo,3499
|
|
66
|
+
lemonade_server/cli.py,sha256=IsyWGDIeiN0MnIaBryLhArHhPj1HD52l6028dNHQCKc,19248
|
|
67
|
+
lemonade_server/model_manager.py,sha256=V8QRf1nlh3wAFtUHoSF_JeAXeR7sfaZE1uTfppcIfcw,20492
|
|
71
68
|
lemonade_server/pydantic_models.py,sha256=49MyOlb5feLUlKsGcI75tWaflWckrItqcSVkdCY4e3A,3269
|
|
72
69
|
lemonade_server/server_models.json,sha256=DAdG4ebIt5Dy5MM3kmXn1pO0XbNMph1gdpzbacBDVuc,11664
|
|
73
70
|
lemonade_server/settings.py,sha256=6nsmPLFJD-UokQDmlx9ZBYMbpnn48So_PuBGWP7Fmfg,1299
|
|
74
|
-
lemonade_sdk-8.1.
|
|
75
|
-
lemonade_sdk-8.1.
|
|
76
|
-
lemonade_sdk-8.1.
|
|
77
|
-
lemonade_sdk-8.1.
|
|
78
|
-
lemonade_sdk-8.1.
|
|
71
|
+
lemonade_sdk-8.1.8.dist-info/METADATA,sha256=EoGUK5KNOw1lCefStfN47N-3mUIdJeNGTtpDIE63i0E,14992
|
|
72
|
+
lemonade_sdk-8.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
73
|
+
lemonade_sdk-8.1.8.dist-info/entry_points.txt,sha256=7sRvpNhi1E7amnM7RZo57e8yFF9iA5uuRaIeJ1Xre6w,193
|
|
74
|
+
lemonade_sdk-8.1.8.dist-info/top_level.txt,sha256=10ap5GNiPhalO4V50LRoxA1FqRT9g3Xkia6BITu880k,42
|
|
75
|
+
lemonade_sdk-8.1.8.dist-info/RECORD,,
|
lemonade_server/cli.py
CHANGED
|
@@ -197,15 +197,15 @@ def pull(
|
|
|
197
197
|
for model_name in model_names:
|
|
198
198
|
payload = {"model_name": model_name}
|
|
199
199
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if
|
|
208
|
-
payload[
|
|
200
|
+
# Add the parameters to the payload
|
|
201
|
+
for key, value in [
|
|
202
|
+
("checkpoint", checkpoint),
|
|
203
|
+
("recipe", recipe),
|
|
204
|
+
("reasoning", reasoning),
|
|
205
|
+
("mmproj", mmproj),
|
|
206
|
+
]:
|
|
207
|
+
if value:
|
|
208
|
+
payload[key] = value
|
|
209
209
|
|
|
210
210
|
# Install the model
|
|
211
211
|
pull_response = requests.post(f"{base_url}/pull", json=payload)
|
|
@@ -225,6 +225,9 @@ def pull(
|
|
|
225
225
|
recipe=recipe,
|
|
226
226
|
reasoning=reasoning,
|
|
227
227
|
mmproj=mmproj,
|
|
228
|
+
# The pull command will download an upgraded model if available, even
|
|
229
|
+
# if we already have a local copy of the model
|
|
230
|
+
do_not_upgrade=False,
|
|
228
231
|
)
|
|
229
232
|
|
|
230
233
|
|
lemonade_server/model_manager.py
CHANGED
|
@@ -208,13 +208,11 @@ class ModelManager:
|
|
|
208
208
|
existing_reasoning = "reasoning" in existing_model.get("labels", [])
|
|
209
209
|
existing_mmproj = existing_model.get("mmproj", "")
|
|
210
210
|
|
|
211
|
-
# Compare parameters
|
|
211
|
+
# Compare parameters
|
|
212
212
|
checkpoint_differs = checkpoint and checkpoint != existing_checkpoint
|
|
213
213
|
recipe_differs = recipe and recipe != existing_recipe
|
|
214
|
-
reasoning_differs = reasoning != existing_reasoning
|
|
215
|
-
mmproj_differs = mmproj != existing_mmproj
|
|
216
|
-
not mmproj and not existing_mmproj
|
|
217
|
-
)
|
|
214
|
+
reasoning_differs = reasoning and reasoning != existing_reasoning
|
|
215
|
+
mmproj_differs = mmproj and mmproj != existing_mmproj
|
|
218
216
|
|
|
219
217
|
if (
|
|
220
218
|
checkpoint_differs
|
|
@@ -241,13 +239,16 @@ class ModelManager:
|
|
|
241
239
|
)
|
|
242
240
|
|
|
243
241
|
conflict_details = ", ".join(conflicts)
|
|
242
|
+
|
|
243
|
+
additional_suggestion = ""
|
|
244
|
+
if model.startswith("user."):
|
|
245
|
+
additional_suggestion = f" or delete the existing model first using `lemonade-server delete {model}`"
|
|
246
|
+
|
|
244
247
|
raise ValueError(
|
|
245
|
-
f"Model {model} is already registered with different configuration. "
|
|
248
|
+
f"Model {model} is already registered with a different configuration. "
|
|
246
249
|
f"Conflicting parameters: {conflict_details}. "
|
|
247
|
-
f"Please use a different model name
|
|
248
|
-
f"`lemonade-server delete {model}`."
|
|
250
|
+
f"Please use a different model name{additional_suggestion}."
|
|
249
251
|
)
|
|
250
|
-
|
|
251
252
|
new_registration_model_config = None
|
|
252
253
|
|
|
253
254
|
# Download the model
|
lemonade/tools/quark/__init__.py
DELETED
|
File without changes
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import argparse
|
|
2
|
-
import os
|
|
3
|
-
import sys
|
|
4
|
-
|
|
5
|
-
from lemonade.state import State
|
|
6
|
-
from lemonade.tools import Tool
|
|
7
|
-
import lemonade.common.printing as printing
|
|
8
|
-
import lemonade.common.build as build
|
|
9
|
-
from lemonade_install.install import DEFAULT_QUARK_DIR
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class QuarkLoad(Tool):
|
|
13
|
-
"""
|
|
14
|
-
Load a model Quantized and exported using Quark.
|
|
15
|
-
Required Input State:
|
|
16
|
-
- state.model: Pretrained model instance to be quantized.
|
|
17
|
-
- state.tokenizer: Tokenizer instance from Hugging Face.
|
|
18
|
-
Output:
|
|
19
|
-
- state of the loaded model
|
|
20
|
-
|
|
21
|
-
See docs/dev_cli/quark.md for more details.
|
|
22
|
-
"""
|
|
23
|
-
|
|
24
|
-
unique_name = "quark-load"
|
|
25
|
-
|
|
26
|
-
def __init__(self):
|
|
27
|
-
super().__init__(monitor_message="Load Quark Quantized model")
|
|
28
|
-
|
|
29
|
-
@staticmethod
|
|
30
|
-
def parser(add_help: bool = True) -> argparse.ArgumentParser:
|
|
31
|
-
parser = __class__.helpful_parser(
|
|
32
|
-
short_description="Load a quantized model using Quark",
|
|
33
|
-
add_help=add_help,
|
|
34
|
-
)
|
|
35
|
-
|
|
36
|
-
parser.add_argument(
|
|
37
|
-
"--quant-scheme",
|
|
38
|
-
type=str,
|
|
39
|
-
required=True,
|
|
40
|
-
default=None,
|
|
41
|
-
help="Supported quantization schemes in Quark",
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
parser.add_argument(
|
|
45
|
-
"--quant-algo",
|
|
46
|
-
type=str,
|
|
47
|
-
required=True,
|
|
48
|
-
default=None,
|
|
49
|
-
choices=["awq", "gptq", "autosmoothquant", None],
|
|
50
|
-
help="Supported quantization algorithms in Quark",
|
|
51
|
-
)
|
|
52
|
-
|
|
53
|
-
parser.add_argument(
|
|
54
|
-
"--torch-compile", action="store_true", help="Model torch compile"
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
parser.add_argument(
|
|
58
|
-
"--safetensors-model-reload",
|
|
59
|
-
action="store_true",
|
|
60
|
-
help="Safetensors model reload",
|
|
61
|
-
)
|
|
62
|
-
|
|
63
|
-
parser.add_argument(
|
|
64
|
-
"--safetensors-model-dir",
|
|
65
|
-
default=None,
|
|
66
|
-
help="Directory of safetensors model",
|
|
67
|
-
)
|
|
68
|
-
|
|
69
|
-
parser.add_argument(
|
|
70
|
-
"--params-load", action="store_true", help="Model parameters load"
|
|
71
|
-
)
|
|
72
|
-
|
|
73
|
-
parser.add_argument("--json-path", help="Specify the path of saved json file")
|
|
74
|
-
|
|
75
|
-
parser.add_argument(
|
|
76
|
-
"--safetensors-path",
|
|
77
|
-
default=None,
|
|
78
|
-
help="Specify the path of saved safetensors file",
|
|
79
|
-
)
|
|
80
|
-
|
|
81
|
-
return parser
|
|
82
|
-
|
|
83
|
-
def run(
|
|
84
|
-
self,
|
|
85
|
-
state: State,
|
|
86
|
-
quant_scheme: str,
|
|
87
|
-
quant_algo: str,
|
|
88
|
-
torch_compile: bool = False,
|
|
89
|
-
safetensors_model_reload: bool = False,
|
|
90
|
-
safetensors_model_dir: str = None,
|
|
91
|
-
params_load: bool = False,
|
|
92
|
-
json_path: str = None,
|
|
93
|
-
safetensors_path: str = None,
|
|
94
|
-
) -> State:
|
|
95
|
-
"""
|
|
96
|
-
Executes the QuarkLoad process.
|
|
97
|
-
Returns:
|
|
98
|
-
State: The updated state after loading the model.
|
|
99
|
-
Raises:
|
|
100
|
-
Exception: If an error occurs during the QuarkLoad process.
|
|
101
|
-
"""
|
|
102
|
-
|
|
103
|
-
import torch
|
|
104
|
-
|
|
105
|
-
try:
|
|
106
|
-
if os.path.isdir(DEFAULT_QUARK_DIR):
|
|
107
|
-
quark_llm_path = os.path.join(
|
|
108
|
-
DEFAULT_QUARK_DIR, "examples", "torch", "language_modeling"
|
|
109
|
-
)
|
|
110
|
-
sys.path.insert(0, quark_llm_path)
|
|
111
|
-
else:
|
|
112
|
-
raise FileNotFoundError(
|
|
113
|
-
f"The directory {DEFAULT_QUARK_DIR} does not exist. \
|
|
114
|
-
Please check your installation."
|
|
115
|
-
)
|
|
116
|
-
|
|
117
|
-
# Default load path specific to recipe
|
|
118
|
-
# This will NOT work
|
|
119
|
-
# The default path is now uniquely craeated with timestamp
|
|
120
|
-
# Default load path will not work. Need to pass explicit load path
|
|
121
|
-
model_export_path = os.path.join(
|
|
122
|
-
build.output_dir(state.cache_dir, state.build_name),
|
|
123
|
-
"exported_model",
|
|
124
|
-
quant_scheme,
|
|
125
|
-
quant_algo,
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
# Set default paths only if current values are None
|
|
129
|
-
if safetensors_model_dir is None:
|
|
130
|
-
safetensors_model_dir = model_export_path
|
|
131
|
-
if safetensors_path is None:
|
|
132
|
-
safetensors_path = os.path.join(model_export_path, "model.safetensors")
|
|
133
|
-
printing.log_info("Loading model ...")
|
|
134
|
-
if not params_load and not safetensors_model_reload:
|
|
135
|
-
raise ValueError(
|
|
136
|
-
" Specify load format: 'params_load' or 'safetensors_model_reload'."
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
# Reload quantized model if specified
|
|
140
|
-
from quark.torch import load_params, import_model_info
|
|
141
|
-
|
|
142
|
-
if params_load:
|
|
143
|
-
printing.log_info(
|
|
144
|
-
"Restoring quantized model from JSON/safetensors files"
|
|
145
|
-
)
|
|
146
|
-
model = load_params(
|
|
147
|
-
model,
|
|
148
|
-
json_path=json_path,
|
|
149
|
-
safetensors_path=safetensors_path,
|
|
150
|
-
)
|
|
151
|
-
elif safetensors_model_reload:
|
|
152
|
-
printing.log_info(
|
|
153
|
-
"Restoring quantized model from quark_safetensors files"
|
|
154
|
-
)
|
|
155
|
-
model = import_model_info(model, model_info_dir=safetensors_model_dir)
|
|
156
|
-
|
|
157
|
-
if torch_compile:
|
|
158
|
-
printing.log_info("torch.compile...")
|
|
159
|
-
model = torch.compile(model)
|
|
160
|
-
|
|
161
|
-
state.model = model
|
|
162
|
-
state.dtype = model.dtype
|
|
163
|
-
|
|
164
|
-
printing.log_info("Quark Load process completed.")
|
|
165
|
-
|
|
166
|
-
except Exception as e:
|
|
167
|
-
printing.log_error(f"An error occurred during the QuarkLoad process: {e}")
|
|
168
|
-
raise
|
|
169
|
-
return state
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
# This file was originally licensed under Apache 2.0. It has been modified.
|
|
173
|
-
# Modifications Copyright (c) 2025 AMD
|