Instructions to use webAI-Official/TwIL-LM3-Pro-LiteRT-LM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use webAI-Official/TwIL-LM3-Pro-LiteRT-LM 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 # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=webAI-Official/TwIL-LM3-Pro-LiteRT-LM \ --prompt="Write me a poem"
- LiteRT
How to use webAI-Official/TwIL-LM3-Pro-LiteRT-LM 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 LiteRT-LM INT4 and INT8 release
Browse filesConverted from TwIL-LM3-Pro with LiteRT-LM 0.16-compatible Granite 4.2 packaging; includes checksums, conversion recipe, and validation notes.
- .gitattributes +2 -0
- CONVERSION.md +81 -0
- LICENSE.md +36 -0
- README.md +128 -0
- TwIL-LM3-Pro_int4.litertlm +3 -0
- TwIL-LM3-Pro_int8.litertlm +3 -0
- apache-2.0-LICENSE.txt +202 -0
- litertlm_manifest.json +122 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,5 @@ 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 |
+
TwIL-LM3-Pro_int4.litertlm filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
TwIL-LM3-Pro_int8.litertlm filter=lfs diff=lfs merge=lfs -text
|
CONVERSION.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Conversion recipe
|
| 2 |
+
|
| 3 |
+
Source model: `webAI-Official/TwIL-LM3-Pro`
|
| 4 |
+
|
| 5 |
+
Converter source:
|
| 6 |
+
`john-rocky/hf-to-litertlm@cb2ed3c53bd397acb82f132ee3d4b4313827ef30`
|
| 7 |
+
|
| 8 |
+
## Environment
|
| 9 |
+
|
| 10 |
+
```text
|
| 11 |
+
Python 3.10
|
| 12 |
+
litert-torch 0.9.3
|
| 13 |
+
litert-converter 0.4.0
|
| 14 |
+
ai-edge-quantizer 0.9.0
|
| 15 |
+
litert-lm-builder 0.16.1
|
| 16 |
+
litert-lm 0.16.1
|
| 17 |
+
transformers 5.14.1
|
| 18 |
+
```
|
| 19 |
+
|
| 20 |
+
## Export settings
|
| 21 |
+
|
| 22 |
+
```text
|
| 23 |
+
cache length 4096
|
| 24 |
+
prefill signatures 1024,256,64,16,4,1
|
| 25 |
+
externalize embedder true
|
| 26 |
+
start token omitted
|
| 27 |
+
tokenizer embedded Hugging Face tokenizer.json
|
| 28 |
+
INT4 recipe blockwise-32 + OCTAV; INT8 embedding
|
| 29 |
+
INT8 recipe dynamic per-channel INT8
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
The start token is deliberately omitted because Granite 4.2 declares `<s>` as
|
| 33 |
+
BOS but its tokenizer post-processor does not prepend it. Adding it at runtime
|
| 34 |
+
changes the prompt seen by the model.
|
| 35 |
+
|
| 36 |
+
The exporter was supplied the local Hugging Face checkpoint and the
|
| 37 |
+
`templates/granite42_think.jinja` structured-template extraction shim:
|
| 38 |
+
|
| 39 |
+
```bash
|
| 40 |
+
export CACHE=4096
|
| 41 |
+
export PREFILL=1024,256,64,16,4,1
|
| 42 |
+
export EXTERNALIZE_EMBEDDER=1
|
| 43 |
+
export NO_START_TOKEN=1
|
| 44 |
+
|
| 45 |
+
python scripts/export_simple_template.py \
|
| 46 |
+
/path/to/TwIL-LM3-Pro \
|
| 47 |
+
out/int4 \
|
| 48 |
+
templates/granite42_think.jinja \
|
| 49 |
+
BOCTAV4
|
| 50 |
+
|
| 51 |
+
python scripts/export_simple_template.py \
|
| 52 |
+
/path/to/TwIL-LM3-Pro \
|
| 53 |
+
out/int8 \
|
| 54 |
+
templates/granite42_think.jinja \
|
| 55 |
+
dynamic_wi8_afp32
|
| 56 |
+
```
|
| 57 |
+
|
| 58 |
+
After conversion, two metadata-only operations were applied:
|
| 59 |
+
|
| 60 |
+
1. Declare the `thought` channel as `<think>` … `</think>`.
|
| 61 |
+
2. Bundle the LiteRT-compatible canonical Granite 4.2 Jinja chat template.
|
| 62 |
+
|
| 63 |
+
Both utilities unpacked and repacked the bundle, then verified that every
|
| 64 |
+
non-metadata section remained byte-identical.
|
| 65 |
+
|
| 66 |
+
## Final artifacts
|
| 67 |
+
|
| 68 |
+
```text
|
| 69 |
+
f3b47325fb31189b93c9e55e6bb3a89d8f4aa4cbccd44d537100efcdb75b4641 TwIL-LM3-Pro_int4.litertlm
|
| 70 |
+
956d86ec174cafc864a65d18c17b0f3a3425b0cecbe7c9bfc866032eacf373ea TwIL-LM3-Pro_int8.litertlm
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## Validation
|
| 74 |
+
|
| 75 |
+
Both bundles loaded and generated the expected `Paris` answer through
|
| 76 |
+
LiteRT-LM 0.16.1 on Linux CPU with thinking disabled. The INT4 bundle was also
|
| 77 |
+
run with a 64-token thinking budget on an entailment prompt; reasoning arrived
|
| 78 |
+
through the declared thought channel and the final answer was `yes`.
|
| 79 |
+
|
| 80 |
+
No Track A, Track B, mobile-device, or GPU-delegation benchmark is claimed by
|
| 81 |
+
this conversion release.
|
LICENSE.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
webAI Non-Commercial License ver. 1.0
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
1. Definitions
|
| 5 |
+
|
| 6 |
+
“Licensor” means any person or entity that distributes its Work. “Work” means (a) the original work of authorship made available under this license, which may include software, documentation, or other files, and (b) any additions to or derivative works thereof that are made available under this license. The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this license, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. Works are “made available” under this license by including in or with the Work either (a) a copyright notice referencing the applicability of this license to the Work, or (b) a copy of this license.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
2. License Grant
|
| 10 |
+
|
| 11 |
+
2.1 Copyright Grant. Subject to the terms and conditions of this license, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form.
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
3. Limitations
|
| 15 |
+
|
| 16 |
+
3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this license, (b) you include a complete copy of this license with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work.
|
| 17 |
+
|
| 18 |
+
3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this license (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself.
|
| 19 |
+
|
| 20 |
+
3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use non-commercially. As used herein, “non-commercially” means for non-commercial research and educational purposes only.
|
| 21 |
+
|
| 22 |
+
3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this license from such Licensor (including the grant in Section 2.1) will terminate immediately.
|
| 23 |
+
|
| 24 |
+
3.5 Trademarks. This license does not grant any rights to use any Licensor's or its affiliates' names, logos, or trademarks, except as necessary to reproduce the notices described in this license. Nothing in this license shall be construed as permission to use the trade names, trademarks, service marks, or product names of webAI, Inc. or its affiliates to endorse, promote, or imply association with any derivative work, product, service, or entity, without prior written consent from webAI, Inc. Use of the Work does not imply endorsement by webAI, Inc. of any derivative work, product, service, or entity.
|
| 25 |
+
|
| 26 |
+
3.6 Termination. If you violate any term of this license, then your rights under this license (including the grant in Section 2.1) will terminate immediately.
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
4. Disclaimer of Warranty.
|
| 30 |
+
|
| 31 |
+
THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE.
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
5. Limitation of Liability.
|
| 35 |
+
|
| 36 |
+
EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: webai-non-commercial-license-ver.-1.0
|
| 4 |
+
license_link: https://huggingface.co/webAI-Official/TwIL-LM3-Pro/blob/main/LICENSE.md
|
| 5 |
+
base_model: webAI-Official/TwIL-LM3-Pro
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
library_name: litert-lm
|
| 8 |
+
tags:
|
| 9 |
+
- litert
|
| 10 |
+
- litert-lm
|
| 11 |
+
- on-device
|
| 12 |
+
- android
|
| 13 |
+
- ios
|
| 14 |
+
- granite
|
| 15 |
+
- granite-4.2
|
| 16 |
+
- reasoning
|
| 17 |
+
- formal-logic
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# TwIL-LM3-Pro — LiteRT-LM
|
| 21 |
+
|
| 22 |
+
[webAI-Official/TwIL-LM3-Pro](https://huggingface.co/webAI-Official/TwIL-LM3-Pro)
|
| 23 |
+
converted to Google's LiteRT-LM (`.litertlm`) format for on-device inference.
|
| 24 |
+
Requires LiteRT-LM 0.16 or newer.
|
| 25 |
+
|
| 26 |
+
TwIL-LM3-Pro is a 3.66B-parameter formal-logic reasoning model based on
|
| 27 |
+
IBM Granite 4.2-3B. These bundles preserve its ChatML prompt format, pre-open
|
| 28 |
+
the `<think>` block, and declare a `thought` channel so LiteRT-LM can expose or
|
| 29 |
+
budget reasoning separately from the final answer.
|
| 30 |
+
|
| 31 |
+
## Files
|
| 32 |
+
|
| 33 |
+
| File | Quantization | Size | Intended use |
|
| 34 |
+
| --- | --- | ---: | --- |
|
| 35 |
+
| `TwIL-LM3-Pro_int4.litertlm` | INT4 blockwise-32 + OCTAV linears; INT8 embedding | 2.19 GB | Mobile / smallest deployable build |
|
| 36 |
+
| `TwIL-LM3-Pro_int8.litertlm` | Dynamic per-channel INT8 linears and embedding | 3.76 GB | Desktop / quality-oriented build |
|
| 37 |
+
|
| 38 |
+
Both bundles use a 4,096-token KV cache and six prefill signatures:
|
| 39 |
+
1,024, 256, 64, 16, 4, and 1 tokens. The input embedding is externalized into
|
| 40 |
+
its own bundle section to keep the primary graph below mobile mmap limits.
|
| 41 |
+
|
| 42 |
+
## Usage
|
| 43 |
+
|
| 44 |
+
Install a recent LiteRT-LM runtime:
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
pip install "litert-lm>=0.16"
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
Run locally:
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
litert-lm run ./TwIL-LM3-Pro_int4.litertlm \
|
| 54 |
+
--backend gpu \
|
| 55 |
+
--thinking true \
|
| 56 |
+
--prompt "Does 'All dogs are mammals. Rex is a dog.' entail 'Rex is a mammal'?"
|
| 57 |
+
```
|
| 58 |
+
|
| 59 |
+
Run directly from Hugging Face:
|
| 60 |
+
|
| 61 |
+
```bash
|
| 62 |
+
litert-lm run \
|
| 63 |
+
--from-huggingface-repo webAI-Official/TwIL-LM3-Pro-LiteRT-LM \
|
| 64 |
+
TwIL-LM3-Pro_int4.litertlm \
|
| 65 |
+
--backend gpu \
|
| 66 |
+
--thinking true \
|
| 67 |
+
--prompt "What is the capital of France?"
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
For reasoning-heavy prompts, allow at least 2,048 output tokens. A generation
|
| 71 |
+
that reaches its limit inside `<think>` may never produce a final answer.
|
| 72 |
+
Use `--thinking false` for lower latency when reasoning is not needed.
|
| 73 |
+
|
| 74 |
+
## Validation performed
|
| 75 |
+
|
| 76 |
+
The final repacked artifacts were checked with LiteRT-LM 0.16.1 on Linux CPU:
|
| 77 |
+
|
| 78 |
+
- INT4, thinking disabled: `What is the capital of France?` → `Paris`
|
| 79 |
+
- INT8, thinking disabled: `What is the capital of France?` → `Paris`
|
| 80 |
+
- INT4, thinking budget 64: the runtime emitted a separate `[thought]` channel
|
| 81 |
+
and answered the syllogism prompt with `yes`
|
| 82 |
+
- Both metadata repacks proved all non-metadata sections byte-identical to the
|
| 83 |
+
converter output
|
| 84 |
+
|
| 85 |
+
This is a conversion smoke test, not a benchmark. The bf16 Track A and Track B
|
| 86 |
+
scores from the source model card must not be attributed to either quantized
|
| 87 |
+
bundle until those evaluations are rerun through LiteRT-LM. In particular,
|
| 88 |
+
reasoning models can be more sensitive to INT4 quantization than ordinary chat
|
| 89 |
+
models; prefer INT8 when memory permits.
|
| 90 |
+
|
| 91 |
+
## Conversion
|
| 92 |
+
|
| 93 |
+
Converted from the released `model.safetensors`, tokenizer, and configuration
|
| 94 |
+
in `webAI-Official/TwIL-LM3-Pro` using:
|
| 95 |
+
|
| 96 |
+
- `litert-torch` 0.9.3
|
| 97 |
+
- `litert-converter` 0.4.0
|
| 98 |
+
- `ai-edge-quantizer` 0.9.0
|
| 99 |
+
- `litert-lm-builder` 0.16.1
|
| 100 |
+
- `transformers` 5.14.1
|
| 101 |
+
- `john-rocky/hf-to-litertlm` revision
|
| 102 |
+
`cb2ed3c53bd397acb82f132ee3d4b4313827ef30`
|
| 103 |
+
|
| 104 |
+
The release uses the LiteRT-compatible Granite 4.2 Jinja template from that
|
| 105 |
+
conversion project. It supports normal thinking on/off behavior and
|
| 106 |
+
multi-turn history. The source checkpoint's extra `reasoning_effort="low"`
|
| 107 |
+
template option is not exposed by this LiteRT bundle.
|
| 108 |
+
|
| 109 |
+
See `CONVERSION.md` and `litertlm_manifest.json` for the exact recipe and
|
| 110 |
+
artifact hashes.
|
| 111 |
+
|
| 112 |
+
## Limitations
|
| 113 |
+
|
| 114 |
+
- Context is capped at 4,096 tokens in these on-device bundles, not the
|
| 115 |
+
source checkpoint's inherited 131,072-token maximum.
|
| 116 |
+
- Track A generations are often long. Mobile sessions need a sufficiently
|
| 117 |
+
large output budget and enough memory for the selected backend.
|
| 118 |
+
- Device-specific CPU/GPU performance and full delegation have not yet been
|
| 119 |
+
measured for these TwIL weights.
|
| 120 |
+
- The INT4 and INT8 quantized models have not yet been evaluated on the
|
| 121 |
+
published formal-logic or held-out benchmark suites.
|
| 122 |
+
|
| 123 |
+
## License
|
| 124 |
+
|
| 125 |
+
Released under the
|
| 126 |
+
[webAI Non-Commercial License ver. 1.0](./LICENSE.md), matching the source
|
| 127 |
+
TwIL-LM3-Pro model. The Granite 4.2 base attribution and Apache 2.0 license
|
| 128 |
+
text are retained in `apache-2.0-LICENSE.txt`.
|
TwIL-LM3-Pro_int4.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3b47325fb31189b93c9e55e6bb3a89d8f4aa4cbccd44d537100efcdb75b4641
|
| 3 |
+
size 2190708656
|
TwIL-LM3-Pro_int8.litertlm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:956d86ec174cafc864a65d18c17b0f3a3425b0cecbe7c9bfc866032eacf373ea
|
| 3 |
+
size 3761622960
|
apache-2.0-LICENSE.txt
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
Apache License
|
| 3 |
+
Version 2.0, January 2004
|
| 4 |
+
http://www.apache.org/licenses/
|
| 5 |
+
|
| 6 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 7 |
+
|
| 8 |
+
1. Definitions.
|
| 9 |
+
|
| 10 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 11 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 12 |
+
|
| 13 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 14 |
+
the copyright owner that is granting the License.
|
| 15 |
+
|
| 16 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 17 |
+
other entities that control, are controlled by, or are under common
|
| 18 |
+
control with that entity. For the purposes of this definition,
|
| 19 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 20 |
+
direction or management of such entity, whether by contract or
|
| 21 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 22 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 23 |
+
|
| 24 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 25 |
+
exercising permissions granted by this License.
|
| 26 |
+
|
| 27 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 28 |
+
including but not limited to software source code, documentation
|
| 29 |
+
source, and configuration files.
|
| 30 |
+
|
| 31 |
+
"Object" form shall mean any form resulting from mechanical
|
| 32 |
+
transformation or translation of a Source form, including but
|
| 33 |
+
not limited to compiled object code, generated documentation,
|
| 34 |
+
and conversions to other media types.
|
| 35 |
+
|
| 36 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 37 |
+
Object form, made available under the License, as indicated by a
|
| 38 |
+
copyright notice that is included in or attached to the work
|
| 39 |
+
(an example is provided in the Appendix below).
|
| 40 |
+
|
| 41 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 42 |
+
form, that is based on (or derived from) the Work and for which the
|
| 43 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 44 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 45 |
+
of this License, Derivative Works shall not include works that remain
|
| 46 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 47 |
+
the Work and Derivative Works thereof.
|
| 48 |
+
|
| 49 |
+
"Contribution" shall mean any work of authorship, including
|
| 50 |
+
the original version of the Work and any modifications or additions
|
| 51 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 52 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 53 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 54 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 55 |
+
means any form of electronic, verbal, or written communication sent
|
| 56 |
+
to the Licensor or its representatives, including but not limited to
|
| 57 |
+
communication on electronic mailing lists, source code control systems,
|
| 58 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 59 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 60 |
+
excluding communication that is conspicuously marked or otherwise
|
| 61 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 62 |
+
|
| 63 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 64 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 65 |
+
subsequently incorporated within the Work.
|
| 66 |
+
|
| 67 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 68 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 69 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 70 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 71 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 72 |
+
Work and such Derivative Works in Source or Object form.
|
| 73 |
+
|
| 74 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 75 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 76 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 77 |
+
(except as stated in this section) patent license to make, have made,
|
| 78 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 79 |
+
where such license applies only to those patent claims licensable
|
| 80 |
+
by such Contributor that are necessarily infringed by their
|
| 81 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 82 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 83 |
+
institute patent litigation against any entity (including a
|
| 84 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 85 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 86 |
+
or contributory patent infringement, then any patent licenses
|
| 87 |
+
granted to You under this License for that Work shall terminate
|
| 88 |
+
as of the date such litigation is filed.
|
| 89 |
+
|
| 90 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 91 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 92 |
+
modifications, and in Source or Object form, provided that You
|
| 93 |
+
meet the following conditions:
|
| 94 |
+
|
| 95 |
+
(a) You must give any other recipients of the Work or
|
| 96 |
+
Derivative Works a copy of this License; and
|
| 97 |
+
|
| 98 |
+
(b) You must cause any modified files to carry prominent notices
|
| 99 |
+
stating that You changed the files; and
|
| 100 |
+
|
| 101 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 102 |
+
that You distribute, all copyright, patent, trademark, and
|
| 103 |
+
attribution notices from the Source form of the Work,
|
| 104 |
+
excluding those notices that do not pertain to any part of
|
| 105 |
+
the Derivative Works; and
|
| 106 |
+
|
| 107 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 108 |
+
distribution, then any Derivative Works that You distribute must
|
| 109 |
+
include a readable copy of the attribution notices contained
|
| 110 |
+
within such NOTICE file, excluding those notices that do not
|
| 111 |
+
pertain to any part of the Derivative Works, in at least one
|
| 112 |
+
of the following places: within a NOTICE text file distributed
|
| 113 |
+
as part of the Derivative Works; within the Source form or
|
| 114 |
+
documentation, if provided along with the Derivative Works; or,
|
| 115 |
+
within a display generated by the Derivative Works, if and
|
| 116 |
+
wherever such third-party notices normally appear. The contents
|
| 117 |
+
of the NOTICE file are for informational purposes only and
|
| 118 |
+
do not modify the License. You may add Your own attribution
|
| 119 |
+
notices within Derivative Works that You distribute, alongside
|
| 120 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 121 |
+
that such additional attribution notices cannot be construed
|
| 122 |
+
as modifying the License.
|
| 123 |
+
|
| 124 |
+
You may add Your own copyright statement to Your modifications and
|
| 125 |
+
may provide additional or different license terms and conditions
|
| 126 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 127 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 128 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 129 |
+
the conditions stated in this License.
|
| 130 |
+
|
| 131 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 132 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 133 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 134 |
+
this License, without any additional terms or conditions.
|
| 135 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 136 |
+
the terms of any separate license agreement you may have executed
|
| 137 |
+
with Licensor regarding such Contributions.
|
| 138 |
+
|
| 139 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 140 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 141 |
+
except as required for reasonable and customary use in describing the
|
| 142 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 143 |
+
|
| 144 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 145 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 146 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 147 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 148 |
+
implied, including, without limitation, any warranties or conditions
|
| 149 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 150 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 151 |
+
appropriateness of using or redistributing the Work and assume any
|
| 152 |
+
risks associated with Your exercise of permissions under this License.
|
| 153 |
+
|
| 154 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 155 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 156 |
+
unless required by applicable law (such as deliberate and grossly
|
| 157 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 158 |
+
liable to You for damages, including any direct, indirect, special,
|
| 159 |
+
incidental, or consequential damages of any character arising as a
|
| 160 |
+
result of this License or out of the use or inability to use the
|
| 161 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 162 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 163 |
+
other commercial damages or losses), even if such Contributor
|
| 164 |
+
has been advised of the possibility of such damages.
|
| 165 |
+
|
| 166 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 167 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 168 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 169 |
+
or other liability obligations and/or rights consistent with this
|
| 170 |
+
License. However, in accepting such obligations, You may act only
|
| 171 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 172 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 173 |
+
defend, and hold each Contributor harmless for any liability
|
| 174 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 175 |
+
of your accepting any such warranty or additional liability.
|
| 176 |
+
|
| 177 |
+
END OF TERMS AND CONDITIONS
|
| 178 |
+
|
| 179 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 180 |
+
|
| 181 |
+
To apply the Apache License to your work, attach the following
|
| 182 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 183 |
+
replaced with your own identifying information. (Don't include
|
| 184 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 185 |
+
comment syntax for the file format. We also recommend that a
|
| 186 |
+
file or class name and description of purpose be included on the
|
| 187 |
+
same "printed page" as the copyright notice for easier
|
| 188 |
+
identification within third-party archives.
|
| 189 |
+
|
| 190 |
+
Copyright [yyyy] [name of copyright owner]
|
| 191 |
+
|
| 192 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 193 |
+
you may not use this file except in compliance with the License.
|
| 194 |
+
You may obtain a copy of the License at
|
| 195 |
+
|
| 196 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 197 |
+
|
| 198 |
+
Unless required by applicable law or agreed to in writing, software
|
| 199 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 200 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 201 |
+
See the License for the specific language governing permissions and
|
| 202 |
+
limitations under the License.
|
litertlm_manifest.json
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"manifest_schema": "0.1.2",
|
| 3 |
+
"repo": "webAI-Official/TwIL-LM3-Pro-LiteRT-LM",
|
| 4 |
+
"generated": "2026-10-01",
|
| 5 |
+
"model": {
|
| 6 |
+
"display_name": "TwIL-LM3-Pro",
|
| 7 |
+
"source_model": "webAI-Official/TwIL-LM3-Pro",
|
| 8 |
+
"architecture": "GraniteForCausalLM; 40 layers, hidden size 2560, GQA 40:8, untied embeddings",
|
| 9 |
+
"parameters_b": 3.66,
|
| 10 |
+
"license": "webai-non-commercial-license-ver.-1.0",
|
| 11 |
+
"context_length": 4096,
|
| 12 |
+
"capabilities": {
|
| 13 |
+
"vision": false,
|
| 14 |
+
"audio": false,
|
| 15 |
+
"thinking": {
|
| 16 |
+
"declared": true,
|
| 17 |
+
"channel": {
|
| 18 |
+
"start": "<think>",
|
| 19 |
+
"end": "</think>"
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
"session_defaults": {
|
| 24 |
+
"max_output_tokens_min": 2048,
|
| 25 |
+
"notes": "Reasoning model: a generation truncated inside the thought channel may produce no final answer."
|
| 26 |
+
}
|
| 27 |
+
},
|
| 28 |
+
"conversion": {
|
| 29 |
+
"converter_repo": "john-rocky/hf-to-litertlm",
|
| 30 |
+
"converter_revision": "cb2ed3c53bd397acb82f132ee3d4b4313827ef30",
|
| 31 |
+
"litert_torch": "0.9.3",
|
| 32 |
+
"litert_converter": "0.4.0",
|
| 33 |
+
"ai_edge_quantizer": "0.9.0",
|
| 34 |
+
"litert_lm_builder": "0.16.1",
|
| 35 |
+
"transformers": "5.14.1",
|
| 36 |
+
"cache_length": 4096,
|
| 37 |
+
"prefill_lengths": [
|
| 38 |
+
1024,
|
| 39 |
+
256,
|
| 40 |
+
64,
|
| 41 |
+
16,
|
| 42 |
+
4,
|
| 43 |
+
1
|
| 44 |
+
],
|
| 45 |
+
"externalized_embedder": true,
|
| 46 |
+
"start_token_omitted": true
|
| 47 |
+
},
|
| 48 |
+
"variants": [
|
| 49 |
+
{
|
| 50 |
+
"file": "TwIL-LM3-Pro_int4.litertlm",
|
| 51 |
+
"sha256": "f3b47325fb31189b93c9e55e6bb3a89d8f4aa4cbccd44d537100efcdb75b4641",
|
| 52 |
+
"size_bytes": 2190708656,
|
| 53 |
+
"quantization": "INT4 blockwise-32 + OCTAV linears; INT8 embedding",
|
| 54 |
+
"backends": [
|
| 55 |
+
"cpu",
|
| 56 |
+
"gpu"
|
| 57 |
+
],
|
| 58 |
+
"sections": [
|
| 59 |
+
{
|
| 60 |
+
"type": "LlmMetadataProto",
|
| 61 |
+
"size_bytes": 5087
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"type": "HF_Tokenizer_Zlib",
|
| 65 |
+
"size_bytes": 1404641
|
| 66 |
+
},
|
| 67 |
+
{
|
| 68 |
+
"type": "TFLiteModel",
|
| 69 |
+
"role": "prefill_decode",
|
| 70 |
+
"size_bytes": 1929950320
|
| 71 |
+
},
|
| 72 |
+
{
|
| 73 |
+
"type": "TFLiteModel",
|
| 74 |
+
"role": "embedder",
|
| 75 |
+
"size_bytes": 259313584
|
| 76 |
+
}
|
| 77 |
+
],
|
| 78 |
+
"validation": {
|
| 79 |
+
"linux_cpu_smoke": "passed",
|
| 80 |
+
"thought_channel": "passed",
|
| 81 |
+
"benchmark_status": "not run"
|
| 82 |
+
},
|
| 83 |
+
"min_runtime_version": "0.16.0"
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"file": "TwIL-LM3-Pro_int8.litertlm",
|
| 87 |
+
"sha256": "956d86ec174cafc864a65d18c17b0f3a3425b0cecbe7c9bfc866032eacf373ea",
|
| 88 |
+
"size_bytes": 3761622960,
|
| 89 |
+
"quantization": "Dynamic per-channel INT8 linears and embedding",
|
| 90 |
+
"backends": [
|
| 91 |
+
"cpu",
|
| 92 |
+
"gpu"
|
| 93 |
+
],
|
| 94 |
+
"sections": [
|
| 95 |
+
{
|
| 96 |
+
"type": "LlmMetadataProto",
|
| 97 |
+
"size_bytes": 5087
|
| 98 |
+
},
|
| 99 |
+
{
|
| 100 |
+
"type": "HF_Tokenizer_Zlib",
|
| 101 |
+
"size_bytes": 1404641
|
| 102 |
+
},
|
| 103 |
+
{
|
| 104 |
+
"type": "TFLiteModel",
|
| 105 |
+
"role": "prefill_decode",
|
| 106 |
+
"size_bytes": 3500863808
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "TFLiteModel",
|
| 110 |
+
"role": "embedder",
|
| 111 |
+
"size_bytes": 259313584
|
| 112 |
+
}
|
| 113 |
+
],
|
| 114 |
+
"validation": {
|
| 115 |
+
"linux_cpu_smoke": "passed",
|
| 116 |
+
"thought_channel": "metadata verified",
|
| 117 |
+
"benchmark_status": "not run"
|
| 118 |
+
},
|
| 119 |
+
"min_runtime_version": "0.16.0"
|
| 120 |
+
}
|
| 121 |
+
]
|
| 122 |
+
}
|