Commit ·
fb051c8
0
Parent(s):
initial commit
Browse filesCo-authored-by: varunrandery <varunrandery@users.noreply.huggingface.co>
This view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +35 -0
- LICENSE.md +202 -0
- README.md +129 -0
- chat_template.jinja +132 -0
- config.json +526 -0
- configuration_laguna.py +187 -0
- generation_config.json +13 -0
- image/LOAD.md +53 -0
- image/laguna-vllm-v0.19.0-overlay.tar.gz +3 -0
- model-00001-of-00045.safetensors +3 -0
- model-00002-of-00045.safetensors +3 -0
- model-00003-of-00045.safetensors +3 -0
- model-00004-of-00045.safetensors +3 -0
- model-00005-of-00045.safetensors +3 -0
- model-00006-of-00045.safetensors +3 -0
- model-00007-of-00045.safetensors +3 -0
- model-00008-of-00045.safetensors +3 -0
- model-00009-of-00045.safetensors +3 -0
- model-00010-of-00045.safetensors +3 -0
- model-00011-of-00045.safetensors +3 -0
- model-00012-of-00045.safetensors +3 -0
- model-00013-of-00045.safetensors +3 -0
- model-00014-of-00045.safetensors +3 -0
- model-00015-of-00045.safetensors +3 -0
- model-00016-of-00045.safetensors +3 -0
- model-00017-of-00045.safetensors +3 -0
- model-00018-of-00045.safetensors +3 -0
- model-00019-of-00045.safetensors +3 -0
- model-00020-of-00045.safetensors +3 -0
- model-00021-of-00045.safetensors +3 -0
- model-00022-of-00045.safetensors +3 -0
- model-00023-of-00045.safetensors +3 -0
- model-00024-of-00045.safetensors +3 -0
- model-00025-of-00045.safetensors +3 -0
- model-00026-of-00045.safetensors +3 -0
- model-00027-of-00045.safetensors +3 -0
- model-00028-of-00045.safetensors +3 -0
- model-00029-of-00045.safetensors +3 -0
- model-00030-of-00045.safetensors +3 -0
- model-00031-of-00045.safetensors +3 -0
- model-00032-of-00045.safetensors +3 -0
- model-00033-of-00045.safetensors +3 -0
- model-00034-of-00045.safetensors +3 -0
- model-00035-of-00045.safetensors +3 -0
- model-00036-of-00045.safetensors +3 -0
- model-00037-of-00045.safetensors +3 -0
- model-00038-of-00045.safetensors +3 -0
- model-00039-of-00045.safetensors +3 -0
- model-00040-of-00045.safetensors +3 -0
- model-00041-of-00045.safetensors +3 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
LICENSE.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright 2026 Poolside
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: vllm
|
| 3 |
+
inference: false
|
| 4 |
+
extra_gated_description: >-
|
| 5 |
+
To learn more about how we process your personal data, please read our <a
|
| 6 |
+
href="https://poolside.ai/legal/privacy">Privacy Policy</a>.
|
| 7 |
+
tags:
|
| 8 |
+
- laguna-m.1
|
| 9 |
+
- vllm
|
| 10 |
+
- sglang
|
| 11 |
+
- fp8
|
| 12 |
+
- moe
|
| 13 |
+
license: apache-2.0
|
| 14 |
+
pipeline_tag: text-generation
|
| 15 |
+
base_model:
|
| 16 |
+
- poolside/Laguna-M.1
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
<p align="center">
|
| 20 |
+
<img alt="poolside-banner" src="https://poolside.ai/assets/laguna/laguna-m1-banner.svg" width="800px">
|
| 21 |
+
</p>
|
| 22 |
+
|
| 23 |
+
<p align="center">
|
| 24 |
+
<a href="https://platform.poolside.ai"><strong>Get an API key</strong></a> ·
|
| 25 |
+
<a href="https://poolside.ai/blog/laguna-a-deeper-dive"><strong>Release blog post</strong></a> ·
|
| 26 |
+
<a href="https://poolside.ai/assets/laguna/laguna-m1-xs2-technical-report.pdf"><strong>Technical report</strong></a>
|
| 27 |
+
</p>
|
| 28 |
+
|
| 29 |
+
<br>
|
| 30 |
+
|
| 31 |
+
# Laguna M.1-FP8
|
| 32 |
+
|
| 33 |
+
Laguna M.1-FP8 is a 225B total parameter Mixture-of-Experts model with 23B activated parameters per token designed for agentic coding and long-horizon work. This is the FP8-quantized variant of [Laguna M.1](https://huggingface.co/poolside/Laguna-M.1).
|
| 34 |
+
|
| 35 |
+
> [!NOTE]
|
| 36 |
+
> This is the FP8 variant. The [BF16](https://huggingface.co/poolside/Laguna-M.1) and [NVFP4](https://huggingface.co/poolside/Laguna-M.1-NVFP4) variants are also available on Hugging Face.
|
| 37 |
+
|
| 38 |
+
## Highlights
|
| 39 |
+
|
| 40 |
+
* **Large sparse MoE for agentic coding**: Laguna M.1 is a 70-layer MoE transformer with 225B total parameters and 23B activated parameters per token
|
| 41 |
+
* **High-capacity expert routing**: After 3 dense SwiGLU layers, Laguna M.1 uses 67 sparse MoE layers with 256 experts, top-k=16 routing and auxiliary-loss-free load balancing
|
| 42 |
+
* **Global attention architecture**: Laguna M.1 uses global attention across all layers with 64 Q-heads, 8 KV-heads and softplus attention output gating
|
| 43 |
+
* **Native reasoning support**: Interleaved thinking between tool calls with support for enabling and disabling thinking per-request
|
| 44 |
+
* **Apache 2.0 license**: Use and modify freely for commercial and non-commercial purposes
|
| 45 |
+
|
| 46 |
+
---
|
| 47 |
+
|
| 48 |
+
## Model overview
|
| 49 |
+
|
| 50 |
+
- Training: pre-training, post-training and reinforcement learning stages
|
| 51 |
+
- Number of parameters: 225B total with 23B activated per token
|
| 52 |
+
- Optimizer: Muon
|
| 53 |
+
- Layers: 70 layers with global attention
|
| 54 |
+
- Experts: 256 experts with 1 shared expert; top-k=16 routing
|
| 55 |
+
- Dense layers: first 3 layers are dense SwiGLU; remaining 67 layers are sparse MoE
|
| 56 |
+
- Attention: 64 Q-heads, 8 KV-heads, head dimension 128, with softplus attention output gating
|
| 57 |
+
- Positional encoding: RoPE with YaRN
|
| 58 |
+
- Modality: text-to-text
|
| 59 |
+
- Context window: 262,144 tokens
|
| 60 |
+
- Reasoning support: interleaved thinking with preserved thinking
|
| 61 |
+
- Quantization: FP8 (weights), detected automatically from `quantization_config`
|
| 62 |
+
|
| 63 |
+
## Benchmark results
|
| 64 |
+
|
| 65 |
+
<p align="center">
|
| 66 |
+
<img alt="benchmarks" src="https://poolside.ai/assets/laguna/laguna-m1-chart.svg" width="800px">
|
| 67 |
+
</p>
|
| 68 |
+
|
| 69 |
+
| Model | Parameters | SWE-bench Verified | SWE-bench Multilingual | SWE-bench Pro (Public Dataset) | Terminal-Bench 2.0 |
|
| 70 |
+
|---------------------------|----------------------|--------------------|------------------------|--------------------------------|--------------------|
|
| 71 |
+
| **Laguna M.1 (BF16)** | 225B-A23B | 74.6% | 63.1% | 49.2% | 45.8% |
|
| 72 |
+
| Devstral 2 | 123B dense | 72.2% | 61.3% | - | 32.6% |
|
| 73 |
+
| GLM-4.7 | 355B-A32B | 73.8% | 66.7% | - | 41.0% |
|
| 74 |
+
| DeepSeek-V4 Flash | 284B-A13B | 79.0% | 73.3% | 52.6% | 56.9% |
|
| 75 |
+
| Qwen3.5-397B-A17B | 397B-A17B | 76.2% | 69.3% | 50.9% | 52.5% |
|
| 76 |
+
| Claude Sonnet 4.6 | - | 79.6% | - | - | 59.1% |
|
| 77 |
+
|
| 78 |
+
*Scores shown are for the BF16 reference model; see the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1) for full benchmarking methodology. We used the highest publicly-referenced scores for all comparison models across each benchmark.*
|
| 79 |
+
|
| 80 |
+
## Usage
|
| 81 |
+
|
| 82 |
+
Laguna M.1 has upstream support in vLLM, SGLang, and TRT-LLM thanks to the support of the team at NVIDIA.
|
| 83 |
+
|
| 84 |
+
> [!NOTE]
|
| 85 |
+
> For complete usage instructions, see the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1).
|
| 86 |
+
|
| 87 |
+
### Deployment
|
| 88 |
+
|
| 89 |
+
#### vLLM
|
| 90 |
+
|
| 91 |
+
The full vLLM recipe is on the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1). Quantization is detected automatically from `quantization_config` in this checkpoint, so the same command works with `poolside/Laguna-M.1-FP8` substituted for the model ID. No extra flags required.
|
| 92 |
+
|
| 93 |
+
```shell
|
| 94 |
+
pip install 'vllm>=0.21.0'
|
| 95 |
+
|
| 96 |
+
vllm serve \
|
| 97 |
+
--model poolside/Laguna-M.1-FP8 \
|
| 98 |
+
--tool-call-parser poolside_v1 \
|
| 99 |
+
--reasoning-parser poolside_v1 \
|
| 100 |
+
--enable-auto-tool-choice \
|
| 101 |
+
--served-model-name laguna \
|
| 102 |
+
--default-chat-template-kwargs '{"enable_thinking": true}'
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
#### SGLang
|
| 106 |
+
|
| 107 |
+
Laguna M.1 is supported in SGLang via [sgl-project/sglang#28400](https://github.com/sgl-project/sglang/pull/28400). Quantization is detected automatically from `quantization_config`, so no extra flags are required. A full serving recipe will be added to the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1).
|
| 108 |
+
|
| 109 |
+
#### TRT-LLM
|
| 110 |
+
|
| 111 |
+
Laguna is supported in TensorRT-LLM thanks to the team at NVIDIA ([NVIDIA/TensorRT-LLM#13559](https://github.com/NVIDIA/TensorRT-LLM/pull/13559), with partial-RoPE fusion in [#15110](https://github.com/NVIDIA/TensorRT-LLM/pull/15110)). The full recipe is on the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1). Quantization is detected automatically from `quantization_config` in this checkpoint, so no extra flags are required.
|
| 112 |
+
|
| 113 |
+
## Controlling reasoning
|
| 114 |
+
|
| 115 |
+
Laguna M.1 has native reasoning support and is designed to work best with *preserved thinking*, where `reasoning` content from prior assistant messages is preserved in the message history. This model will generally reason before calling tools and between tool calls. See the main [Laguna M.1 model card](https://huggingface.co/poolside/Laguna-M.1#controlling-reasoning) for streaming, tool-call, and preserved-thinking examples.
|
| 116 |
+
|
| 117 |
+
### Disabling reasoning
|
| 118 |
+
|
| 119 |
+
You can disable thinking by setting `enable_thinking` to `False` in a request or by not providing `--default-chat-template-kwargs {"enable_thinking": True}` or equivalent when starting the server.
|
| 120 |
+
|
| 121 |
+
## License
|
| 122 |
+
|
| 123 |
+
This model is licensed under the [Apache 2.0 License](https://huggingface.co/poolside/Laguna-M.1-FP8/blob/main/LICENSE.md).
|
| 124 |
+
|
| 125 |
+
## Intended and Responsible Use
|
| 126 |
+
|
| 127 |
+
Laguna M.1 is designed for software engineering and agentic coding use cases, and you are responsible for confirming that it is appropriate for your intended application. Laguna M.1 is subject to the [Apache 2.0 License](https://huggingface.co/poolside/Laguna-M.1-FP8/blob/main/LICENSE.md), and should be used consistently with Poolside's [Acceptable Use Policy](https://poolside.ai/legal/acceptable-use-policy). We advise against circumventing Laguna M.1 safety guardrails without implementing substantially equivalent mitigations appropriate for your use case.
|
| 128 |
+
|
| 129 |
+
Please report security vulnerabilities or safety concerns to [security@poolside.ai](mailto:security@poolside.ai).
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{#- Iteration on laguna_glm_thinking_v5/chat_template.jinja -#}
|
| 2 |
+
{#- Adds a default system message (used when no system message is provided in `messages`). -#}
|
| 3 |
+
{{- "〈|EOS|〉" -}}
|
| 4 |
+
{%- set enable_thinking = enable_thinking | default(false) -%}
|
| 5 |
+
{%- set render_assistant_messages_raw = render_assistant_messages_raw | default(false) -%}
|
| 6 |
+
{%- set add_generation_prompt = add_generation_prompt | default(false) -%}
|
| 7 |
+
|
| 8 |
+
{#- ───── header (system message) ───── -#}
|
| 9 |
+
{%- set system_message = "You are a helpful, conversationally-fluent assistant made by Poolside. You are here to be helpful to users through natural language conversations." -%}
|
| 10 |
+
{%- if messages and messages[0].role == "system" -%}
|
| 11 |
+
{%- set system_message = messages[0].content -%}
|
| 12 |
+
{%- endif -%}
|
| 13 |
+
|
| 14 |
+
{%- if (system_message and system_message.strip()) or tools -%}
|
| 15 |
+
{{- "<system>\n" -}}
|
| 16 |
+
|
| 17 |
+
{%- if system_message and system_message.strip() -%}
|
| 18 |
+
{{- "\n" -}}
|
| 19 |
+
{{- system_message.rstrip() -}}
|
| 20 |
+
{%- endif -%}
|
| 21 |
+
|
| 22 |
+
{%- if tools -%}
|
| 23 |
+
{{- "\n\n### Tools\n\n" -}}
|
| 24 |
+
{%- set ns = namespace(tool_string="You may call functions to assist with the user query.\n"
|
| 25 |
+
~ "All available function signatures are listed below:\n"
|
| 26 |
+
~ "<available_tools>\n") -%}
|
| 27 |
+
{%- for tool in tools -%}
|
| 28 |
+
{%- set ns.tool_string = ns.tool_string ~ (tool | tojson) ~ "\n" -%}
|
| 29 |
+
{%- endfor -%}
|
| 30 |
+
{%- if enable_thinking -%}
|
| 31 |
+
{%- set tool_string = ns.tool_string + "</available_tools>\n\n" ~
|
| 32 |
+
"Wrap your thinking in '<think>', '</think>' tags, followed by a function call. For each function call, return an unescaped XML-like object with function name and arguments within '<tool_call>' and '</tool_call>' tags, like here:\n" ~
|
| 33 |
+
"<think> your thoughts here </think>\n" ~
|
| 34 |
+
"<tool_call>function-name\n<arg_key>argument-key</arg_key>\n<arg_value>value-of-argument-key</arg_value>\n" ~
|
| 35 |
+
"</tool_call>" -%}
|
| 36 |
+
{%- else -%}
|
| 37 |
+
{%- set tool_string = ns.tool_string + "</available_tools>\n\n" ~
|
| 38 |
+
"For each function call, return an unescaped XML-like object " ~
|
| 39 |
+
"with function name and arguments within '<tool_call>' and '</tool_call>' tags, like here:\n" ~
|
| 40 |
+
"<tool_call>function-name\n<arg_key>argument-key</arg_key>\n<arg_value>value-of-argument-key</arg_value>\n" ~
|
| 41 |
+
"</tool_call>" -%}
|
| 42 |
+
{%- endif -%}
|
| 43 |
+
{{- tool_string -}}
|
| 44 |
+
{%- endif -%}
|
| 45 |
+
|
| 46 |
+
{{- "\n</system>\n" -}}
|
| 47 |
+
{%- endif -%}
|
| 48 |
+
|
| 49 |
+
{#- ───── main loop ───── -#}
|
| 50 |
+
{%- for message in messages -%}
|
| 51 |
+
{%- set content = message.content if message.content is string else "" -%}
|
| 52 |
+
{%- if message.role == "user" -%}
|
| 53 |
+
{{- "<user>\n" + content + "\n</user>\n" -}}
|
| 54 |
+
{%- elif message.role == "assistant" -%}
|
| 55 |
+
{%- generation -%}
|
| 56 |
+
{{- "<assistant>\n" -}}
|
| 57 |
+
{%- if render_assistant_messages_raw -%}
|
| 58 |
+
{#- Raw mode: prepend the generation prompt token, then dump content verbatim. -#}
|
| 59 |
+
{#- The generation prompt is <think> when enable_thinking, </think> otherwise. -#}
|
| 60 |
+
{#- Only prepend if content doesn't already start with it. -#}
|
| 61 |
+
{%- if enable_thinking -%}
|
| 62 |
+
{%- if not content.startswith('<think>') -%}
|
| 63 |
+
{{- '<think>' -}}
|
| 64 |
+
{%- endif -%}
|
| 65 |
+
{%- else -%}
|
| 66 |
+
{%- if not content.startswith('</think>') -%}
|
| 67 |
+
{{- '</think>' -}}
|
| 68 |
+
{%- endif -%}
|
| 69 |
+
{%- endif -%}
|
| 70 |
+
{{- content -}}
|
| 71 |
+
{#- Append closing tag if content doesn't already end with it. -#}
|
| 72 |
+
{%- if not content.endswith('</assistant>\n') and not content.endswith('</assistant>') -%}
|
| 73 |
+
{{- '\n</assistant>' -}}
|
| 74 |
+
{%- endif -%}
|
| 75 |
+
{{- "\n" -}}
|
| 76 |
+
{%- else -%}
|
| 77 |
+
{#- Extract reasoning content from message.reasoning (vLLM field name) or message.reasoning_content, or from <think> tags -#}
|
| 78 |
+
{%- set reasoning_content = '' %}
|
| 79 |
+
{%- if message.reasoning is string %}
|
| 80 |
+
{%- set reasoning_content = message.reasoning %}
|
| 81 |
+
{%- elif message.reasoning_content is string %}
|
| 82 |
+
{%- set reasoning_content = message.reasoning_content %}
|
| 83 |
+
{%- endif %}
|
| 84 |
+
{#- Always strip <think> tags from content if present to avoid duplication -#}
|
| 85 |
+
{%- if '</think>' in content %}
|
| 86 |
+
{%- if not reasoning_content %}
|
| 87 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 88 |
+
{%- endif %}
|
| 89 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 90 |
+
{%- endif %}
|
| 91 |
+
{#- Display reasoning content for all messages -#}
|
| 92 |
+
{%- if reasoning_content -%}
|
| 93 |
+
{{- '<think>\n' + reasoning_content.strip() + '\n</think>\n' -}}
|
| 94 |
+
{%- else -%}
|
| 95 |
+
{{- '</think>\n' -}}
|
| 96 |
+
{%- endif -%}
|
| 97 |
+
{#- Display main content -#}
|
| 98 |
+
{%- if content.strip() -%}
|
| 99 |
+
{{- content.strip() ~ "\n" -}}
|
| 100 |
+
{%- endif -%}
|
| 101 |
+
{%- if message.tool_calls -%}
|
| 102 |
+
{%- for tool_call in message.tool_calls -%}
|
| 103 |
+
{%- set function_data = tool_call.function -%}
|
| 104 |
+
{{- '<tool_call>' + function_data.name }}
|
| 105 |
+
{% set _args = function_data.arguments %}
|
| 106 |
+
{%- for k, v in _args.items() -%}
|
| 107 |
+
{{- "<arg_key>" ~ k ~ "</arg_key>\n" -}}
|
| 108 |
+
{{- "<arg_value>"}}{{ v | tojson(ensure_ascii=False) if v is not string else v }}{{ "</arg_value>\n" -}}
|
| 109 |
+
{%- endfor -%}
|
| 110 |
+
{{- "</tool_call>\n" -}}
|
| 111 |
+
{%- endfor -%}
|
| 112 |
+
{%- endif -%}
|
| 113 |
+
{{- "</assistant>\n" -}}
|
| 114 |
+
{%- endif -%}
|
| 115 |
+
{%- endgeneration -%}
|
| 116 |
+
{%- elif message.role == "tool" -%}
|
| 117 |
+
{{- "<tool_response>\n" + content + "\n</tool_response>\n" -}}
|
| 118 |
+
{%- elif message.role == "system" and loop.index0 != 0 -%}
|
| 119 |
+
{#- Render additional system messages (skip the first one which is handled separately in the header) -#}
|
| 120 |
+
{{- "<system>\n" + content + "\n</system>\n" -}}
|
| 121 |
+
{%- endif -%}
|
| 122 |
+
{%- endfor -%}
|
| 123 |
+
{#- ───── generation prompt ───── -#}
|
| 124 |
+
{%- if add_generation_prompt -%}
|
| 125 |
+
{{- "<assistant>\n" -}}
|
| 126 |
+
{#- ───── Include reasoning mode directive ───── -#}
|
| 127 |
+
{%- if not enable_thinking %}
|
| 128 |
+
{{- '</think>' -}}
|
| 129 |
+
{%- else %}
|
| 130 |
+
{{- '<think>' -}}
|
| 131 |
+
{%- endif %}
|
| 132 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,526 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LagunaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"auto_map": {
|
| 6 |
+
"AutoConfig": "configuration_laguna.LagunaConfig",
|
| 7 |
+
"AutoModelForCausalLM": "modeling_laguna.LagunaForCausalLM"
|
| 8 |
+
},
|
| 9 |
+
"model_type": "laguna",
|
| 10 |
+
"vocab_size": 100352,
|
| 11 |
+
"hidden_size": 4096,
|
| 12 |
+
"intermediate_size": 16384,
|
| 13 |
+
"num_hidden_layers": 70,
|
| 14 |
+
"num_attention_heads": 64,
|
| 15 |
+
"num_key_value_heads": 8,
|
| 16 |
+
"head_dim": 128,
|
| 17 |
+
"max_position_embeddings": 262144,
|
| 18 |
+
"attention_bias": false,
|
| 19 |
+
"attention_dropout": 0.0,
|
| 20 |
+
"rms_norm_eps": 1e-06,
|
| 21 |
+
"num_experts": 256,
|
| 22 |
+
"num_experts_per_tok": 16,
|
| 23 |
+
"moe_intermediate_size": 1024,
|
| 24 |
+
"shared_expert_intermediate_size": 1024,
|
| 25 |
+
"router_aux_loss_coef": 0.0,
|
| 26 |
+
"bos_token_id": 2,
|
| 27 |
+
"eos_token_id": [
|
| 28 |
+
2,
|
| 29 |
+
24
|
| 30 |
+
],
|
| 31 |
+
"pad_token_id": 9,
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"use_cache": true,
|
| 34 |
+
"torch_dtype": "bfloat16",
|
| 35 |
+
"gating": "per-element",
|
| 36 |
+
"rope_parameters": {
|
| 37 |
+
"full_attention": {
|
| 38 |
+
"rope_theta": 500000.0,
|
| 39 |
+
"rope_type": "yarn",
|
| 40 |
+
"factor": 64.0,
|
| 41 |
+
"original_max_position_embeddings": 4096,
|
| 42 |
+
"beta_slow": 1.0,
|
| 43 |
+
"beta_fast": 64.0,
|
| 44 |
+
"attention_factor": 1.0,
|
| 45 |
+
"partial_rotary_factor": 1.0
|
| 46 |
+
}
|
| 47 |
+
},
|
| 48 |
+
"moe_apply_router_weight_on_input": false,
|
| 49 |
+
"partial_rotary_factor": 1.0,
|
| 50 |
+
"mlp_layer_types": [
|
| 51 |
+
"dense",
|
| 52 |
+
"dense",
|
| 53 |
+
"dense",
|
| 54 |
+
"sparse",
|
| 55 |
+
"sparse",
|
| 56 |
+
"sparse",
|
| 57 |
+
"sparse",
|
| 58 |
+
"sparse",
|
| 59 |
+
"sparse",
|
| 60 |
+
"sparse",
|
| 61 |
+
"sparse",
|
| 62 |
+
"sparse",
|
| 63 |
+
"sparse",
|
| 64 |
+
"sparse",
|
| 65 |
+
"sparse",
|
| 66 |
+
"sparse",
|
| 67 |
+
"sparse",
|
| 68 |
+
"sparse",
|
| 69 |
+
"sparse",
|
| 70 |
+
"sparse",
|
| 71 |
+
"sparse",
|
| 72 |
+
"sparse",
|
| 73 |
+
"sparse",
|
| 74 |
+
"sparse",
|
| 75 |
+
"sparse",
|
| 76 |
+
"sparse",
|
| 77 |
+
"sparse",
|
| 78 |
+
"sparse",
|
| 79 |
+
"sparse",
|
| 80 |
+
"sparse",
|
| 81 |
+
"sparse",
|
| 82 |
+
"sparse",
|
| 83 |
+
"sparse",
|
| 84 |
+
"sparse",
|
| 85 |
+
"sparse",
|
| 86 |
+
"sparse",
|
| 87 |
+
"sparse",
|
| 88 |
+
"sparse",
|
| 89 |
+
"sparse",
|
| 90 |
+
"sparse",
|
| 91 |
+
"sparse",
|
| 92 |
+
"sparse",
|
| 93 |
+
"sparse",
|
| 94 |
+
"sparse",
|
| 95 |
+
"sparse",
|
| 96 |
+
"sparse",
|
| 97 |
+
"sparse",
|
| 98 |
+
"sparse",
|
| 99 |
+
"sparse",
|
| 100 |
+
"sparse",
|
| 101 |
+
"sparse",
|
| 102 |
+
"sparse",
|
| 103 |
+
"sparse",
|
| 104 |
+
"sparse",
|
| 105 |
+
"sparse",
|
| 106 |
+
"sparse",
|
| 107 |
+
"sparse",
|
| 108 |
+
"sparse",
|
| 109 |
+
"sparse",
|
| 110 |
+
"sparse",
|
| 111 |
+
"sparse",
|
| 112 |
+
"sparse",
|
| 113 |
+
"sparse",
|
| 114 |
+
"sparse",
|
| 115 |
+
"sparse",
|
| 116 |
+
"sparse",
|
| 117 |
+
"sparse",
|
| 118 |
+
"sparse",
|
| 119 |
+
"sparse",
|
| 120 |
+
"sparse"
|
| 121 |
+
],
|
| 122 |
+
"use_bidirectional_attention": false,
|
| 123 |
+
"moe_routed_scaling_factor": 1.0,
|
| 124 |
+
"compression_config": {
|
| 125 |
+
"config_groups": {
|
| 126 |
+
"group_0": {
|
| 127 |
+
"format": "float-quantized",
|
| 128 |
+
"input_activations": {
|
| 129 |
+
"actorder": null,
|
| 130 |
+
"block_structure": null,
|
| 131 |
+
"dynamic": true,
|
| 132 |
+
"group_size": 128,
|
| 133 |
+
"num_bits": 8,
|
| 134 |
+
"observer": null,
|
| 135 |
+
"observer_kwargs": {},
|
| 136 |
+
"strategy": "group",
|
| 137 |
+
"symmetric": true,
|
| 138 |
+
"type": "float"
|
| 139 |
+
},
|
| 140 |
+
"output_activations": null,
|
| 141 |
+
"targets": [
|
| 142 |
+
"Linear"
|
| 143 |
+
],
|
| 144 |
+
"weights": {
|
| 145 |
+
"actorder": null,
|
| 146 |
+
"block_structure": [
|
| 147 |
+
128,
|
| 148 |
+
128
|
| 149 |
+
],
|
| 150 |
+
"dynamic": false,
|
| 151 |
+
"group_size": null,
|
| 152 |
+
"num_bits": 8,
|
| 153 |
+
"observer": "minmax",
|
| 154 |
+
"observer_kwargs": {},
|
| 155 |
+
"strategy": "block",
|
| 156 |
+
"symmetric": true,
|
| 157 |
+
"type": "float"
|
| 158 |
+
}
|
| 159 |
+
}
|
| 160 |
+
},
|
| 161 |
+
"format": "float-quantized",
|
| 162 |
+
"global_compression_ratio": null,
|
| 163 |
+
"ignore": [
|
| 164 |
+
"model.layers.0.self_attn.o_proj",
|
| 165 |
+
"model.layers.1.self_attn.o_proj",
|
| 166 |
+
"model.layers.2.self_attn.o_proj",
|
| 167 |
+
"model.layers.3.self_attn.o_proj",
|
| 168 |
+
"model.layers.3.mlp.gate",
|
| 169 |
+
"model.layers.4.self_attn.o_proj",
|
| 170 |
+
"model.layers.4.mlp.gate",
|
| 171 |
+
"model.layers.5.self_attn.o_proj",
|
| 172 |
+
"model.layers.5.mlp.gate",
|
| 173 |
+
"model.layers.6.self_attn.o_proj",
|
| 174 |
+
"model.layers.6.mlp.gate",
|
| 175 |
+
"model.layers.7.self_attn.o_proj",
|
| 176 |
+
"model.layers.7.mlp.gate",
|
| 177 |
+
"model.layers.8.self_attn.o_proj",
|
| 178 |
+
"model.layers.8.mlp.gate",
|
| 179 |
+
"model.layers.9.self_attn.o_proj",
|
| 180 |
+
"model.layers.9.mlp.gate",
|
| 181 |
+
"model.layers.10.self_attn.o_proj",
|
| 182 |
+
"model.layers.10.mlp.gate",
|
| 183 |
+
"model.layers.11.self_attn.o_proj",
|
| 184 |
+
"model.layers.11.mlp.gate",
|
| 185 |
+
"model.layers.12.self_attn.o_proj",
|
| 186 |
+
"model.layers.12.mlp.gate",
|
| 187 |
+
"model.layers.13.self_attn.o_proj",
|
| 188 |
+
"model.layers.13.mlp.gate",
|
| 189 |
+
"model.layers.14.self_attn.o_proj",
|
| 190 |
+
"model.layers.14.mlp.gate",
|
| 191 |
+
"model.layers.15.self_attn.o_proj",
|
| 192 |
+
"model.layers.15.mlp.gate",
|
| 193 |
+
"model.layers.16.self_attn.o_proj",
|
| 194 |
+
"model.layers.16.mlp.gate",
|
| 195 |
+
"model.layers.17.self_attn.o_proj",
|
| 196 |
+
"model.layers.17.mlp.gate",
|
| 197 |
+
"model.layers.18.self_attn.o_proj",
|
| 198 |
+
"model.layers.18.mlp.gate",
|
| 199 |
+
"model.layers.19.self_attn.o_proj",
|
| 200 |
+
"model.layers.19.mlp.gate",
|
| 201 |
+
"model.layers.20.self_attn.o_proj",
|
| 202 |
+
"model.layers.20.mlp.gate",
|
| 203 |
+
"model.layers.21.self_attn.o_proj",
|
| 204 |
+
"model.layers.21.mlp.gate",
|
| 205 |
+
"model.layers.22.self_attn.o_proj",
|
| 206 |
+
"model.layers.22.mlp.gate",
|
| 207 |
+
"model.layers.23.self_attn.o_proj",
|
| 208 |
+
"model.layers.23.mlp.gate",
|
| 209 |
+
"model.layers.24.self_attn.o_proj",
|
| 210 |
+
"model.layers.24.mlp.gate",
|
| 211 |
+
"model.layers.25.self_attn.o_proj",
|
| 212 |
+
"model.layers.25.mlp.gate",
|
| 213 |
+
"model.layers.26.self_attn.o_proj",
|
| 214 |
+
"model.layers.26.mlp.gate",
|
| 215 |
+
"model.layers.27.self_attn.o_proj",
|
| 216 |
+
"model.layers.27.mlp.gate",
|
| 217 |
+
"model.layers.28.self_attn.o_proj",
|
| 218 |
+
"model.layers.28.mlp.gate",
|
| 219 |
+
"model.layers.29.self_attn.o_proj",
|
| 220 |
+
"model.layers.29.mlp.gate",
|
| 221 |
+
"model.layers.30.self_attn.o_proj",
|
| 222 |
+
"model.layers.30.mlp.gate",
|
| 223 |
+
"model.layers.31.self_attn.o_proj",
|
| 224 |
+
"model.layers.31.mlp.gate",
|
| 225 |
+
"model.layers.32.self_attn.o_proj",
|
| 226 |
+
"model.layers.32.mlp.gate",
|
| 227 |
+
"model.layers.33.self_attn.o_proj",
|
| 228 |
+
"model.layers.33.mlp.gate",
|
| 229 |
+
"model.layers.34.self_attn.o_proj",
|
| 230 |
+
"model.layers.34.mlp.gate",
|
| 231 |
+
"model.layers.35.self_attn.o_proj",
|
| 232 |
+
"model.layers.35.mlp.gate",
|
| 233 |
+
"model.layers.36.self_attn.o_proj",
|
| 234 |
+
"model.layers.36.mlp.gate",
|
| 235 |
+
"model.layers.37.self_attn.o_proj",
|
| 236 |
+
"model.layers.37.mlp.gate",
|
| 237 |
+
"model.layers.38.self_attn.o_proj",
|
| 238 |
+
"model.layers.38.mlp.gate",
|
| 239 |
+
"model.layers.39.self_attn.o_proj",
|
| 240 |
+
"model.layers.39.mlp.gate",
|
| 241 |
+
"model.layers.40.self_attn.o_proj",
|
| 242 |
+
"model.layers.40.mlp.gate",
|
| 243 |
+
"model.layers.41.self_attn.o_proj",
|
| 244 |
+
"model.layers.41.mlp.gate",
|
| 245 |
+
"model.layers.42.self_attn.o_proj",
|
| 246 |
+
"model.layers.42.mlp.gate",
|
| 247 |
+
"model.layers.43.self_attn.o_proj",
|
| 248 |
+
"model.layers.43.mlp.gate",
|
| 249 |
+
"model.layers.44.self_attn.o_proj",
|
| 250 |
+
"model.layers.44.mlp.gate",
|
| 251 |
+
"model.layers.45.self_attn.o_proj",
|
| 252 |
+
"model.layers.45.mlp.gate",
|
| 253 |
+
"model.layers.46.self_attn.o_proj",
|
| 254 |
+
"model.layers.46.mlp.gate",
|
| 255 |
+
"model.layers.47.self_attn.o_proj",
|
| 256 |
+
"model.layers.47.mlp.gate",
|
| 257 |
+
"model.layers.48.self_attn.o_proj",
|
| 258 |
+
"model.layers.48.mlp.gate",
|
| 259 |
+
"model.layers.49.self_attn.o_proj",
|
| 260 |
+
"model.layers.49.mlp.gate",
|
| 261 |
+
"model.layers.50.self_attn.o_proj",
|
| 262 |
+
"model.layers.50.mlp.gate",
|
| 263 |
+
"model.layers.51.self_attn.o_proj",
|
| 264 |
+
"model.layers.51.mlp.gate",
|
| 265 |
+
"model.layers.52.self_attn.o_proj",
|
| 266 |
+
"model.layers.52.mlp.gate",
|
| 267 |
+
"model.layers.53.self_attn.o_proj",
|
| 268 |
+
"model.layers.53.mlp.gate",
|
| 269 |
+
"model.layers.54.self_attn.o_proj",
|
| 270 |
+
"model.layers.54.mlp.gate",
|
| 271 |
+
"model.layers.55.self_attn.o_proj",
|
| 272 |
+
"model.layers.55.mlp.gate",
|
| 273 |
+
"model.layers.56.self_attn.o_proj",
|
| 274 |
+
"model.layers.56.mlp.gate",
|
| 275 |
+
"model.layers.57.self_attn.o_proj",
|
| 276 |
+
"model.layers.57.mlp.gate",
|
| 277 |
+
"model.layers.58.self_attn.o_proj",
|
| 278 |
+
"model.layers.58.mlp.gate",
|
| 279 |
+
"model.layers.59.self_attn.o_proj",
|
| 280 |
+
"model.layers.59.mlp.gate",
|
| 281 |
+
"model.layers.60.self_attn.o_proj",
|
| 282 |
+
"model.layers.60.mlp.gate",
|
| 283 |
+
"model.layers.61.self_attn.o_proj",
|
| 284 |
+
"model.layers.61.mlp.gate",
|
| 285 |
+
"model.layers.62.self_attn.o_proj",
|
| 286 |
+
"model.layers.62.mlp.gate",
|
| 287 |
+
"model.layers.63.self_attn.o_proj",
|
| 288 |
+
"model.layers.63.mlp.gate",
|
| 289 |
+
"model.layers.64.self_attn.o_proj",
|
| 290 |
+
"model.layers.64.mlp.gate",
|
| 291 |
+
"model.layers.65.self_attn.o_proj",
|
| 292 |
+
"model.layers.65.mlp.gate",
|
| 293 |
+
"model.layers.66.self_attn.o_proj",
|
| 294 |
+
"model.layers.66.mlp.gate",
|
| 295 |
+
"model.layers.67.self_attn.o_proj",
|
| 296 |
+
"model.layers.67.mlp.gate",
|
| 297 |
+
"model.layers.68.self_attn.o_proj",
|
| 298 |
+
"model.layers.68.mlp.gate",
|
| 299 |
+
"model.layers.69.self_attn.o_proj",
|
| 300 |
+
"model.layers.69.mlp.gate",
|
| 301 |
+
"lm_head"
|
| 302 |
+
],
|
| 303 |
+
"kv_cache_scheme": {
|
| 304 |
+
"actorder": null,
|
| 305 |
+
"block_structure": null,
|
| 306 |
+
"dynamic": false,
|
| 307 |
+
"group_size": null,
|
| 308 |
+
"num_bits": 8,
|
| 309 |
+
"observer": "minmax",
|
| 310 |
+
"observer_kwargs": {},
|
| 311 |
+
"strategy": "tensor",
|
| 312 |
+
"symmetric": true,
|
| 313 |
+
"type": "float"
|
| 314 |
+
},
|
| 315 |
+
"quant_method": "compressed-tensors",
|
| 316 |
+
"quantization_status": "compressed",
|
| 317 |
+
"sparsity_config": {},
|
| 318 |
+
"transform_config": {},
|
| 319 |
+
"version": "0.11.0"
|
| 320 |
+
},
|
| 321 |
+
"quantization_config": {
|
| 322 |
+
"config_groups": {
|
| 323 |
+
"group_0": {
|
| 324 |
+
"format": "float-quantized",
|
| 325 |
+
"input_activations": {
|
| 326 |
+
"actorder": null,
|
| 327 |
+
"block_structure": null,
|
| 328 |
+
"dynamic": true,
|
| 329 |
+
"group_size": 128,
|
| 330 |
+
"num_bits": 8,
|
| 331 |
+
"observer": null,
|
| 332 |
+
"observer_kwargs": {},
|
| 333 |
+
"strategy": "group",
|
| 334 |
+
"symmetric": true,
|
| 335 |
+
"type": "float"
|
| 336 |
+
},
|
| 337 |
+
"output_activations": null,
|
| 338 |
+
"targets": [
|
| 339 |
+
"Linear"
|
| 340 |
+
],
|
| 341 |
+
"weights": {
|
| 342 |
+
"actorder": null,
|
| 343 |
+
"block_structure": [
|
| 344 |
+
128,
|
| 345 |
+
128
|
| 346 |
+
],
|
| 347 |
+
"dynamic": false,
|
| 348 |
+
"group_size": null,
|
| 349 |
+
"num_bits": 8,
|
| 350 |
+
"observer": "minmax",
|
| 351 |
+
"observer_kwargs": {},
|
| 352 |
+
"strategy": "block",
|
| 353 |
+
"symmetric": true,
|
| 354 |
+
"type": "float"
|
| 355 |
+
}
|
| 356 |
+
}
|
| 357 |
+
},
|
| 358 |
+
"format": "float-quantized",
|
| 359 |
+
"global_compression_ratio": null,
|
| 360 |
+
"ignore": [
|
| 361 |
+
"model.layers.0.self_attn.o_proj",
|
| 362 |
+
"model.layers.1.self_attn.o_proj",
|
| 363 |
+
"model.layers.2.self_attn.o_proj",
|
| 364 |
+
"model.layers.3.self_attn.o_proj",
|
| 365 |
+
"model.layers.3.mlp.gate",
|
| 366 |
+
"model.layers.4.self_attn.o_proj",
|
| 367 |
+
"model.layers.4.mlp.gate",
|
| 368 |
+
"model.layers.5.self_attn.o_proj",
|
| 369 |
+
"model.layers.5.mlp.gate",
|
| 370 |
+
"model.layers.6.self_attn.o_proj",
|
| 371 |
+
"model.layers.6.mlp.gate",
|
| 372 |
+
"model.layers.7.self_attn.o_proj",
|
| 373 |
+
"model.layers.7.mlp.gate",
|
| 374 |
+
"model.layers.8.self_attn.o_proj",
|
| 375 |
+
"model.layers.8.mlp.gate",
|
| 376 |
+
"model.layers.9.self_attn.o_proj",
|
| 377 |
+
"model.layers.9.mlp.gate",
|
| 378 |
+
"model.layers.10.self_attn.o_proj",
|
| 379 |
+
"model.layers.10.mlp.gate",
|
| 380 |
+
"model.layers.11.self_attn.o_proj",
|
| 381 |
+
"model.layers.11.mlp.gate",
|
| 382 |
+
"model.layers.12.self_attn.o_proj",
|
| 383 |
+
"model.layers.12.mlp.gate",
|
| 384 |
+
"model.layers.13.self_attn.o_proj",
|
| 385 |
+
"model.layers.13.mlp.gate",
|
| 386 |
+
"model.layers.14.self_attn.o_proj",
|
| 387 |
+
"model.layers.14.mlp.gate",
|
| 388 |
+
"model.layers.15.self_attn.o_proj",
|
| 389 |
+
"model.layers.15.mlp.gate",
|
| 390 |
+
"model.layers.16.self_attn.o_proj",
|
| 391 |
+
"model.layers.16.mlp.gate",
|
| 392 |
+
"model.layers.17.self_attn.o_proj",
|
| 393 |
+
"model.layers.17.mlp.gate",
|
| 394 |
+
"model.layers.18.self_attn.o_proj",
|
| 395 |
+
"model.layers.18.mlp.gate",
|
| 396 |
+
"model.layers.19.self_attn.o_proj",
|
| 397 |
+
"model.layers.19.mlp.gate",
|
| 398 |
+
"model.layers.20.self_attn.o_proj",
|
| 399 |
+
"model.layers.20.mlp.gate",
|
| 400 |
+
"model.layers.21.self_attn.o_proj",
|
| 401 |
+
"model.layers.21.mlp.gate",
|
| 402 |
+
"model.layers.22.self_attn.o_proj",
|
| 403 |
+
"model.layers.22.mlp.gate",
|
| 404 |
+
"model.layers.23.self_attn.o_proj",
|
| 405 |
+
"model.layers.23.mlp.gate",
|
| 406 |
+
"model.layers.24.self_attn.o_proj",
|
| 407 |
+
"model.layers.24.mlp.gate",
|
| 408 |
+
"model.layers.25.self_attn.o_proj",
|
| 409 |
+
"model.layers.25.mlp.gate",
|
| 410 |
+
"model.layers.26.self_attn.o_proj",
|
| 411 |
+
"model.layers.26.mlp.gate",
|
| 412 |
+
"model.layers.27.self_attn.o_proj",
|
| 413 |
+
"model.layers.27.mlp.gate",
|
| 414 |
+
"model.layers.28.self_attn.o_proj",
|
| 415 |
+
"model.layers.28.mlp.gate",
|
| 416 |
+
"model.layers.29.self_attn.o_proj",
|
| 417 |
+
"model.layers.29.mlp.gate",
|
| 418 |
+
"model.layers.30.self_attn.o_proj",
|
| 419 |
+
"model.layers.30.mlp.gate",
|
| 420 |
+
"model.layers.31.self_attn.o_proj",
|
| 421 |
+
"model.layers.31.mlp.gate",
|
| 422 |
+
"model.layers.32.self_attn.o_proj",
|
| 423 |
+
"model.layers.32.mlp.gate",
|
| 424 |
+
"model.layers.33.self_attn.o_proj",
|
| 425 |
+
"model.layers.33.mlp.gate",
|
| 426 |
+
"model.layers.34.self_attn.o_proj",
|
| 427 |
+
"model.layers.34.mlp.gate",
|
| 428 |
+
"model.layers.35.self_attn.o_proj",
|
| 429 |
+
"model.layers.35.mlp.gate",
|
| 430 |
+
"model.layers.36.self_attn.o_proj",
|
| 431 |
+
"model.layers.36.mlp.gate",
|
| 432 |
+
"model.layers.37.self_attn.o_proj",
|
| 433 |
+
"model.layers.37.mlp.gate",
|
| 434 |
+
"model.layers.38.self_attn.o_proj",
|
| 435 |
+
"model.layers.38.mlp.gate",
|
| 436 |
+
"model.layers.39.self_attn.o_proj",
|
| 437 |
+
"model.layers.39.mlp.gate",
|
| 438 |
+
"model.layers.40.self_attn.o_proj",
|
| 439 |
+
"model.layers.40.mlp.gate",
|
| 440 |
+
"model.layers.41.self_attn.o_proj",
|
| 441 |
+
"model.layers.41.mlp.gate",
|
| 442 |
+
"model.layers.42.self_attn.o_proj",
|
| 443 |
+
"model.layers.42.mlp.gate",
|
| 444 |
+
"model.layers.43.self_attn.o_proj",
|
| 445 |
+
"model.layers.43.mlp.gate",
|
| 446 |
+
"model.layers.44.self_attn.o_proj",
|
| 447 |
+
"model.layers.44.mlp.gate",
|
| 448 |
+
"model.layers.45.self_attn.o_proj",
|
| 449 |
+
"model.layers.45.mlp.gate",
|
| 450 |
+
"model.layers.46.self_attn.o_proj",
|
| 451 |
+
"model.layers.46.mlp.gate",
|
| 452 |
+
"model.layers.47.self_attn.o_proj",
|
| 453 |
+
"model.layers.47.mlp.gate",
|
| 454 |
+
"model.layers.48.self_attn.o_proj",
|
| 455 |
+
"model.layers.48.mlp.gate",
|
| 456 |
+
"model.layers.49.self_attn.o_proj",
|
| 457 |
+
"model.layers.49.mlp.gate",
|
| 458 |
+
"model.layers.50.self_attn.o_proj",
|
| 459 |
+
"model.layers.50.mlp.gate",
|
| 460 |
+
"model.layers.51.self_attn.o_proj",
|
| 461 |
+
"model.layers.51.mlp.gate",
|
| 462 |
+
"model.layers.52.self_attn.o_proj",
|
| 463 |
+
"model.layers.52.mlp.gate",
|
| 464 |
+
"model.layers.53.self_attn.o_proj",
|
| 465 |
+
"model.layers.53.mlp.gate",
|
| 466 |
+
"model.layers.54.self_attn.o_proj",
|
| 467 |
+
"model.layers.54.mlp.gate",
|
| 468 |
+
"model.layers.55.self_attn.o_proj",
|
| 469 |
+
"model.layers.55.mlp.gate",
|
| 470 |
+
"model.layers.56.self_attn.o_proj",
|
| 471 |
+
"model.layers.56.mlp.gate",
|
| 472 |
+
"model.layers.57.self_attn.o_proj",
|
| 473 |
+
"model.layers.57.mlp.gate",
|
| 474 |
+
"model.layers.58.self_attn.o_proj",
|
| 475 |
+
"model.layers.58.mlp.gate",
|
| 476 |
+
"model.layers.59.self_attn.o_proj",
|
| 477 |
+
"model.layers.59.mlp.gate",
|
| 478 |
+
"model.layers.60.self_attn.o_proj",
|
| 479 |
+
"model.layers.60.mlp.gate",
|
| 480 |
+
"model.layers.61.self_attn.o_proj",
|
| 481 |
+
"model.layers.61.mlp.gate",
|
| 482 |
+
"model.layers.62.self_attn.o_proj",
|
| 483 |
+
"model.layers.62.mlp.gate",
|
| 484 |
+
"model.layers.63.self_attn.o_proj",
|
| 485 |
+
"model.layers.63.mlp.gate",
|
| 486 |
+
"model.layers.64.self_attn.o_proj",
|
| 487 |
+
"model.layers.64.mlp.gate",
|
| 488 |
+
"model.layers.65.self_attn.o_proj",
|
| 489 |
+
"model.layers.65.mlp.gate",
|
| 490 |
+
"model.layers.66.self_attn.o_proj",
|
| 491 |
+
"model.layers.66.mlp.gate",
|
| 492 |
+
"model.layers.67.self_attn.o_proj",
|
| 493 |
+
"model.layers.67.mlp.gate",
|
| 494 |
+
"model.layers.68.self_attn.o_proj",
|
| 495 |
+
"model.layers.68.mlp.gate",
|
| 496 |
+
"model.layers.69.self_attn.o_proj",
|
| 497 |
+
"model.layers.69.mlp.gate",
|
| 498 |
+
"lm_head"
|
| 499 |
+
],
|
| 500 |
+
"kv_cache_scheme": {
|
| 501 |
+
"actorder": null,
|
| 502 |
+
"block_structure": null,
|
| 503 |
+
"dynamic": false,
|
| 504 |
+
"group_size": null,
|
| 505 |
+
"num_bits": 8,
|
| 506 |
+
"observer": "minmax",
|
| 507 |
+
"observer_kwargs": {},
|
| 508 |
+
"strategy": "tensor",
|
| 509 |
+
"symmetric": true,
|
| 510 |
+
"type": "float"
|
| 511 |
+
},
|
| 512 |
+
"quant_method": "compressed-tensors",
|
| 513 |
+
"quantization_status": "compressed",
|
| 514 |
+
"sparsity_config": {},
|
| 515 |
+
"transform_config": {},
|
| 516 |
+
"version": "0.11.0"
|
| 517 |
+
},
|
| 518 |
+
"norm_topk_prob": true,
|
| 519 |
+
"mlp_only_layers": [
|
| 520 |
+
0,
|
| 521 |
+
1,
|
| 522 |
+
2
|
| 523 |
+
],
|
| 524 |
+
"decoder_sparse_step": 1,
|
| 525 |
+
"sliding_window": 0
|
| 526 |
+
}
|
configuration_laguna.py
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ruff: noqa
|
| 2 |
+
# Copyright 2025 Poolside and the HuggingFace Inc. team. All rights reserved.
|
| 3 |
+
#
|
| 4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 |
+
# you may not use this file except in compliance with the License.
|
| 6 |
+
# You may obtain a copy of the License at
|
| 7 |
+
#
|
| 8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
| 9 |
+
#
|
| 10 |
+
# Unless required by applicable law or agreed to in writing, software
|
| 11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 |
+
# See the License for the specific language governing permissions and
|
| 14 |
+
# limitations under the License.
|
| 15 |
+
from transformers.configuration_utils import PreTrainedConfig
|
| 16 |
+
from transformers.modeling_rope_utils import RopeParameters
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
class LagunaConfig(PreTrainedConfig):
|
| 20 |
+
r"""
|
| 21 |
+
Configuration class for Laguna model.
|
| 22 |
+
|
| 23 |
+
Laguna is Poolside's MoE architecture with:
|
| 24 |
+
- Attention output gating (softplus gate)
|
| 25 |
+
- Sigmoid routing instead of softmax
|
| 26 |
+
- No QKV bias
|
| 27 |
+
- Explicit head_dim parameter
|
| 28 |
+
|
| 29 |
+
Args:
|
| 30 |
+
head_dim (`int`, *optional*, defaults to 128):
|
| 31 |
+
Dimension of attention heads. Laguna uses explicit head_dim rather than
|
| 32 |
+
computing it from hidden_size // num_attention_heads.
|
| 33 |
+
qkv_bias (`bool`, *optional*, defaults to `False`):
|
| 34 |
+
Whether to add bias to QKV projections. Laguna uses no QKV bias.
|
| 35 |
+
attention_bias (`bool`, *optional*, defaults to `False`):
|
| 36 |
+
Whether to add bias to attention output projection. Laguna uses no attention bias.
|
| 37 |
+
gating (`bool`, *optional*, defaults to `True`):
|
| 38 |
+
Whether to use softplus output gating on attention. When True, a g_proj linear
|
| 39 |
+
layer is added and attn_output = attn_output * softplus(g_proj(x)).
|
| 40 |
+
sliding_window (`int`, *optional*):
|
| 41 |
+
Sliding window attention size. Used by layers whose type in ``layer_types``
|
| 42 |
+
is ``"sliding_attention"``. When ``None``, all layers use full attention.
|
| 43 |
+
layer_types (`list[str]`, *optional*):
|
| 44 |
+
Per-layer attention type. Each element should be ``"sliding_attention"`` or
|
| 45 |
+
``"global_attention"``. Length must equal ``num_hidden_layers``. When ``None``,
|
| 46 |
+
all layers default to global attention.
|
| 47 |
+
swa_attention_sink_enabled (`bool`, *optional*, defaults to `False`):
|
| 48 |
+
Whether to enable learnable attention sinks on sliding-window attention layers.
|
| 49 |
+
When enabled, a per-head bias parameter is added that allows the model to attend
|
| 50 |
+
to position 0 even when it falls outside the sliding window.
|
| 51 |
+
swa_rope_parameters (`RopeParameters`, *optional*):
|
| 52 |
+
Separate RoPE configuration for sliding-window attention layers. When ``None``,
|
| 53 |
+
SWA layers use the same RoPE as global attention layers.
|
| 54 |
+
vocab_size (`int`, *optional*, defaults to 100352):
|
| 55 |
+
Vocabulary size of the Laguna model.
|
| 56 |
+
hidden_size (`int`, *optional*, defaults to 2048):
|
| 57 |
+
Dimension of the hidden representations.
|
| 58 |
+
intermediate_size (`int`, *optional*, defaults to 8192):
|
| 59 |
+
Dimension of the MLP representations for dense layers.
|
| 60 |
+
num_hidden_layers (`int`, *optional*, defaults to 48):
|
| 61 |
+
Number of hidden layers in the Transformer.
|
| 62 |
+
num_attention_heads (`int`, *optional*, defaults to 32):
|
| 63 |
+
Number of attention heads.
|
| 64 |
+
num_key_value_heads (`int`, *optional*, defaults to 8):
|
| 65 |
+
Number of key-value heads for GQA.
|
| 66 |
+
max_position_embeddings (`int`, *optional*, defaults to 4096):
|
| 67 |
+
Maximum sequence length.
|
| 68 |
+
rms_norm_eps (`float`, *optional*, defaults to 1e-6):
|
| 69 |
+
Epsilon for RMSNorm layers.
|
| 70 |
+
num_experts (`int`, *optional*, defaults to 256):
|
| 71 |
+
Number of routed experts.
|
| 72 |
+
num_experts_per_tok (`int`, *optional*, defaults to 16):
|
| 73 |
+
Number of experts selected per token (top-k).
|
| 74 |
+
moe_intermediate_size (`int`, *optional*, defaults to 1024):
|
| 75 |
+
Intermediate size of routed experts.
|
| 76 |
+
shared_expert_intermediate_size (`int`, *optional*, defaults to 1024):
|
| 77 |
+
Intermediate size of the shared expert.
|
| 78 |
+
norm_topk_prob (`bool`, *optional*, defaults to `True`):
|
| 79 |
+
Whether to normalize top-k routing probabilities.
|
| 80 |
+
decoder_sparse_step (`int`, *optional*, defaults to 1):
|
| 81 |
+
Frequency of MoE layers (1 = every layer is MoE after mlp_only_layers).
|
| 82 |
+
mlp_only_layers (`list[int]`, *optional*, defaults to `[0]`):
|
| 83 |
+
Layer indices that use dense MLP instead of MoE.
|
| 84 |
+
router_aux_loss_coef (`float`, *optional*, defaults to 0.001):
|
| 85 |
+
Auxiliary loss coefficient for load balancing.
|
| 86 |
+
rope_parameters (`RopeParameters`, *optional*):
|
| 87 |
+
RoPE configuration. Defaults to rope_theta=500000.0.
|
| 88 |
+
"""
|
| 89 |
+
|
| 90 |
+
model_type = "laguna"
|
| 91 |
+
keys_to_ignore_at_inference = ["past_key_values"]
|
| 92 |
+
base_model_tp_plan = {
|
| 93 |
+
"layers.*.self_attn.q_proj": "colwise",
|
| 94 |
+
"layers.*.self_attn.k_proj": "colwise",
|
| 95 |
+
"layers.*.self_attn.v_proj": "colwise",
|
| 96 |
+
"layers.*.self_attn.g_proj": "colwise", # Laguna-specific gating projection
|
| 97 |
+
"layers.*.self_attn.o_proj": "rowwise",
|
| 98 |
+
"layers.*.mlp.gate_proj": "colwise",
|
| 99 |
+
"layers.*.mlp.up_proj": "colwise",
|
| 100 |
+
"layers.*.mlp.down_proj": "rowwise",
|
| 101 |
+
}
|
| 102 |
+
base_model_pp_plan = {
|
| 103 |
+
"embed_tokens": (["input_ids"], ["inputs_embeds"]),
|
| 104 |
+
"layers": (["hidden_states", "attention_mask"], ["hidden_states"]),
|
| 105 |
+
"norm": (["hidden_states"], ["hidden_states"]),
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
def __init__(
|
| 109 |
+
self,
|
| 110 |
+
vocab_size: int = 100352,
|
| 111 |
+
hidden_size: int = 2048,
|
| 112 |
+
intermediate_size: int = 8192,
|
| 113 |
+
num_hidden_layers: int = 48,
|
| 114 |
+
num_attention_heads: int = 32,
|
| 115 |
+
num_key_value_heads: int = 8,
|
| 116 |
+
head_dim: int = 128,
|
| 117 |
+
qkv_bias: bool = False,
|
| 118 |
+
attention_bias: bool = False,
|
| 119 |
+
gating: bool = True,
|
| 120 |
+
hidden_act: str = "silu",
|
| 121 |
+
max_position_embeddings: int = 4096,
|
| 122 |
+
initializer_range: float = 0.02,
|
| 123 |
+
rms_norm_eps: float = 1e-6,
|
| 124 |
+
use_cache: bool = True,
|
| 125 |
+
tie_word_embeddings: bool = False,
|
| 126 |
+
rope_parameters: RopeParameters | dict[str, RopeParameters] | None = None,
|
| 127 |
+
attention_dropout: float = 0.0,
|
| 128 |
+
sliding_window: int | None = None,
|
| 129 |
+
layer_types: list[str] | None = None,
|
| 130 |
+
swa_attention_sink_enabled: bool = False,
|
| 131 |
+
swa_rope_parameters: RopeParameters | None = None,
|
| 132 |
+
num_experts: int = 256,
|
| 133 |
+
num_experts_per_tok: int = 16,
|
| 134 |
+
moe_intermediate_size: int = 1024,
|
| 135 |
+
shared_expert_intermediate_size: int = 1024,
|
| 136 |
+
norm_topk_prob: bool = True,
|
| 137 |
+
decoder_sparse_step: int = 1,
|
| 138 |
+
mlp_only_layers: list[int] | None = None,
|
| 139 |
+
router_aux_loss_coef: float = 0.001,
|
| 140 |
+
output_router_logits: bool = False,
|
| 141 |
+
**kwargs,
|
| 142 |
+
):
|
| 143 |
+
# Default mlp_only_layers: first layer is dense (moe_first_k_dense_replace=1)
|
| 144 |
+
if mlp_only_layers is None:
|
| 145 |
+
mlp_only_layers = [0]
|
| 146 |
+
|
| 147 |
+
# Default rope_parameters with Laguna's theta
|
| 148 |
+
if rope_parameters is None:
|
| 149 |
+
rope_parameters = {"rope_type": "default", "rope_theta": 500000.0}
|
| 150 |
+
|
| 151 |
+
self.vocab_size = vocab_size
|
| 152 |
+
self.hidden_size = hidden_size
|
| 153 |
+
self.intermediate_size = intermediate_size
|
| 154 |
+
self.num_hidden_layers = num_hidden_layers
|
| 155 |
+
self.num_attention_heads = num_attention_heads
|
| 156 |
+
self.num_key_value_heads = num_key_value_heads
|
| 157 |
+
self.head_dim = head_dim
|
| 158 |
+
self.qkv_bias = qkv_bias
|
| 159 |
+
self.attention_bias = attention_bias
|
| 160 |
+
self.gating = gating
|
| 161 |
+
self.hidden_act = hidden_act
|
| 162 |
+
self.max_position_embeddings = max_position_embeddings
|
| 163 |
+
self.initializer_range = initializer_range
|
| 164 |
+
self.rms_norm_eps = rms_norm_eps
|
| 165 |
+
self.use_cache = use_cache
|
| 166 |
+
self.rope_parameters = rope_parameters
|
| 167 |
+
self.attention_dropout = attention_dropout
|
| 168 |
+
# Sliding window attention arguments
|
| 169 |
+
self.sliding_window = sliding_window
|
| 170 |
+
self.layer_types = layer_types
|
| 171 |
+
self.swa_attention_sink_enabled = swa_attention_sink_enabled
|
| 172 |
+
self.swa_rope_parameters = swa_rope_parameters
|
| 173 |
+
# MoE arguments
|
| 174 |
+
self.num_experts = num_experts
|
| 175 |
+
self.num_experts_per_tok = num_experts_per_tok
|
| 176 |
+
self.moe_intermediate_size = moe_intermediate_size
|
| 177 |
+
self.shared_expert_intermediate_size = shared_expert_intermediate_size
|
| 178 |
+
self.norm_topk_prob = norm_topk_prob
|
| 179 |
+
self.decoder_sparse_step = decoder_sparse_step
|
| 180 |
+
self.mlp_only_layers = mlp_only_layers
|
| 181 |
+
self.router_aux_loss_coef = router_aux_loss_coef
|
| 182 |
+
self.output_router_logits = output_router_logits
|
| 183 |
+
|
| 184 |
+
super().__init__(tie_word_embeddings=tie_word_embeddings, **kwargs)
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
__all__ = ["LagunaConfig"]
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token_id": 2,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
2,
|
| 6 |
+
24
|
| 7 |
+
],
|
| 8 |
+
"max_new_tokens": 4096,
|
| 9 |
+
"pad_token_id": 9,
|
| 10 |
+
"temperature": 1.0,
|
| 11 |
+
"top_p": 1.0,
|
| 12 |
+
"min_p": 0.0
|
| 13 |
+
}
|
image/LOAD.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Image
|
| 2 |
+
|
| 3 |
+
`laguna-vllm-v0.19.0-overlay.tar.gz` is `vllm/vllm-openai:v0.19.0` plus the
|
| 4 |
+
Laguna model file (`vllm.model_executor.models.laguna`), the `poolside_v1`
|
| 5 |
+
tool parser (`vllm.tool_parsers.poolside_v1_tool_parser`), the
|
| 6 |
+
`poolside_v1` reasoning parser
|
| 7 |
+
(`vllm.reasoning.poolside_v1_reasoning_parser`), and `LagunaConfig`
|
| 8 |
+
(`vllm.transformers_utils.configs.laguna`). No CUDA kernels are rebuilt —
|
| 9 |
+
the base image's SM90/SM90A binaries are used unchanged.
|
| 10 |
+
|
| 11 |
+
## Load
|
| 12 |
+
|
| 13 |
+
```bash
|
| 14 |
+
gunzip -c laguna-vllm-v0.19.0-overlay.tar.gz | docker load
|
| 15 |
+
```
|
| 16 |
+
|
| 17 |
+
The loaded image is tagged `vllm-laguna:v0.19.0-overlay-port`.
|
| 18 |
+
|
| 19 |
+
## Integrity check
|
| 20 |
+
|
| 21 |
+
```bash
|
| 22 |
+
sha256sum laguna-vllm-v0.19.0-overlay.tar.gz
|
| 23 |
+
# expected: 4266d7fc0fda731e774beeb932493cc4f2de1a9c6030babd32eae30f7dc60b3a
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
## What's inside
|
| 27 |
+
|
| 28 |
+
- Base: `vllm/vllm-openai:v0.19.0` (PyTorch, CUDA, Triton, FlashAttention,
|
| 29 |
+
compressed-tensors, etc.)
|
| 30 |
+
- Added Python modules:
|
| 31 |
+
- `vllm/model_executor/models/laguna.py` — `LagunaForCausalLM`
|
| 32 |
+
- `vllm/tool_parsers/poolside_v1_tool_parser.py` — `PoolsideV1ToolParser`
|
| 33 |
+
- `vllm/reasoning/poolside_v1_reasoning_parser.py` — `PoolsideV1ReasoningParser`
|
| 34 |
+
- `vllm/transformers_utils/configs/laguna.py` — `LagunaConfig`
|
| 35 |
+
- Registry patches: `LagunaForCausalLM` added to the model registry;
|
| 36 |
+
`"poolside_v1"` added to the tool-parser and reasoning-parser lazy-register
|
| 37 |
+
dicts; `"laguna"` added to the config registry (so checkpoints don't need
|
| 38 |
+
a remote `configuration_laguna.py` and can be served without
|
| 39 |
+
`--trust-remote-code`).
|
| 40 |
+
- `transformers_utils/config.py::patch_rope_parameters` is patched to leave
|
| 41 |
+
a nested `rope_parameters` dict (e.g. `{full_attention: {...},
|
| 42 |
+
sliding_attention: {...}}`) intact instead of overwriting it with the
|
| 43 |
+
flat `rope_scaling`. Without this, interleaved-attention configs raise
|
| 44 |
+
`KeyError 'full_attention'` at the per-layer attention site on
|
| 45 |
+
transformers <5.
|
| 46 |
+
- Bundled convenience scripts:
|
| 47 |
+
- `/usr/local/bin/serve-laguna.sh` — Laguna-M serve wrapper (TP=4)
|
| 48 |
+
- `/usr/local/bin/run_bench_multiple.py` — multi-config benchmark runner
|
| 49 |
+
|
| 50 |
+
## Entrypoint
|
| 51 |
+
|
| 52 |
+
Default entrypoint is `vllm serve`, same as the base image. The first
|
| 53 |
+
positional argument is the model path (mount a checkpoint dir into `/model`).
|
image/laguna-vllm-v0.19.0-overlay.tar.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e37ec8966626070ab4cd87296b13bd80854442ba6a89a896fa136c67503057cd
|
| 3 |
+
size 9547511305
|
model-00001-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b290b33be8f24274158893c4581c92652ddab16ca649163964fb4015e90d2944
|
| 3 |
+
size 5118025988
|
model-00002-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:51497babd4107a6ce13ac33bd22397221b5c40da8f2c58dc6a940597c45a4c48
|
| 3 |
+
size 5076119676
|
model-00003-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3a7f85878afb3156b64de58640d08672aa6ffcc40294a878dd2e9d821fb9b297
|
| 3 |
+
size 5119814648
|
model-00004-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:eb355291dc19fbf36d0cea3eac0fc75b1ef50f13f1a248f7cd10b8dacf2576dd
|
| 3 |
+
size 5117975080
|
model-00005-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4df412f87fc9fb72872e390281deb47c13bf2e7833d402d8bc4dd65669affd5e
|
| 3 |
+
size 5117975272
|
model-00006-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7df42927f87d341b248253307df91a51847152f948d1f837daf3e8e51aabfed5
|
| 3 |
+
size 5117972952
|
model-00007-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a507b691db9b6b8902a76cf45b4f67e7b355ac538df167385a0c9efbe8445489
|
| 3 |
+
size 5117975496
|
model-00008-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a0db46e473b3723da63309f7ce342fcfc3679d7e2373e4bcaa890eda033af44a
|
| 3 |
+
size 5117977296
|
model-00009-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d13bb8520755eedef27b9ef8c11fd09cc437a5016977b53fc5f8e04742936b8
|
| 3 |
+
size 5117975712
|
model-00010-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a3bc781cb8eaa228c8495c7955fa6012ddf7549532041b3817cfda166405c627
|
| 3 |
+
size 5117977624
|
model-00011-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa125530b4c72714c8c1a47cbe3c354fb26970fc9bd3995b3100db76e7334298
|
| 3 |
+
size 5117977328
|
model-00012-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:141fed6170c479b11579693229a5cac1015ad54185d7419d96342224e7248b27
|
| 3 |
+
size 5117976000
|
model-00013-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8bc474905b40baf5f211a40f598ad64e262d87a04c9e43029291e9fddbb63b1e
|
| 3 |
+
size 5117977288
|
model-00014-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45f97cd0e76816fa86ad0624f27e30d14560f032262db12448df5bbc0528ef84
|
| 3 |
+
size 5117977688
|
model-00015-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d87e883e021bc9135a48cd6a989810c1aea623b7afc3175ef8360999d663189
|
| 3 |
+
size 5117975640
|
model-00016-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7a7762781077993192c1f138f2fcf3515311a52d100c6e9ba7689df6845ee887
|
| 3 |
+
size 5117977424
|
model-00017-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:344cfddb8359935bd779b18a7ab3cc9a81ff8eeefe2774763398c2e5a592a146
|
| 3 |
+
size 5117977808
|
model-00018-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c0a8ad03f4a4eae9f7c3536d773f257f025708866a0c3749cf4799747c1e2e25
|
| 3 |
+
size 5117975392
|
model-00019-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:79531f7918635bf9ccee16dd866dbd3d344ac5e5497478bb77bcb42a9a0ba47d
|
| 3 |
+
size 5117977784
|
model-00020-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:190fa1ec6b12b962d6caa0be6f1dbe651d4ef9a2cc552df56cf0eee223ede72e
|
| 3 |
+
size 5117977448
|
model-00021-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:55ad531b4dc60f10f3bd7087185a4008c91ab104e41daab44e0d131b4b766883
|
| 3 |
+
size 5117975616
|
model-00022-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:683e93e8476675e6d87d7d860fb5b065f2b1b97d0894b58c2567cb53350e10ea
|
| 3 |
+
size 5117977720
|
model-00023-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64ee6bc48169f2dc0c46538776ed5296dd1001cb9b75b3d4939c4bd164b7ab44
|
| 3 |
+
size 5117977280
|
model-00024-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4f2e8dc4be3997a55a224365c613c1462f2ea0885ca608c3084f4ca163bd3918
|
| 3 |
+
size 5117976024
|
model-00025-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:173a21679839bbc181e9d42838905a6daba0102d9936183e62c186378a1f70f7
|
| 3 |
+
size 5117977312
|
model-00026-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b81b4f24d2a5ae0d1b36da3a05232023fc1ac22648f17ee440368b93c513f43e
|
| 3 |
+
size 5117977592
|
model-00027-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ed8db746a64b39583460987dcf7837c89121fd5b503d470daa8e382f6ec809e
|
| 3 |
+
size 5117975736
|
model-00028-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:897af0aa64c57ee745e7755cccf44186cacd2c126079a5ed7ba128f779b1b4af
|
| 3 |
+
size 5117977328
|
model-00029-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4547844b8f2459614ec1827a6c6c63a6b475b9985976d6ba8ceff42707712255
|
| 3 |
+
size 5117977904
|
model-00030-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0b319bc30d56166272c24fd940db154abc7d2cfe28114881132dd2cd4c6c371f
|
| 3 |
+
size 5117975392
|
model-00031-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ce98d325af4afca16ee57fbfb00f99f9fe21dc18b737e397c35dca31355f6bb8
|
| 3 |
+
size 5117977688
|
model-00032-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92be0d5a3c99f5747811535823082d229ab7761b5c37209da7d1376e691e30cb
|
| 3 |
+
size 5117977544
|
model-00033-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3b6864788416250c01dd7ce310be952ced6c7a0879fce037afb5ed5e5a81eaba
|
| 3 |
+
size 5117975520
|
model-00034-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e1871a96b175a0b7cd07634699507ca0c371a963d6ed1bad04605ae659dc3529
|
| 3 |
+
size 5117977816
|
model-00035-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:705d2d0d053ecd855d992a8375ff6a2c174a0a4a6447d8a2d7bed47594644e5e
|
| 3 |
+
size 5117977280
|
model-00036-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a282fc251fc7af44d6b5740956f4cb260790f16b8d5bb9ab1b7bb6552ecd16d
|
| 3 |
+
size 5117975880
|
model-00037-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:66d9273a4b70096c7b744537003f69b10318766159c1cd1cf8110a0c45bdd39f
|
| 3 |
+
size 5117977456
|
model-00038-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5dd3b670462fe6541fd3adf3efc418dcd6cc01d08e91c4f71308e431f0e923f
|
| 3 |
+
size 5117977496
|
model-00039-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9535270c4e3b6f44e9a4ce22211a95ad2efb7ef506ebb353a690f743957fe03a
|
| 3 |
+
size 5117975832
|
model-00040-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ab1738642cb5acd0588885fd37744ff2ceccc5a510850b97e94ae968f4844507
|
| 3 |
+
size 5117977288
|
model-00041-of-00045.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3593b856d0116ffeb34c55cafc6400d0688cad70e9da610ccfa8438701f9d0d7
|
| 3 |
+
size 5117977896
|