Instructions to use mendelmakerpaul/echopeak-models with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use mendelmakerpaul/echopeak-models with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=mendelmakerpaul/echopeak-models \ --prompt="Write me a poem"
- LiteRT
How to use mendelmakerpaul/echopeak-models with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Add Gemma 4 E2B and Gemma 3 1B litertlm weights with licences
Browse files- .gitattributes +5 -35
- Gemma3-1B-IT_multi-prefill-seq_q4_ekv4096.litertlm +3 -0
- LICENSE-apache-2.0.txt +176 -0
- LICENSE-gemma-terms.txt +206 -0
- NOTICE +29 -0
- PROHIBITED_USE_POLICY.txt +38 -0
- README.md +68 -0
- SHA256SUMS.txt +2 -0
- fetch_licenses.py +127 -0
- gemma-4-E2B-it.litertlm +3 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,5 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
*.
|
| 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
|
|
|
|
| 1 |
+
# LiteRT-LM weight files are multi-GB binaries and must go through Git LFS.
|
| 2 |
+
# Hugging Face auto-configures LFS for common extensions, but .litertlm is not one
|
| 3 |
+
# of them — without this line a 2.6 GB file would be pushed as a plain blob and the
|
| 4 |
+
# push is rejected.
|
| 5 |
+
*.litertlm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Gemma3-1B-IT_multi-prefill-seq_q4_ekv4096.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1325ae366d31950f137c9c357b9fa89448b176d76998180c08ceaca78bba98be
|
| 3 |
+
size 584417280
|
LICENSE-apache-2.0.txt
ADDED
|
@@ -0,0 +1,176 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
LICENSE-gemma-terms.txt
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gemma Terms of Use
|
| 2 |
+
|
| 3 |
+
The terms below apply to Gemma models listed in the Appendix at bottom of this page. For Gemma 4 terms, see the [Gemma 4 license](https://ai.google.dev/gemma/apache_2).
|
| 4 |
+
|
| 5 |
+
Last modified: April 1, 2026
|
| 6 |
+
|
| 7 |
+
By using, reproducing, modifying, distributing, performing or displaying any
|
| 8 |
+
portion or element of Gemma, Model Derivatives including via any Hosted Service,
|
| 9 |
+
(each as defined below) (collectively, the "**Gemma Services**") or otherwise
|
| 10 |
+
accepting the terms of this Agreement, you agree to be bound by this Agreement.
|
| 11 |
+
|
| 12 |
+
## Section 1: DEFINITIONS
|
| 13 |
+
|
| 14 |
+
### 1.1 Definitions
|
| 15 |
+
|
| 16 |
+
(a) "**Agreement** " or "**Gemma Terms of Use**" means these terms and conditions
|
| 17 |
+
that govern the use, reproduction, Distribution or modification of the Gemma
|
| 18 |
+
Services and any terms and conditions incorporated by reference.
|
| 19 |
+
|
| 20 |
+
(b) "**Distribution** " or "**Distribute** " means any transmission, publication,
|
| 21 |
+
or other sharing of Gemma or Model Derivatives to a third party, including by
|
| 22 |
+
providing or making Gemma or its functionality available as a hosted service via
|
| 23 |
+
API, web access, or any other electronic or remote means ("**Hosted Service**").
|
| 24 |
+
|
| 25 |
+
(c) "**Gemma** " means the set of machine learning language models, trained model
|
| 26 |
+
weights and parameters identified in the [Appendix](https://ai.google.dev/gemma/terms#appendix),
|
| 27 |
+
regardless of the source that you obtained it from.
|
| 28 |
+
|
| 29 |
+
(d) "**Google**" means Google LLC.
|
| 30 |
+
|
| 31 |
+
(e) "**Model Derivatives**" means all (i) modifications to Gemma, (ii) works based
|
| 32 |
+
on Gemma, or (iii) any other machine learning model which is created by transfer
|
| 33 |
+
of patterns of the weights, parameters, operations, or Output of Gemma, to that
|
| 34 |
+
model in order to cause that model to perform similarly to Gemma, including
|
| 35 |
+
distillation methods that use intermediate data representations or methods based
|
| 36 |
+
on the generation of synthetic data Outputs by Gemma for training that model.
|
| 37 |
+
For clarity, Outputs are not deemed Model Derivatives.
|
| 38 |
+
|
| 39 |
+
(f) "**Output**" means the information content output of Gemma or a Model
|
| 40 |
+
Derivative that results from operating or otherwise using Gemma or the Model
|
| 41 |
+
Derivative, including via a Hosted Service.
|
| 42 |
+
|
| 43 |
+
### 1.2
|
| 44 |
+
|
| 45 |
+
As used in this Agreement, "**including** " means
|
| 46 |
+
"**including without limitation**".
|
| 47 |
+
|
| 48 |
+
## Section 2: ELIGIBILITY AND USAGE
|
| 49 |
+
|
| 50 |
+
### 2.1 Eligibility
|
| 51 |
+
|
| 52 |
+
You represent and warrant that you have the legal capacity to enter into this
|
| 53 |
+
Agreement (including being of sufficient age of consent). If you are accessing
|
| 54 |
+
or using any of the Gemma Services for or on behalf of a legal entity, (a) you
|
| 55 |
+
are entering into this Agreement on behalf of yourself and that legal entity,
|
| 56 |
+
(b) you represent and warrant that you have the authority to act on behalf of
|
| 57 |
+
and bind that entity to this Agreement and (c) references to "**you** " or
|
| 58 |
+
"**your**" in the remainder of this Agreement refers to both you (as an
|
| 59 |
+
individual) and that entity.
|
| 60 |
+
|
| 61 |
+
### 2.2 Use
|
| 62 |
+
|
| 63 |
+
You may use, reproduce, modify, Distribute, perform or display any of the Gemma
|
| 64 |
+
Services only in accordance with the terms of this Agreement, and must not
|
| 65 |
+
violate (or encourage or permit anyone else to violate) any term of this
|
| 66 |
+
Agreement.
|
| 67 |
+
|
| 68 |
+
## Section 3: DISTRIBUTION AND RESTRICTIONS
|
| 69 |
+
|
| 70 |
+
### 3.1 Distribution and Redistribution
|
| 71 |
+
|
| 72 |
+
You may reproduce or Distribute copies of Gemma or Model Derivatives if you meet
|
| 73 |
+
all of the following conditions:
|
| 74 |
+
|
| 75 |
+
1. You must include the use restrictions referenced in Section 3.2 as an enforceable provision in any agreement (e.g., license agreement, terms of use, etc.) governing the use and/or distribution of Gemma or Model Derivatives and you must provide notice to subsequent users you Distribute to that Gemma or Model Derivatives are subject to the use restrictions in Section 3.2.
|
| 76 |
+
2. You must provide all third party recipients of Gemma or Model Derivatives a copy of this Agreement.
|
| 77 |
+
3. You must cause any modified files to carry prominent notices stating that you modified the files.
|
| 78 |
+
4. All Distributions (other than through a Hosted Service) must be accompanied by a "**Notice** " text file that contains the following notice: "**Gemma is provided under and subject to the Gemma Terms of Use found at ai.google.dev/gemma/terms**".
|
| 79 |
+
|
| 80 |
+
You may add your own intellectual property statement to your modifications and,
|
| 81 |
+
except as set forth in this Section, may provide additional or different terms
|
| 82 |
+
and conditions for use, reproduction, or Distribution of your modifications, or
|
| 83 |
+
for any such Model Derivatives as a whole, provided your use, reproduction,
|
| 84 |
+
modification, Distribution, performance, and display of Gemma otherwise complies
|
| 85 |
+
with the terms and conditions of this Agreement. Any additional or different
|
| 86 |
+
terms and conditions you impose must not conflict with the terms of this
|
| 87 |
+
Agreement.
|
| 88 |
+
|
| 89 |
+
### 3.2 Use Restrictions
|
| 90 |
+
|
| 91 |
+
You must not use any of the Gemma Services:
|
| 92 |
+
|
| 93 |
+
1. for the restricted uses set forth in the Gemma Prohibited Use Policy at [ai.google.dev/gemma/prohibited_use_policy](https://ai.google.dev/gemma/prohibited_use_policy) ("**Prohibited Use Policy**"), which is hereby incorporated by reference into this Agreement; or
|
| 94 |
+
2. in violation of applicable laws and regulations.
|
| 95 |
+
|
| 96 |
+
To the maximum extent permitted by law, Google reserves the right to restrict
|
| 97 |
+
(remotely or otherwise) usage of any of the Gemma Services that Google
|
| 98 |
+
reasonably believes are in violation of this Agreement.
|
| 99 |
+
|
| 100 |
+
### 3.3 Generated Output
|
| 101 |
+
|
| 102 |
+
Google claims no rights in Outputs you generate using Gemma. You and your users
|
| 103 |
+
are solely responsible for Outputs and their subsequent uses.
|
| 104 |
+
|
| 105 |
+
## Section 4: ADDITIONAL PROVISIONS
|
| 106 |
+
|
| 107 |
+
### 4.1 Updates
|
| 108 |
+
|
| 109 |
+
Google may update Gemma from time to time.
|
| 110 |
+
|
| 111 |
+
### 4.2 Trademarks
|
| 112 |
+
|
| 113 |
+
Nothing in this Agreement grants you any rights to use Google's trademarks,
|
| 114 |
+
trade names, logos or to otherwise suggest endorsement or misrepresent the
|
| 115 |
+
relationship between you and Google. Google reserves any rights not expressly
|
| 116 |
+
granted herein.
|
| 117 |
+
|
| 118 |
+
### 4.3 DISCLAIMER OF WARRANTY
|
| 119 |
+
|
| 120 |
+
UNLESS REQUIRED BY APPLICABLE LAW, THE GEMMA SERVICES, AND OUTPUTS, ARE PROVIDED
|
| 121 |
+
ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER
|
| 122 |
+
EXPRESS OR IMPLIED, INCLUDING ANY WARRANTIES OR CONDITIONS OF TITLE,
|
| 123 |
+
NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE
|
| 124 |
+
SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, REPRODUCING,
|
| 125 |
+
MODIFYING, PERFORMING, DISPLAYING OR DISTRIBUTING ANY OF THE GEMMA SERVICES
|
| 126 |
+
OR OUTPUTS AND ASSUME ANY AND ALL RISKS ASSOCIATED WITH YOUR USE OR DISTRIBUTION
|
| 127 |
+
OF ANY OF THE GEMMA SERVICES OR OUTPUTS AND YOUR EXERCISE OF RIGHTS AND
|
| 128 |
+
PERMISSIONS UNDER THIS AGREEMENT.
|
| 129 |
+
|
| 130 |
+
### 4.4 LIMITATION OF LIABILITY
|
| 131 |
+
|
| 132 |
+
TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO
|
| 133 |
+
LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY,
|
| 134 |
+
CONTRACT, OR OTHERWISE, UNLESS REQUIRED BY APPLICABLE LAW, SHALL GOOGLE OR ITS
|
| 135 |
+
AFFILIATES BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT,
|
| 136 |
+
SPECIAL, INCIDENTAL, EXEMPLARY, CONSEQUENTIAL, OR PUNITIVE DAMAGES, OR LOST
|
| 137 |
+
PROFITS OF ANY KIND ARISING FROM THIS AGREEMENT OR RELATED TO, ANY OF THE GEMMA
|
| 138 |
+
SERVICES OR OUTPUTS EVEN IF GOOGLE OR ITS AFFILIATES HAVE BEEN ADVISED OF THE
|
| 139 |
+
POSSIBILITY OF SUCH DAMAGES.
|
| 140 |
+
|
| 141 |
+
### 4.5 Term, Termination, and Survival
|
| 142 |
+
|
| 143 |
+
The term of this Agreement will commence upon your acceptance of this Agreement
|
| 144 |
+
(including acceptance by your use, modification, or Distribution, reproduction,
|
| 145 |
+
performance or display of any portion or element of the Gemma Services) and will
|
| 146 |
+
continue in full force and effect until terminated in accordance with the terms
|
| 147 |
+
of this Agreement. Google may terminate this Agreement if you are in breach of
|
| 148 |
+
any term of this Agreement. Upon termination of this Agreement, you must delete
|
| 149 |
+
and cease use and Distribution of all copies of Gemma and Model Derivatives in
|
| 150 |
+
your possession or control. Sections 1, 2.1, 3.3, 4.2 to 4.9 shall survive the
|
| 151 |
+
termination of this Agreement.
|
| 152 |
+
|
| 153 |
+
### 4.6 Governing Law and Jurisdiction
|
| 154 |
+
|
| 155 |
+
This Agreement will be governed by the laws of the State of California without
|
| 156 |
+
regard to choice of law principles. The UN Convention on Contracts for the
|
| 157 |
+
International Sale of Goods does not apply to this Agreement. The state and
|
| 158 |
+
federal courts of Santa Clara County, California shall have exclusive
|
| 159 |
+
jurisdiction of any dispute arising out of this Agreement.
|
| 160 |
+
|
| 161 |
+
### 4.7 Severability
|
| 162 |
+
|
| 163 |
+
If any provision of this Agreement is held to be invalid, illegal or
|
| 164 |
+
unenforceable, the remaining provisions shall be unaffected thereby and remain
|
| 165 |
+
valid as if such provision had not been set forth herein.
|
| 166 |
+
|
| 167 |
+
### 4.8 Entire Agreement
|
| 168 |
+
|
| 169 |
+
This Agreement states all the terms agreed between the parties and supersedes
|
| 170 |
+
all other agreements between the parties as of the date of acceptance relating
|
| 171 |
+
to its subject matter.
|
| 172 |
+
|
| 173 |
+
### 4.9 No Waiver
|
| 174 |
+
|
| 175 |
+
Google will not be treated as having waived any rights by not exercising (or
|
| 176 |
+
delaying the exercise of) any rights under this Agreement.
|
| 177 |
+
|
| 178 |
+
## Appendix
|
| 179 |
+
|
| 180 |
+
- [Gemma 1](https://ai.google.dev/gemma/docs/core/model_card)
|
| 181 |
+
- [Gemma 1.1](https://ai.google.dev/gemma/docs/core/model_card)
|
| 182 |
+
- [Gemma 2](https://ai.google.dev/gemma/docs/core/model_card_2)
|
| 183 |
+
- [Gemma 3](https://ai.google.dev/gemma/docs/core/model_card_3)
|
| 184 |
+
- [Gemma 3n](https://ai.google.dev/gemma/docs/3n)
|
| 185 |
+
- [FunctionGemma](https://ai.google.dev/gemma/docs/functiongemma)
|
| 186 |
+
- [EmbeddingGemma](https://ai.google.dev/gemma/docs/embeddinggemma)
|
| 187 |
+
- [PaliGemma](https://ai.google.dev/gemma/docs/paligemma/model-card)
|
| 188 |
+
- [PaliGemma 2](https://ai.google.dev/gemma/docs/paligemma/model-card-2)
|
| 189 |
+
- [ShieldGemma](https://ai.google.dev/gemma/docs/shieldgemma/model_card)
|
| 190 |
+
- [ShieldGemma 2](https://ai.google.dev/gemma/docs/shieldgemma/model_card_2)
|
| 191 |
+
- [CodeGemma](https://ai.google.dev/gemma/docs/codegemma/model_card)
|
| 192 |
+
- [CodeGemma 1.1](https://ai.google.dev/gemma/docs/codegemma/model_card)
|
| 193 |
+
- [Gemma 2 JPN](https://huggingface.co/google/gemma-2-2b-jpn-it)
|
| 194 |
+
- [DataGemma RIG](https://www.kaggle.com/models/google/datagemma-rig)
|
| 195 |
+
- [DataGemma RAG](https://www.kaggle.com/models/google/datagemma-rag)
|
| 196 |
+
- [RecurrentGemma](https://ai.google.dev/gemma/docs/recurrentgemma/model_card)
|
| 197 |
+
- [Gemma Scope](https://ai.google.dev/gemma/docs/gemma_scope)
|
| 198 |
+
- [Gemma-APS](https://ai.google.dev/gemma/docs/gemma-aps)
|
| 199 |
+
- [T5Gemma](https://www.kaggle.com/models/google/t5gemma)
|
| 200 |
+
- [VaultGemma](https://www.kaggle.com/models/google/vaultgemma)
|
| 201 |
+
- [FunctionGemma](https://www.kaggle.com/models/google/functiongemma)
|
| 202 |
+
- [T5Gemma 2](https://www.kaggle.com/models/google/t5gemma-2)
|
| 203 |
+
- [TranslateGemma](https://www.kaggle.com/models/google/translategemma)
|
| 204 |
+
|
| 205 |
+
> [!NOTE]
|
| 206 |
+
> **Note:** Previous versions of these Terms are [archived here](https://ai.google.dev/gemma/terms-archive).
|
NOTICE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This repository redistributes Google's Gemma models for use by the EchoPeak (山應)
|
| 2 |
+
offline wilderness assistant. The models are unmodified Google releases except as
|
| 3 |
+
stated in README.md.
|
| 4 |
+
|
| 5 |
+
--------------------------------------------------------------------------------
|
| 6 |
+
gemma-4-E2B-it.litertlm
|
| 7 |
+
--------------------------------------------------------------------------------
|
| 8 |
+
|
| 9 |
+
Gemma 4 is provided by Google under the Apache License, Version 2.0.
|
| 10 |
+
A copy of the license is included as LICENSE-apache-2.0.txt, and is also
|
| 11 |
+
available at:
|
| 12 |
+
|
| 13 |
+
https://ai.google.dev/gemma/apache_2
|
| 14 |
+
|
| 15 |
+
--------------------------------------------------------------------------------
|
| 16 |
+
gemma3-1b-it-int4.litertlm
|
| 17 |
+
--------------------------------------------------------------------------------
|
| 18 |
+
|
| 19 |
+
Gemma is provided under and subject to the Gemma Terms of Use found at
|
| 20 |
+
ai.google.dev/gemma/terms
|
| 21 |
+
|
| 22 |
+
A copy of those terms is included as LICENSE-gemma-terms.txt. Use of this model is
|
| 23 |
+
additionally subject to the Gemma Prohibited Use Policy, included as
|
| 24 |
+
PROHIBITED_USE_POLICY.txt and available at:
|
| 25 |
+
|
| 26 |
+
https://ai.google.dev/gemma/prohibited_use_policy
|
| 27 |
+
|
| 28 |
+
Gemma 3 is listed in the Appendix of the Gemma Terms of Use and is therefore
|
| 29 |
+
governed by those terms rather than the Apache License.
|
PROHIBITED_USE_POLICY.txt
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Gemma Prohibited Use Policy
|
| 2 |
+
|
| 3 |
+
Google reserves the right to update this Gemma Prohibited Use Policy from time
|
| 4 |
+
to time.
|
| 5 |
+
|
| 6 |
+
Last modified: February 21, 2024
|
| 7 |
+
|
| 8 |
+
You **may not** use nor allow others to use Gemma or Model Derivatives to:
|
| 9 |
+
|
| 10 |
+
1. Generate any content, including the outputs or results generated by Gemma or Model Derivatives, that infringes, misappropriates, or otherwise violates any individual's or entity's rights (including, but not limited to rights in copyrighted content).
|
| 11 |
+
2. Perform or facilitate dangerous, illegal, or malicious activities, including:
|
| 12 |
+
1. Facilitation or promotion of illegal activities or violations of law, such as:
|
| 13 |
+
1. Promoting or generating content related to child sexual abuse or exploitation;
|
| 14 |
+
2. Promoting or facilitating sale of, or providing instructions for synthesizing or accessing, illegal substances, goods, or services;
|
| 15 |
+
3. Facilitating or encouraging users to commit any type of crimes; or
|
| 16 |
+
4. Promoting or generating violent extremism or terrorist content.
|
| 17 |
+
2. Engagement in the illegal or unlicensed practice of any vocation or profession including, but not limited to, legal, medical, accounting, or financial professional practices.
|
| 18 |
+
3. Abuse, harm, interference, or disruption of services (or enable others to do the same), such as:
|
| 19 |
+
1. Promoting or facilitating the generation or distribution of spam; or
|
| 20 |
+
2. Generating content for deceptive or fraudulent activities, scams, phishing, or malware.
|
| 21 |
+
4. Attempts to override or circumvent safety filters or intentionally drive Gemma or Model Derivatives to act in a manner that contravenes this Gemma Prohibited Use Policy.
|
| 22 |
+
5. Generation of content that may harm or promote the harm of individuals or a group, such as:
|
| 23 |
+
1. Generating content that promotes or encourages hatred;
|
| 24 |
+
2. Facilitating methods of harassment or bullying to intimidate, abuse, or insult others;
|
| 25 |
+
3. Generating content that facilitates, promotes, or incites violence;
|
| 26 |
+
4. Generating content that facilitates, promotes, or encourages self harm;
|
| 27 |
+
5. Generating personally identifying information for distribution or other harms;
|
| 28 |
+
6. Tracking or monitoring people without their consent;
|
| 29 |
+
7. Generating content that may have unfair or adverse impacts on people, particularly impacts related to sensitive or protected characteristics; or
|
| 30 |
+
8. Generating, gathering, processing, or inferring sensitive personal or private information about individuals without obtaining all rights, authorizations, and consents required by applicable laws.
|
| 31 |
+
3. Generate and distribute content intended to misinform, misrepresent or mislead, including:
|
| 32 |
+
1. Misrepresentation of the provenance of generated content by claiming content was created by a human, or represent generated content as original works, in order to deceive;
|
| 33 |
+
2. Generation of content that impersonates an individual (living or dead) without explicit disclosure, in order to deceive;
|
| 34 |
+
3. Misleading claims of expertise or capability made particularly in sensitive areas (e.g. health, finance, government services, or legal);
|
| 35 |
+
4. Making automated decisions in domains that affect material or individual rights or well-being (e.g., finance, legal, employment, healthcare, housing, insurance, and social welfare);
|
| 36 |
+
5. Generation of defamatory content, including defamatory statements, images, or audio content; or
|
| 37 |
+
6. Engaging in the unauthorized or unlicensed practice of any profession including, but not limited to, financial, legal, medical/health, or related professional practices.
|
| 38 |
+
4. Generate sexually explicit content, including content created for the purposes of pornography or sexual gratification (e.g. sexual chatbots). Note that this does not include content created for scientific, educational, documentary, or artistic purposes.
|
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: mixed-apache-2.0-and-gemma-terms
|
| 4 |
+
license_link: https://ai.google.dev/gemma/terms
|
| 5 |
+
tags:
|
| 6 |
+
- litert
|
| 7 |
+
- litert-lm
|
| 8 |
+
- gemma
|
| 9 |
+
- on-device
|
| 10 |
+
- android
|
| 11 |
+
language:
|
| 12 |
+
- zh
|
| 13 |
+
- en
|
| 14 |
+
library_name: litert-lm
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# EchoPeak 模型鏡像(Gemma for LiteRT-LM)
|
| 18 |
+
|
| 19 |
+
本 repo 轉載 Google 的 Gemma 模型(LiteRT-LM `.litertlm` 格式),供
|
| 20 |
+
**山應 / EchoPeak** 離線山林知識問答 App 於首次使用時依裝置能力自動下載。
|
| 21 |
+
|
| 22 |
+
> ⚠️ **本 repo 不是模型原作者。** 模型由 Google 製作與發布,本處僅為可匿名下載的鏡像。
|
| 23 |
+
> 官方來源請見下方連結。
|
| 24 |
+
|
| 25 |
+
## 為什麼要有這個鏡像
|
| 26 |
+
|
| 27 |
+
Google 官方的 Gemma repo 為 **gated**:下載前需登入 Hugging Face、接受授權並帶
|
| 28 |
+
access token。離線 App 無法在使用者未登入 HF 的情況下匿名下載,也不應把 token 編進
|
| 29 |
+
APK。因此本 repo 以 public 形式轉載,並依授權要求隨附完整條款。
|
| 30 |
+
|
| 31 |
+
## 檔案
|
| 32 |
+
|
| 33 |
+
| 檔案 | 大小 | 授權 | App 內層級 |
|
| 34 |
+
|---|---|---|---|
|
| 35 |
+
| `gemma-4-E2B-it.litertlm` | 約 2.59 GB | **Apache 2.0** | STANDARD(12 GB 級手機) |
|
| 36 |
+
| `Gemma3-1B-IT_multi-prefill-seq_q4_ekv4096.litertlm` | 約 0.5 GB | **Gemma Terms of Use** | LIGHT(6–8 GB 級手機) |
|
| 37 |
+
|
| 38 |
+
**兩顆模型授權不同,請勿混用條款:**
|
| 39 |
+
|
| 40 |
+
- **Gemma 4** 採 Apache License 2.0 → [`LICENSE-apache-2.0.txt`](LICENSE-apache-2.0.txt)
|
| 41 |
+
- **Gemma 3** 列於 Gemma Terms of Use 的 Appendix,採該自訂條款 →
|
| 42 |
+
[`LICENSE-gemma-terms.txt`](LICENSE-gemma-terms.txt),並受
|
| 43 |
+
[`PROHIBITED_USE_POLICY.txt`](PROHIBITED_USE_POLICY.txt) 規範。
|
| 44 |
+
|
| 45 |
+
完整聲明見 [`NOTICE`](NOTICE)。
|
| 46 |
+
|
| 47 |
+
## 官方來源
|
| 48 |
+
|
| 49 |
+
- Gemma 說明與模型:<https://ai.google.dev/gemma>
|
| 50 |
+
- Gemma 4 授權(Apache 2.0):<https://ai.google.dev/gemma/apache_2>
|
| 51 |
+
- Gemma Terms of Use:<https://ai.google.dev/gemma/terms>
|
| 52 |
+
- Gemma Prohibited Use Policy:<https://ai.google.dev/gemma/prohibited_use_policy>
|
| 53 |
+
- LiteRT-LM:<https://github.com/google-ai-edge/LiteRT-LM>
|
| 54 |
+
|
| 55 |
+
## 修改聲明
|
| 56 |
+
|
| 57 |
+
本 repo 的權重檔為 Google 發布之原始 `.litertlm` 檔案,未經任何修改、再訓練、量化或格式轉換,僅做檔案轉載。
|
| 58 |
+
|
| 59 |
+
## 使用限制
|
| 60 |
+
|
| 61 |
+
模型輸出可能不正確。本 App 將其用於山林安全知識問答,**輸出不得取代即時天候資訊、
|
| 62 |
+
步道公告或專業醫療判斷**。使用者須遵守上述 Prohibited Use Policy,特別是禁止用於
|
| 63 |
+
無照的醫療、法律等專業行為。
|
| 64 |
+
|
| 65 |
+
## 校驗
|
| 66 |
+
|
| 67 |
+
`SHA256SUMS.txt` 列出兩個權重檔的 SHA-256。App 端下載完成後會比對雜湊,
|
| 68 |
+
不符即刪除並要求重新下載。
|
SHA256SUMS.txt
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
181938105e0eefd105961417e8da75903eacda102c4fce9ce90f50b97139a63c gemma-4-E2B-it.litertlm
|
| 2 |
+
1325ae366d31950f137c9c357b9fa89448b176d76998180c08ceaca78bba98be Gemma3-1B-IT_multi-prefill-seq_q4_ekv4096.litertlm
|
fetch_licenses.py
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Fetch the Gemma licence texts that must ship alongside redistributed weights.
|
| 3 |
+
|
| 4 |
+
Apache 2.0 has a canonical plaintext URL and is downloaded verbatim. The two Gemma
|
| 5 |
+
documents only exist as HTML pages, so their article body is extracted to text.
|
| 6 |
+
|
| 7 |
+
The extracted files are a convenience, not an authority: diff them against the live
|
| 8 |
+
pages before publishing a repo that relies on them. Re-run whenever Google updates
|
| 9 |
+
the terms.
|
| 10 |
+
|
| 11 |
+
Usage: python fetch_licenses.py
|
| 12 |
+
"""
|
| 13 |
+
|
| 14 |
+
import re
|
| 15 |
+
import sys
|
| 16 |
+
import urllib.request
|
| 17 |
+
|
| 18 |
+
try:
|
| 19 |
+
from bs4 import BeautifulSoup, NavigableString, Tag
|
| 20 |
+
except ImportError:
|
| 21 |
+
sys.exit("需要 beautifulsoup4:pip install beautifulsoup4")
|
| 22 |
+
|
| 23 |
+
PLAINTEXT = {
|
| 24 |
+
"LICENSE-apache-2.0.txt": "https://www.apache.org/licenses/LICENSE-2.0.txt",
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
HTML_PAGES = {
|
| 28 |
+
"LICENSE-gemma-terms.txt": "https://ai.google.dev/gemma/terms",
|
| 29 |
+
"PROHIBITED_USE_POLICY.txt": "https://ai.google.dev/gemma/prohibited_use_policy",
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
BLOCK_TAGS = {"p", "li", "h1", "h2", "h3", "h4", "h5", "h6", "tr", "div", "section"}
|
| 33 |
+
HEADING_TAGS = {"h1", "h2", "h3", "h4", "h5", "h6"}
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
def get(url: str) -> bytes:
|
| 37 |
+
request = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
| 38 |
+
with urllib.request.urlopen(request, timeout=30) as response:
|
| 39 |
+
return response.read()
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
def render(node, out, depth=0):
|
| 43 |
+
"""Walk the article tree emitting one line per block element."""
|
| 44 |
+
if isinstance(node, NavigableString):
|
| 45 |
+
text = str(node).strip()
|
| 46 |
+
if text:
|
| 47 |
+
out.append(("inline", text))
|
| 48 |
+
return
|
| 49 |
+
if not isinstance(node, Tag):
|
| 50 |
+
return
|
| 51 |
+
if node.name in {"script", "style", "nav", "button"}:
|
| 52 |
+
return
|
| 53 |
+
|
| 54 |
+
if node.name in BLOCK_TAGS:
|
| 55 |
+
text = " ".join(node.get_text(" ", strip=True).split())
|
| 56 |
+
if text:
|
| 57 |
+
# Only emit leaf-ish blocks; container divs would duplicate their children.
|
| 58 |
+
has_block_child = any(
|
| 59 |
+
isinstance(c, Tag) and c.name in BLOCK_TAGS for c in node.children
|
| 60 |
+
)
|
| 61 |
+
if not has_block_child:
|
| 62 |
+
prefix = "- " if node.name == "li" else ""
|
| 63 |
+
kind = "heading" if node.name in HEADING_TAGS else "block"
|
| 64 |
+
out.append((kind, prefix + text))
|
| 65 |
+
return
|
| 66 |
+
for child in node.children:
|
| 67 |
+
render(child, out, depth + 1)
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
def tidy(text: str) -> str:
|
| 71 |
+
"""Undo spacing artefacts left by inline tags around defined terms."""
|
| 72 |
+
text = re.sub(r'"\s+(.*?)\s+"', r'"\1"', text)
|
| 73 |
+
return re.sub(r"\s+([.,;:])", r"\1", text)
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
def html_to_text(html: bytes) -> str:
|
| 77 |
+
soup = BeautifulSoup(html, "html.parser")
|
| 78 |
+
article = soup.find("article") or soup.body
|
| 79 |
+
if article is None:
|
| 80 |
+
raise SystemExit("找不到文章內容,頁面結構可能已改變")
|
| 81 |
+
|
| 82 |
+
out = []
|
| 83 |
+
render(article, out)
|
| 84 |
+
# Drop the site chrome (release banner, breadcrumbs) preceding the document title.
|
| 85 |
+
first_heading = next((i for i, (kind, _) in enumerate(out) if kind == "heading"), 0)
|
| 86 |
+
out = [(kind, tidy(text)) for kind, text in out[first_heading:]]
|
| 87 |
+
|
| 88 |
+
lines = []
|
| 89 |
+
for kind, text in out:
|
| 90 |
+
if kind == "heading":
|
| 91 |
+
lines.append("")
|
| 92 |
+
lines.append(text)
|
| 93 |
+
lines.append("=" * len(text))
|
| 94 |
+
else:
|
| 95 |
+
lines.append(text)
|
| 96 |
+
lines.append("")
|
| 97 |
+
# Collapse runs of blank lines.
|
| 98 |
+
result, blank = [], False
|
| 99 |
+
for line in lines:
|
| 100 |
+
if line.strip() == "":
|
| 101 |
+
if not blank:
|
| 102 |
+
result.append("")
|
| 103 |
+
blank = True
|
| 104 |
+
else:
|
| 105 |
+
result.append(line)
|
| 106 |
+
blank = False
|
| 107 |
+
return "\n".join(result).strip() + "\n"
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def main():
|
| 111 |
+
for name, url in PLAINTEXT.items():
|
| 112 |
+
print(f"下載 {name} <- {url}")
|
| 113 |
+
with open(name, "wb") as handle:
|
| 114 |
+
handle.write(get(url))
|
| 115 |
+
|
| 116 |
+
for name, url in HTML_PAGES.items():
|
| 117 |
+
print(f"擷取 {name} <- {url}")
|
| 118 |
+
text = html_to_text(get(url))
|
| 119 |
+
with open(name, "w", encoding="utf-8") as handle:
|
| 120 |
+
handle.write(text)
|
| 121 |
+
print(f" {len(text.splitlines())} 行,請人工核對")
|
| 122 |
+
|
| 123 |
+
print("\n完成。上傳前務必與官方頁面對照一次擷取出來的兩份 Gemma 文件。")
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
if __name__ == "__main__":
|
| 127 |
+
main()
|
gemma-4-E2B-it.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:181938105e0eefd105961417e8da75903eacda102c4fce9ce90f50b97139a63c
|
| 3 |
+
size 2588147712
|