Add Nemotron Transcribe assets
Browse files- .gitattributes +1 -0
- nemotron_transcribe/LICENSE_NEMOTRON_TRANSCRIBE.txt +23 -0
- nemotron_transcribe/NemotronTranscribe_dflash2_bf16.safetensors +3 -0
- nemotron_transcribe/NemotronTranscribe_perception_bf16.safetensors +3 -0
- nemotron_transcribe/Qwen3-ASR-LICENSE.txt +201 -0
- nemotron_transcribe/THIRD_PARTY_NOTICES.md +19 -0
- nemotron_transcribe/chat_template.jinja +235 -0
- nemotron_transcribe/config.json +0 -0
- nemotron_transcribe/dflash2_config.json +162 -0
- nemotron_transcribe/generation_config.json +6 -0
- nemotron_transcribe/processor_config.json +19 -0
- nemotron_transcribe/tokenizer.json +3 -0
- nemotron_transcribe/tokenizer_config.json +27 -0
- nemotron_transcribe/vLLM-LICENSE.txt +201 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* 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
|
|
|
|
|
|
| 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
|
| 36 |
+
nemotron_transcribe/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
nemotron_transcribe/LICENSE_NEMOTRON_TRANSCRIBE.txt
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
OpenMDW License Agreement, version 1.1 (OpenMDW-1.1)
|
| 6 |
+
|
| 7 |
+
By exercising rights granted to you under this agreement, you accept and agree to its terms.
|
| 8 |
+
|
| 9 |
+
As used in this agreement, "Model Materials" means the materials provided to you under this agreement, consisting of: (1) one or more machine learning models (including architecture and parameters); and (2) all related artifacts (including associated data, documentation and software) that are provided to you hereunder.
|
| 10 |
+
|
| 11 |
+
Subject to your compliance with this agreement, permission is hereby granted, free of charge, to deal in the Model Materials without restriction, including under all copyright, patent, database, and trade secret rights included or embodied therein.
|
| 12 |
+
|
| 13 |
+
If you distribute any portion of the Model Materials, you shall retain in your distribution (1) a copy of this agreement, and (2) all copyright notices and other notices of origin included in the Model Materials that are applicable to your distribution.
|
| 14 |
+
|
| 15 |
+
If you file, maintain, or voluntarily participate in a lawsuit against any person or entity asserting that the Model Materials directly or indirectly infringe any patent or copyright, then all rights and grants made to you hereunder are terminated, unless that lawsuit was in response to a corresponding lawsuit first brought against you.
|
| 16 |
+
|
| 17 |
+
This agreement does not impose any restrictions or obligations with respect to any use, modification, or sharing of any outputs generated by using the Model Materials.
|
| 18 |
+
|
| 19 |
+
THE MODEL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NONINFRINGEMENT, ACCURACY, OR THE ABSENCE OF LATENT OR OTHER DEFECTS OR ERRORS, WHETHER OR NOT DISCOVERABLE, ALL TO THE GREATEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW.
|
| 20 |
+
|
| 21 |
+
YOU ARE SOLELY RESPONSIBLE FOR (1) CLEARING RIGHTS OF OTHER PERSONS THAT MAY APPLY TO THE MODEL MATERIALS OR ANY USE THEREOF, INCLUDING WITHOUT LIMITATION ANY PERSON'S COPYRIGHTS OR OTHER RIGHTS INCLUDED OR EMBODIED IN THE MODEL MATERIALS; (2) OBTAINING ANY NECESSARY CONSENTS, PERMISSIONS OR OTHER RIGHTS REQUIRED FOR ANY USE OF THE MODEL MATERIALS; OR (3) PERFORMING ANY DUE DILIGENCE OR UNDERTAKING ANY OTHER INVESTIGATIONS INTO THE MODEL MATERIALS OR ANYTHING INCORPORATED OR EMBODIED THEREIN.
|
| 22 |
+
|
| 23 |
+
IN NO EVENT SHALL THE PROVIDERS OF THE MODEL MATERIALS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MODEL MATERIALS, THE USE THEREOF OR OTHER DEALINGS THEREIN.
|
nemotron_transcribe/NemotronTranscribe_dflash2_bf16.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3552a1723ffbdabfd45626b4b5cccce111049677be980ff6bd6d4e8a0cf9ee6a
|
| 3 |
+
size 1141295816
|
nemotron_transcribe/NemotronTranscribe_perception_bf16.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:910f3dfdabb3f480ee3fe678d4c6bc15dc829c18b314592ecdbbe1dbeae64772
|
| 3 |
+
size 1669403230
|
nemotron_transcribe/Qwen3-ASR-LICENSE.txt
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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, 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
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright 2026 Alibaba Cloud
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
nemotron_transcribe/THIRD_PARTY_NOTICES.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Third-Party Notices
|
| 2 |
+
|
| 3 |
+
This repository's model materials are licensed under the OpenMDW License Agreement, version 1.1 (see [LICENSE](LICENSE)). The third-party material listed below is included in the model card under its own license. OpenMDW-1.1 does not replace the license terms that apply to this material.
|
| 4 |
+
|
| 5 |
+
## Qwen3-ASR: generation-loop guardrail example
|
| 6 |
+
|
| 7 |
+
- **Location in this repository:** the `cleanup_generation_loops` code example in the "Generation-Loop Guardrail" section of [README.md](README.md).
|
| 8 |
+
- **Source:** [`qwen_asr/inference/utils.py`](https://github.com/QwenLM/Qwen3-ASR/blob/7c6daf77a2421100f5fb066495372c00129d39ff/qwen_asr/inference/utils.py), function `detect_and_fix_repetitions`, from the [Qwen3-ASR](https://github.com/QwenLM/Qwen3-ASR) repository at commit `7c6daf77a2421100f5fb066495372c00129d39ff`.
|
| 9 |
+
- **Copyright:** Copyright 2026 The Alibaba Qwen team.
|
| 10 |
+
- **License:** Apache License, Version 2.0. The full license text is provided in [licenses/Qwen3-ASR-LICENSE.txt](licenses/Qwen3-ASR-LICENSE.txt).
|
| 11 |
+
- **Modifications by NVIDIA:** the upstream function was reimplemented with regular expressions; repeated blocks of up to 4,096 characters, instead of up to 20 characters, are collapsed to a single copy; and the function was renamed to `cleanup_generation_loops`. As upstream, a character repeated more than 20 times is collapsed to one copy, and a block must repeat at least 20 times to be collapsed.
|
| 12 |
+
|
| 13 |
+
## vLLM: DFlash2 fix in the serving instructions
|
| 14 |
+
|
| 15 |
+
- **Location in this repository:** the vLLM 0.32.0 DFlash2 fix snippet in the DFlash2 instructions of [README.md](README.md).
|
| 16 |
+
- **Source:** [`vllm/model_executor/models/qwen3_dflash2.py`](https://github.com/vllm-project/vllm/blob/v0.32.0/vllm/model_executor/models/qwen3_dflash2.py) from [vLLM](https://github.com/vllm-project/vllm) version 0.32.0.
|
| 17 |
+
- **Copyright:** Copyright contributors to the vLLM project.
|
| 18 |
+
- **License:** Apache License, Version 2.0. The full license text is provided in [licenses/vLLM-LICENSE.txt](licenses/vLLM-LICENSE.txt).
|
| 19 |
+
- **Modifications by NVIDIA:** the snippet reproduces two lines of the upstream file and patches them so that anchor token IDs are clamped to the valid range before a codebook lookup, which prevents an out-of-range access when requests finish during speculative decoding.
|
nemotron_transcribe/chat_template.jinja
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 4 |
+
{%- if json_dict[json_key] is mapping or (json_dict[json_key] is sequence and json_dict[json_key] is not string) %}
|
| 5 |
+
{{- '\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{{-'\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}
|
| 8 |
+
{%- endif %}
|
| 9 |
+
{%- endfor %}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{% endmacro %}
|
| 12 |
+
{#- a list of content parts is rendered as NeMo's training prompt (`SALMDataset`, the vLLM plugin's prompt
|
| 13 |
+
contract): the text parts joined by a space, then one `<|audio|>` per audio part, separated by a space -#}
|
| 14 |
+
{%- macro render_content(content) -%}
|
| 15 |
+
{%- if content is string -%}
|
| 16 |
+
{{- content -}}
|
| 17 |
+
{%- else -%}
|
| 18 |
+
{%- set text_parts = content | selectattr("type", "in", ["text", "input_text", "output_text"]) | list -%}
|
| 19 |
+
{%- set text = text_parts | map(attribute="text") | join(" ") -%}
|
| 20 |
+
{%- set num_audio = content | selectattr("type", "in", ["audio", "audio_url", "input_audio"]) | list | length -%}
|
| 21 |
+
{%- set locators = (["<|audio|>"] * num_audio) | join(" ") -%}
|
| 22 |
+
{%- if num_audio == 0 -%}
|
| 23 |
+
{{- text_parts | map(attribute="text") | join("\n") -}}
|
| 24 |
+
{%- elif text.count("<|audio|>") > 0 -%}
|
| 25 |
+
{%- if text.count("<|audio|>") != num_audio -%}
|
| 26 |
+
{{- raise_exception("The text has " ~ text.count("<|audio|>") ~ " <|audio|> locators for " ~ num_audio ~ " audio parts.") -}}
|
| 27 |
+
{%- endif -%}
|
| 28 |
+
{%- set head = text[:(text | length) - (locators | length)] if text.endswith(locators) else text -%}
|
| 29 |
+
{%- if text != locators and text != head.rstrip() ~ " " ~ locators -%}
|
| 30 |
+
{{- raise_exception("An <|audio|> locator in the text must be final and preceded by one space.") -}}
|
| 31 |
+
{%- endif -%}
|
| 32 |
+
{{- text -}}
|
| 33 |
+
{%- elif text -%}
|
| 34 |
+
{{- text ~ " " ~ locators -}}
|
| 35 |
+
{%- else -%}
|
| 36 |
+
{{- locators -}}
|
| 37 |
+
{%- endif -%}
|
| 38 |
+
{%- endif -%}
|
| 39 |
+
{%- endmacro -%}
|
| 40 |
+
{%- set enable_thinking = enable_thinking if enable_thinking is defined else True %}
|
| 41 |
+
{%- set truncate_history_thinking = truncate_history_thinking if truncate_history_thinking is defined else True %}
|
| 42 |
+
{%- set ns = namespace(last_user_idx = -1) %}
|
| 43 |
+
{%- set loop_messages = messages %}
|
| 44 |
+
{%- for m in loop_messages %}
|
| 45 |
+
{%- if m["role"] == "user" %}
|
| 46 |
+
{%- set ns.last_user_idx = loop.index0 %}
|
| 47 |
+
{%- endif %}
|
| 48 |
+
{%- endfor %}
|
| 49 |
+
{%- if messages[0]["role"] == "system" %}
|
| 50 |
+
{%- set system_message = render_content(messages[0]["content"]) %}
|
| 51 |
+
{%- set loop_messages = messages[1:] %}
|
| 52 |
+
{%- else %}
|
| 53 |
+
{%- set system_message = "" %}
|
| 54 |
+
{%- set loop_messages = messages %}
|
| 55 |
+
{%- endif %}
|
| 56 |
+
{%- if not tools is defined %}
|
| 57 |
+
{%- set tools = [] %}
|
| 58 |
+
{%- endif %}
|
| 59 |
+
{%- set ns = namespace(last_user_idx = -1) %}
|
| 60 |
+
{%- for m in loop_messages %}
|
| 61 |
+
{%- if m["role"] == "user" %}
|
| 62 |
+
{%- set ns.last_user_idx = loop.index0 %}
|
| 63 |
+
{%- endif %}
|
| 64 |
+
{%- endfor %}
|
| 65 |
+
{%- if system_message is defined %}
|
| 66 |
+
{{- "<|im_start|>system\n" + system_message }}
|
| 67 |
+
{%- else %}
|
| 68 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 69 |
+
{{- "<|im_start|>system\n" }}
|
| 70 |
+
{%- endif %}
|
| 71 |
+
{%- endif %}
|
| 72 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 73 |
+
{%- if system_message is defined and system_message | length > 0 %}
|
| 74 |
+
{{- "\n\n" }}
|
| 75 |
+
{%- endif %}
|
| 76 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n" }}
|
| 77 |
+
{{- "<tools>" }}
|
| 78 |
+
{%- for tool in tools %}
|
| 79 |
+
{%- if tool.function is defined %}
|
| 80 |
+
{%- set tool = tool.function %}
|
| 81 |
+
{%- endif %}
|
| 82 |
+
{{- "\n<function>\n<name>" ~ tool.name ~ "</name>" }}
|
| 83 |
+
{%- if tool.description is defined %}
|
| 84 |
+
{{- '\n<description>' ~ (tool.description | trim) ~ '</description>' }}
|
| 85 |
+
{%- endif %}
|
| 86 |
+
{{- '\n<parameters>' }}
|
| 87 |
+
{%- if tool.parameters is defined and tool.parameters is mapping and tool.parameters.properties is defined and tool.parameters.properties is mapping %}
|
| 88 |
+
{%- for param_name, param_fields in tool.parameters.properties|items %}
|
| 89 |
+
{{- '\n<parameter>' }}
|
| 90 |
+
{{- '\n<name>' ~ param_name ~ '</name>' }}
|
| 91 |
+
{%- if param_fields.type is defined %}
|
| 92 |
+
{{- '\n<type>' ~ (param_fields.type | string) ~ '</type>' }}
|
| 93 |
+
{%- endif %}
|
| 94 |
+
{%- if param_fields.description is defined %}
|
| 95 |
+
{{- '\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- if param_fields.enum is defined %}
|
| 98 |
+
{{- '\n<enum>' ~ (param_fields.enum | tojson | safe) ~ '</enum>' }}
|
| 99 |
+
{%- endif %}
|
| 100 |
+
{%- set handled_keys = ['name', 'type', 'description', 'enum'] %}
|
| 101 |
+
{{- render_extra_keys(param_fields, handled_keys) }}
|
| 102 |
+
{{- '\n</parameter>' }}
|
| 103 |
+
{%- endfor %}
|
| 104 |
+
{%- endif %}
|
| 105 |
+
{% set handled_keys = ['type', 'properties', 'required'] %}
|
| 106 |
+
{{- render_extra_keys(tool.parameters, handled_keys) }}
|
| 107 |
+
{%- if tool.parameters is defined and tool.parameters.required is defined %}
|
| 108 |
+
{{- '\n<required>' ~ (tool.parameters.required | tojson | safe) ~ '</required>' }}
|
| 109 |
+
{%- endif %}
|
| 110 |
+
{{- '\n</parameters>' }}
|
| 111 |
+
{%- set handled_keys = ['type', 'name', 'description', 'parameters'] %}
|
| 112 |
+
{{- render_extra_keys(tool, handled_keys) }}
|
| 113 |
+
{{- '\n</function>' }}
|
| 114 |
+
{%- endfor %}
|
| 115 |
+
{{- "\n</tools>" }}
|
| 116 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 117 |
+
{%- endif %}
|
| 118 |
+
{%- if system_message is defined %}
|
| 119 |
+
{{- '<|im_end|>\n' }}
|
| 120 |
+
{%- else %}
|
| 121 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 122 |
+
{{- '<|im_end|>\n' }}
|
| 123 |
+
{%- endif %}
|
| 124 |
+
{%- endif %}
|
| 125 |
+
{%- for message in loop_messages %}
|
| 126 |
+
{%- if message.role == "assistant" %}
|
| 127 |
+
{%- if message.reasoning_content is defined and message.reasoning_content is string and message.reasoning_content | trim | length > 0 %}
|
| 128 |
+
{%- set content = "<think>\n" ~ message.reasoning_content ~ "</think>" ~ (message.content | default('', true)) %}
|
| 129 |
+
{%- else %}
|
| 130 |
+
{%- set content = message.content | default('', true) %}
|
| 131 |
+
{%- if content is string -%}
|
| 132 |
+
{%- if '<think>' not in content and '</think>' not in content -%}
|
| 133 |
+
{%- set content = "<think></think>" ~ content -%}
|
| 134 |
+
{%- endif -%}
|
| 135 |
+
{%- else -%}
|
| 136 |
+
{%- set content = content -%}
|
| 137 |
+
{%- endif -%}
|
| 138 |
+
{%- endif %}
|
| 139 |
+
{%- if message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}
|
| 140 |
+
{{- '<|im_start|>assistant\n' }}
|
| 141 |
+
{%- set include_content = not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}
|
| 142 |
+
{%- if content is string and content | trim | length > 0 %}
|
| 143 |
+
{%- if include_content %}
|
| 144 |
+
{{- (content | trim) ~ '\n' -}}
|
| 145 |
+
{%- else %}
|
| 146 |
+
{%- set c = (content | string) %}
|
| 147 |
+
{%- if '</think>' in c %}
|
| 148 |
+
{%- set c = c.split('</think>')[-1] %}
|
| 149 |
+
{%- elif '<think>' in c %}
|
| 150 |
+
{%- set c = c.split('<think>')[0] %}
|
| 151 |
+
{%- endif %}
|
| 152 |
+
{%- set c = "<think></think>" ~ c %}
|
| 153 |
+
{%- if c | length > 0 %}
|
| 154 |
+
{{- c ~ '\n' -}}
|
| 155 |
+
{%- endif %}
|
| 156 |
+
{%- endif %}
|
| 157 |
+
{%- else %}
|
| 158 |
+
{{- "<think></think>" -}}
|
| 159 |
+
{%- endif %}
|
| 160 |
+
{%- for tool_call in message.tool_calls %}
|
| 161 |
+
{%- if tool_call.function is defined %}
|
| 162 |
+
{%- set tool_call = tool_call.function %}
|
| 163 |
+
{%- endif %}
|
| 164 |
+
{{- '<tool_call>\n<function=' ~ tool_call.name ~ '>\n' -}}
|
| 165 |
+
{%- if tool_call.arguments is defined %}
|
| 166 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 167 |
+
{{- '<parameter=' ~ args_name ~ '>\n' -}}
|
| 168 |
+
{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
|
| 169 |
+
{{- args_value ~ '\n</parameter>\n' -}}
|
| 170 |
+
{%- endfor %}
|
| 171 |
+
{%- endif %}
|
| 172 |
+
{{- '</function>\n</tool_call>\n' -}}
|
| 173 |
+
{%- endfor %}
|
| 174 |
+
{{- '<|im_end|>\n' }}
|
| 175 |
+
{%- else %}
|
| 176 |
+
{%- if not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}
|
| 177 |
+
{{- '<|im_start|>assistant\n' ~ (content | default('', true) | string | trim) ~ '<|im_end|>\n' }}
|
| 178 |
+
{%- else %}
|
| 179 |
+
{%- set c = (content | default('', true) | string) %}
|
| 180 |
+
{%- if '<think>' in c and '</think>' in c %}
|
| 181 |
+
{%- set c = "<think></think>" ~ c.split('</think>')[-1] %}
|
| 182 |
+
{%- endif %}
|
| 183 |
+
{%- set c = c | trim %}
|
| 184 |
+
{%- if c | length > 0 %}
|
| 185 |
+
{{- '<|im_start|>assistant\n' ~ c ~ '<|im_end|>\n' }}
|
| 186 |
+
{%- else %}
|
| 187 |
+
{{- '<|im_start|>assistant\n<|im_end|>\n' }}
|
| 188 |
+
{%- endif %}
|
| 189 |
+
{%- endif %}
|
| 190 |
+
{%- endif %}
|
| 191 |
+
{%- elif message.role == "user" or message.role == "system" %}
|
| 192 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 193 |
+
{%- set content = render_content(message.content) %}
|
| 194 |
+
{#- vLLM puts audio placeholders that a template does not place at the front, one "<|audio|>\n" each.
|
| 195 |
+
Move them behind the text, as in training: "<text> <|audio|>", locators separated by one space. -#}
|
| 196 |
+
{%- if content.startswith("<|audio|>\n") %}
|
| 197 |
+
{%- set ns = namespace(text=content, audios=0) %}
|
| 198 |
+
{%- for _ in range(content.count("<|audio|>")) %}
|
| 199 |
+
{%- if ns.text.startswith("<|audio|>\n") %}
|
| 200 |
+
{%- set ns.text = ns.text[10:] %}
|
| 201 |
+
{%- set ns.audios = ns.audios + 1 %}
|
| 202 |
+
{%- endif %}
|
| 203 |
+
{%- endfor %}
|
| 204 |
+
{%- if ns.text == "<|audio|>" %}
|
| 205 |
+
{%- set ns.text = "" %}
|
| 206 |
+
{%- set ns.audios = ns.audios + 1 %}
|
| 207 |
+
{%- endif %}
|
| 208 |
+
{%- set locators = (["<|audio|>"] * ns.audios) | join(" ") %}
|
| 209 |
+
{%- set content = (ns.text ~ " " ~ locators) if ns.text else locators %}
|
| 210 |
+
{%- endif %}
|
| 211 |
+
{{- content }}
|
| 212 |
+
{{- '<|im_end|>\n' }}
|
| 213 |
+
{%- elif message.role == "tool" %}
|
| 214 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 215 |
+
{{- '<|im_start|>user\n' }}
|
| 216 |
+
{%- endif %}
|
| 217 |
+
{{- '<tool_response>\n' }}
|
| 218 |
+
{{- message.content }}
|
| 219 |
+
{{- '\n</tool_response>\n' }}
|
| 220 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 221 |
+
{{- '<|im_end|>\n' }}
|
| 222 |
+
{%- elif loop.last %}
|
| 223 |
+
{{- '<|im_end|>\n' }}
|
| 224 |
+
{%- endif %}
|
| 225 |
+
{%- else %}
|
| 226 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>\n' }}
|
| 227 |
+
{%- endif %}
|
| 228 |
+
{%- endfor %}
|
| 229 |
+
{%- if add_generation_prompt %}
|
| 230 |
+
{%- if enable_thinking %}
|
| 231 |
+
{{- '<|im_start|>assistant\n<think>\n' }}
|
| 232 |
+
{%- else %}
|
| 233 |
+
{{- '<|im_start|>assistant\n<think></think>' }}
|
| 234 |
+
{%- endif %}
|
| 235 |
+
{%- endif %}
|
nemotron_transcribe/config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
nemotron_transcribe/dflash2_config.json
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
"block_size": 16,
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
+
"chunk_size": 128,
|
| 10 |
+
"conv_kernel": 4,
|
| 11 |
+
"dflash_config": {
|
| 12 |
+
"block_size": 16,
|
| 13 |
+
"conv_group_size": 16,
|
| 14 |
+
"conv_kernel_size": 2,
|
| 15 |
+
"mask_token_id": 990,
|
| 16 |
+
"selector_rank": 256,
|
| 17 |
+
"selector_top_k": 16,
|
| 18 |
+
"target_layer_ids": [
|
| 19 |
+
1,
|
| 20 |
+
5,
|
| 21 |
+
19,
|
| 22 |
+
29,
|
| 23 |
+
41,
|
| 24 |
+
51
|
| 25 |
+
]
|
| 26 |
+
},
|
| 27 |
+
"dtype": "bfloat16",
|
| 28 |
+
"eos_token_id": 2,
|
| 29 |
+
"expand": 2,
|
| 30 |
+
"head_dim": 128,
|
| 31 |
+
"hidden_act": "silu",
|
| 32 |
+
"hidden_dropout": 0.0,
|
| 33 |
+
"hidden_size": 2688,
|
| 34 |
+
"initializer_range": 0.02,
|
| 35 |
+
"intermediate_size": 6144,
|
| 36 |
+
"is_causal": false,
|
| 37 |
+
"layer_norm_epsilon": 1e-05,
|
| 38 |
+
"layer_types": [
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention"
|
| 45 |
+
],
|
| 46 |
+
"layers_block_type": [
|
| 47 |
+
"mamba",
|
| 48 |
+
"moe",
|
| 49 |
+
"mamba",
|
| 50 |
+
"moe",
|
| 51 |
+
"mamba",
|
| 52 |
+
"attention",
|
| 53 |
+
"moe",
|
| 54 |
+
"mamba",
|
| 55 |
+
"moe",
|
| 56 |
+
"mamba",
|
| 57 |
+
"moe",
|
| 58 |
+
"mamba",
|
| 59 |
+
"attention",
|
| 60 |
+
"moe",
|
| 61 |
+
"mamba",
|
| 62 |
+
"moe",
|
| 63 |
+
"mamba",
|
| 64 |
+
"moe",
|
| 65 |
+
"mamba",
|
| 66 |
+
"attention",
|
| 67 |
+
"moe",
|
| 68 |
+
"mamba",
|
| 69 |
+
"moe",
|
| 70 |
+
"mamba",
|
| 71 |
+
"moe",
|
| 72 |
+
"mamba",
|
| 73 |
+
"attention",
|
| 74 |
+
"moe",
|
| 75 |
+
"mamba",
|
| 76 |
+
"moe",
|
| 77 |
+
"mamba",
|
| 78 |
+
"moe",
|
| 79 |
+
"mamba",
|
| 80 |
+
"attention",
|
| 81 |
+
"moe",
|
| 82 |
+
"mamba",
|
| 83 |
+
"moe",
|
| 84 |
+
"mamba",
|
| 85 |
+
"moe",
|
| 86 |
+
"mamba",
|
| 87 |
+
"moe",
|
| 88 |
+
"mamba",
|
| 89 |
+
"attention",
|
| 90 |
+
"moe",
|
| 91 |
+
"mamba",
|
| 92 |
+
"moe",
|
| 93 |
+
"mamba",
|
| 94 |
+
"moe",
|
| 95 |
+
"mamba",
|
| 96 |
+
"moe",
|
| 97 |
+
"mamba",
|
| 98 |
+
"moe"
|
| 99 |
+
],
|
| 100 |
+
"mamba_head_dim": 64,
|
| 101 |
+
"mamba_hidden_act": "silu",
|
| 102 |
+
"mamba_num_heads": 64,
|
| 103 |
+
"mamba_proj_bias": false,
|
| 104 |
+
"mamba_ssm_cache_dtype": "float32",
|
| 105 |
+
"max_position_embeddings": 262144,
|
| 106 |
+
"max_window_layers": 6,
|
| 107 |
+
"mlp_bias": false,
|
| 108 |
+
"mlp_hidden_act": "relu2",
|
| 109 |
+
"model_type": "qwen3",
|
| 110 |
+
"moe_intermediate_size": 1856,
|
| 111 |
+
"moe_latent_size": null,
|
| 112 |
+
"moe_shared_expert_intermediate_size": 3712,
|
| 113 |
+
"moe_shared_expert_overlap": true,
|
| 114 |
+
"mtp_layers_block_type": [
|
| 115 |
+
"attention",
|
| 116 |
+
"moe"
|
| 117 |
+
],
|
| 118 |
+
"n_group": 1,
|
| 119 |
+
"n_groups": 8,
|
| 120 |
+
"n_routed_experts": 128,
|
| 121 |
+
"n_shared_experts": 1,
|
| 122 |
+
"norm_eps": 1e-05,
|
| 123 |
+
"norm_topk_prob": true,
|
| 124 |
+
"num_attention_heads": 32,
|
| 125 |
+
"num_experts_per_tok": 6,
|
| 126 |
+
"num_hidden_layers": 6,
|
| 127 |
+
"num_key_value_heads": 2,
|
| 128 |
+
"num_logits_to_keep": 1,
|
| 129 |
+
"num_nextn_predict_layers": 0,
|
| 130 |
+
"num_target_layers": 52,
|
| 131 |
+
"pad_token_id": 0,
|
| 132 |
+
"partial_rotary_factor": 1.0,
|
| 133 |
+
"rescale_prenorm_residual": true,
|
| 134 |
+
"residual_in_fp32": false,
|
| 135 |
+
"rms_norm_eps": 1e-06,
|
| 136 |
+
"rope_parameters": {
|
| 137 |
+
"partial_rotary_factor": 1.0,
|
| 138 |
+
"rope_theta": 10000,
|
| 139 |
+
"rope_type": "default"
|
| 140 |
+
},
|
| 141 |
+
"routed_scaling_factor": 2.5,
|
| 142 |
+
"sliding_window": null,
|
| 143 |
+
"ssm_state_size": 128,
|
| 144 |
+
"tie_word_embeddings": false,
|
| 145 |
+
"time_step_floor": 0.0001,
|
| 146 |
+
"time_step_limit": [
|
| 147 |
+
0.0,
|
| 148 |
+
{
|
| 149 |
+
"__float__": "Infinity"
|
| 150 |
+
}
|
| 151 |
+
],
|
| 152 |
+
"time_step_max": 0.1,
|
| 153 |
+
"time_step_min": 0.001,
|
| 154 |
+
"topk_group": 1,
|
| 155 |
+
"transformers_version": "5.12.1",
|
| 156 |
+
"use_bias": false,
|
| 157 |
+
"use_cache": false,
|
| 158 |
+
"use_conv_bias": true,
|
| 159 |
+
"use_mamba_kernels": true,
|
| 160 |
+
"use_sliding_window": false,
|
| 161 |
+
"vocab_size": 131072
|
| 162 |
+
}
|
nemotron_transcribe/generation_config.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eos_token_id": [
|
| 3 |
+
11
|
| 4 |
+
],
|
| 5 |
+
"pad_token_id": 0
|
| 6 |
+
}
|
nemotron_transcribe/processor_config.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"audio_token": "<|audio|>",
|
| 3 |
+
"default_transcription_prompt": "Audio transcription. Language: as spoken. Wording: verbatim, including fillers and repetitions. Formatting: punctuation and capitalization. Output: transcript only.",
|
| 4 |
+
"feature_extractor": {
|
| 5 |
+
"feature_extractor_type": "NemotronAsrStreamingFeatureExtractor",
|
| 6 |
+
"feature_size": 128,
|
| 7 |
+
"hop_length": 160,
|
| 8 |
+
"mel_filters_dtype": "bfloat16",
|
| 9 |
+
"n_fft": 512,
|
| 10 |
+
"padding_side": "right",
|
| 11 |
+
"padding_value": 0.0,
|
| 12 |
+
"preemphasis": 0.97,
|
| 13 |
+
"return_attention_mask": true,
|
| 14 |
+
"sampling_rate": 16000,
|
| 15 |
+
"win_length": 400
|
| 16 |
+
},
|
| 17 |
+
"processor_class": "Nemotron3_5TranscribeProcessor",
|
| 18 |
+
"subsampling_factor": 8
|
| 19 |
+
}
|
nemotron_transcribe/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d071004cb4450d3aa31f87aab979cd09ffc99c4e709e6cf72c324346cd948d0d
|
| 3 |
+
size 17078144
|
nemotron_transcribe/tokenizer_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"audio_token": "<|audio|>",
|
| 4 |
+
"backend": "tokenizers",
|
| 5 |
+
"bos_token": "<s>",
|
| 6 |
+
"clean_up_tokenization_spaces": false,
|
| 7 |
+
"eos_token": "<|im_end|>",
|
| 8 |
+
"is_local": true,
|
| 9 |
+
"local_files_only": true,
|
| 10 |
+
"model_input_names": [
|
| 11 |
+
"input_ids",
|
| 12 |
+
"attention_mask"
|
| 13 |
+
],
|
| 14 |
+
"model_max_length": 262144,
|
| 15 |
+
"model_specific_special_tokens": {
|
| 16 |
+
"audio_token": "<|audio|>"
|
| 17 |
+
},
|
| 18 |
+
"pad_token": "<unk>",
|
| 19 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 20 |
+
"unk_token": "<unk>",
|
| 21 |
+
"chat_template": "{% macro render_extra_keys(json_dict, handled_keys) %}\n {%- if json_dict is mapping %}\n {%- for json_key in json_dict if json_key not in handled_keys %}\n {%- if json_dict[json_key] is mapping or (json_dict[json_key] is sequence and json_dict[json_key] is not string) %}\n {{- '\\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}\n {%- else %}\n {{-'\\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n{% endmacro %}\n{%- set enable_thinking = enable_thinking if enable_thinking is defined else True %}\n{%- set truncate_history_thinking = truncate_history_thinking if truncate_history_thinking is defined else True %}\n{%- set ns = namespace(last_user_idx = -1) %}\n{%- set loop_messages = messages %}\n{%- for m in loop_messages %}\n {%- if m[\"role\"] == \"user\" %}\n {%- set ns.last_user_idx = loop.index0 %}\n {%- endif %}\n{%- endfor %}\n{%- if messages[0][\"role\"] == \"system\" %}\n {%- set system_message = messages[0][\"content\"] %}\n {%- set loop_messages = messages[1:] %}\n{%- else %}\n {%- set system_message = \"\" %}\n {%- set loop_messages = messages %}\n{%- endif %}\n{%- if not tools is defined %}\n {%- set tools = [] %}\n{%- endif %}\n{%- set ns = namespace(last_user_idx = -1) %}\n{%- for m in loop_messages %}\n {%- if m[\"role\"] == \"user\" %}\n {%- set ns.last_user_idx = loop.index0 %}\n {%- endif %}\n{%- endfor %}\n{%- if system_message is defined %}\n {{- \"<|im_start|>system\\n\" + system_message }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- \"<|im_start|>system\\n\" }}\n {%- endif %}\n{%- endif %}\n{%- if tools is iterable and tools | length > 0 %}\n {%- if system_message is defined and system_message | length > 0 %}\n {{- \"\\n\\n\" }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou have access to the following functions:\\n\\n\" }}\n {{- \"<tools>\" }}\n {%- for tool in tools %}\n {%- if tool.function is defined %}\n {%- set tool = tool.function %}\n {%- endif %}\n {{- \"\\n<function>\\n<name>\" ~ tool.name ~ \"</name>\" }}\n {%- if tool.description is defined %}\n {{- '\\n<description>' ~ (tool.description | trim) ~ '</description>' }}\n {%- endif %}\n {{- '\\n<parameters>' }}\n {%- if tool.parameters is defined and tool.parameters is mapping and tool.parameters.properties is defined and tool.parameters.properties is mapping %}\n {%- for param_name, param_fields in tool.parameters.properties|items %}\n {{- '\\n<parameter>' }}\n {{- '\\n<name>' ~ param_name ~ '</name>' }}\n {%- if param_fields.type is defined %}\n {{- '\\n<type>' ~ (param_fields.type | string) ~ '</type>' }}\n {%- endif %}\n {%- if param_fields.description is defined %}\n {{- '\\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}\n {%- endif %}\n {%- if param_fields.enum is defined %}\n {{- '\\n<enum>' ~ (param_fields.enum | tojson | safe) ~ '</enum>' }}\n {%- endif %}\n {%- set handled_keys = ['name', 'type', 'description', 'enum'] %}\n {{- render_extra_keys(param_fields, handled_keys) }}\n {{- '\\n</parameter>' }}\n {%- endfor %}\n {%- endif %}\n {% set handled_keys = ['type', 'properties', 'required'] %}\n {{- render_extra_keys(tool.parameters, handled_keys) }}\n {%- if tool.parameters is defined and tool.parameters.required is defined %}\n {{- '\\n<required>' ~ (tool.parameters.required | tojson | safe) ~ '</required>' }}\n {%- endif %}\n {{- '\\n</parameters>' }}\n {%- set handled_keys = ['type', 'name', 'description', 'parameters'] %}\n {{- render_extra_keys(tool, handled_keys) }}\n {{- '\\n</function>' }}\n {%- endfor %}\n {{- \"\\n</tools>\" }}\n {{- '\\n\\nIf you choose to call a function ONLY reply in the following format with NO suffix:\\n\\n<tool_call>\\n<function=example_function_name>\\n<parameter=example_parameter_1>\\nvalue_1\\n</parameter>\\n<parameter=example_parameter_2>\\nThis is the value for the second parameter\\nthat can span\\nmultiple lines\\n</parameter>\\n</function>\\n</tool_call>\\n\\n<IMPORTANT>\\nReminder:\\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\\n- Required parameters MUST be specified\\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\\n</IMPORTANT>' }}\n{%- endif %}\n{%- if system_message is defined %}\n {{- '<|im_end|>\\n' }}\n{%- else %}\n {%- if tools is iterable and tools | length > 0 %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in loop_messages %}\n {%- if message.role == \"assistant\" %}\n {%- if message.reasoning_content is defined and message.reasoning_content is string and message.reasoning_content | trim | length > 0 %}\n {%- set content = \"<think>\\n\" ~ message.reasoning_content ~ \"</think>\" ~ (message.content | default('', true)) %}\n {%- else %}\n {%- set content = message.content | default('', true) %}\n {%- if content is string -%}\n {%- if '<think>' not in content and '</think>' not in content -%}\n {%- set content = \"<think></think>\" ~ content -%}\n {%- endif -%}\n {%- else -%}\n {%- set content = content -%}\n {%- endif -%}\n {%- endif %}\n {%- if message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}\n {{- '<|im_start|>assistant\\n' }}\n {%- set include_content = not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}\n {%- if content is string and content | trim | length > 0 %}\n {%- if include_content %}\n {{- (content | trim) ~ '\\n' -}}\n {%- else %}\n {%- set c = (content | string) %}\n {%- if '</think>' in c %}\n {%- set c = c.split('</think>')[-1] %}\n {%- elif '<think>' in c %}\n {%- set c = c.split('<think>')[0] %}\n {%- endif %}\n {%- set c = \"<think></think>\" ~ c %}\n {%- if c | length > 0 %}\n {{- c ~ '\\n' -}}\n {%- endif %}\n {%- endif %}\n {%- else %}\n {{- \"<think></think>\" -}}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n<function=' ~ tool_call.name ~ '>\\n' -}}\n {%- if tool_call.arguments is defined %}\n {%- for args_name, args_value in tool_call.arguments|items %}\n {{- '<parameter=' ~ args_name ~ '>\\n' -}}\n {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}\n {{- args_value ~ '\\n</parameter>\\n' -}}\n {%- endfor %}\n {%- endif %}\n {{- '</function>\\n</tool_call>\\n' -}}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- else %}\n {%- if not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}\n {{- '<|im_start|>assistant\\n' ~ (content | default('', true) | string | trim) ~ '<|im_end|>\\n' }}\n {%- else %}\n {%- set c = (content | default('', true) | string) %}\n {%- if '<think>' in c and '</think>' in c %}\n {%- set c = \"<think></think>\" ~ c.split('</think>')[-1] %}\n {%- endif %}\n {%- set c = c | trim %}\n {%- if c | length > 0 %}\n {{- '<|im_start|>assistant\\n' ~ c ~ '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>assistant\\n<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n {%- endif %}\n {%- elif message.role == \"user\" or message.role == \"system\" %}\n {{- '<|im_start|>' + message.role + '\\n' }}\n {%- set content = message.content | string %}\n {#- vLLM puts audio placeholders that a template does not place at the front, one \"<|audio|>\\n\" each.\n Move them behind the text, as in training: \"<text> <|audio|>\", locators separated by one space. -#}\n {%- if content.startswith(\"<|audio|>\\n\") %}\n {%- set ns = namespace(text=content, audios=0) %}\n {%- for _ in range(content.count(\"<|audio|>\")) %}\n {%- if ns.text.startswith(\"<|audio|>\\n\") %}\n {%- set ns.text = ns.text[10:] %}\n {%- set ns.audios = ns.audios + 1 %}\n {%- endif %}\n {%- endfor %}\n {%- if ns.text == \"<|audio|>\" %}\n {%- set ns.text = \"\" %}\n {%- set ns.audios = ns.audios + 1 %}\n {%- endif %}\n {%- set locators = ([\"<|audio|>\"] * ns.audios) | join(\" \") %}\n {%- set content = (ns.text ~ \" \" ~ locators) if ns.text else locators %}\n {%- endif %}\n {{- content }}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.previtem and loop.previtem.role != \"tool\" %}\n {{- '<|im_start|>user\\n' }}\n {%- endif %}\n {{- '<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>\\n' }}\n {%- if not loop.last and loop.nextitem.role != \"tool\" %}\n {{- '<|im_end|>\\n' }}\n {%- elif loop.last %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {%- if enable_thinking %}\n {{- '<|im_start|>assistant\\n<think>\\n' }}\n {%- else %}\n {{- '<|im_start|>assistant\\n<think></think>' }}\n {%- endif %}\n{%- endif %}",
|
| 22 |
+
"extra_special_tokens": {
|
| 23 |
+
"audio_token": "<|audio|>"
|
| 24 |
+
},
|
| 25 |
+
"padding": true,
|
| 26 |
+
"padding_side": "left"
|
| 27 |
+
}
|
nemotron_transcribe/vLLM-LICENSE.txt
ADDED
|
@@ -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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|