Instructions to use litert-community/decider-0.8b-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT-LM
How to use litert-community/decider-0.8b-LiteRT 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=litert-community/decider-0.8b-LiteRT \ --prompt="Write me a poem"
- LiteRT
How to use litert-community/decider-0.8b-LiteRT 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
decider-0.8b LiteRT-LM: fp16 (exact) + dynamic int8, reference readout, fixtures and oracle
8a443c6 verified Download reference/common.py from litert-community/decider-0.8b-LiteRT: direct link, hf CLI and curl.
- Browser
- Download file 980 Bytes
-
https://huggingface.co/litert-community/decider-0.8b-LiteRT/resolve/main/reference/common.py
- Command line
-
hf download hf://litert-community/decider-0.8b-LiteRT/reference/common.py
-
curl -L -o common.py https://huggingface.co/litert-community/decider-0.8b-LiteRT/resolve/main/reference/common.py
980 Bytes
| """Repository-local helpers; ROOT is derived from this file, not a conversion workspace.""" | |
| import datetime | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| REVISION = '1ea54127d3bd52f6d753d9257b32a6380b873907' | |
| PACKAGE_REVISION = 'c4daaac28af9fea95d627015cffa2dd5a5926ee6' | |
| LADDER = [1024, 512, 256, 128, 64, 32, 16, 8, 4, 2, 1] | |
| def write_json(path, obj): | |
| path = ROOT / path | |
| path.parent.mkdir(parents=True, exist_ok=True) | |
| temp = path.with_suffix(path.suffix + '.tmp') | |
| temp.write_text(json.dumps(obj, indent=2, ensure_ascii=False, allow_nan=False) + '\n') | |
| temp.replace(path) | |
| def read_json(path): | |
| return json.loads((ROOT / path).read_text()) | |
| def sha256(path): | |
| with open(path, 'rb') as stream: | |
| return hashlib.file_digest(stream, 'sha256').hexdigest() | |
| def file_fact(path): | |
| path = Path(path) | |
| return dict(path=str(path.relative_to(ROOT)), bytes=path.stat().st_size, sha256=sha256(path)) | |