qubit.ai
Collection
4 items • Updated
How to use tapiocaTakeshi/qubit-small-litertlm 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 litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli litert-lm run \ --from-huggingface-repo=tapiocaTakeshi/qubit-small-litertlm \ model.litertlm \ --prompt="Write me a poem"
NeuroQuantum / QBNN モデルを Google LiteRT-LM 互換のバンドル形式
(.litertlm) で配布しています。
qubit-neuroquantum-small.litertlm — モデルバンドル (66.99 MB)TFLITE_MODEL_OR_WEIGHTS セクション: モデル重み (fp16 NPZ archive)SP_MODEL セクション: SentencePiece トークナイザLLM_METADATA_JSON セクション: モデル / ランタイム設定MODEL_CARD_MD セクション: モデルカード| Field | Value |
|---|---|
| Architecture | NeuroQuantum |
| Size | small |
| Parameters | 34,606,620 |
| embed_dim | 256 |
| hidden_dim | 512 |
| num_heads | 8 |
| num_layers | 4 |
| max_seq_len | 4096 |
| vocab_size | 32000 |
{
"n_ctx": 4096,
"n_batch": 64,
"n_threads": 4,
"n_gpu_layers": 0,
"temperature": 0.8,
"top_p": 0.9,
"top_k": 40
}
import struct, json
from pathlib import Path
MAGIC = b"LITERTLM"
with open("qubit-neuroquantum-small.litertlm", "rb") as f:
assert f.read(8) == MAGIC
version, count = struct.unpack("<II", f.read(8))
# ... see generate_litertlm_models.py:read_litertlm_header
完全なパーサ実装と生成スクリプトは
tapiocatakeshi/Qubit の
generate_litertlm_models.py を参照してください。
MIT