Downloads · 30 days
19
11% of all-time downloads
ObeJ/granite-4.0-350m-litertlm
granite-4.0-350m-litertlm is a text generation model from ObeJ. Use it when you need the model to write or continue text. It is set up for litert-lm. The card lists the license as apache-2.0.
ibm-granite/granite-4.0-350m converted to the LiteRT-LM .litertlm format for on-device inference with LiteRT-LM (Android, iOS, desktop, embedded).
Downloads · 30 days
19
11% of all-time downloads
All-time downloads
179
Public
Repo size
468 MB
Likes
0
Public
Click a slice to open those files.
.litertlm468 MB · 100%
From the Hugging Face model README
ibm-granite/granite-4.0-350m converted to the LiteRT-LM
.litertlm format for on-device inference with
LiteRT-LM (Android, iOS, desktop, embedded).
ibm-granite/granite-4.0-350mapache-2.0 (inherited from the base model).litertlm (granite-4.0-350m_q8_ekv1280.litertlm)dynamic_wi8_afp32)# CLI
litert-lm run granite-4.0-350m_q8_ekv1280.litertlm --prompt "What is the capital of France?"
The bundle embeds the base model's tokenizer and chat template, so prompts are templated for you. It also serves over an OpenAI-compatible endpoint:
litert-lm serve granite-4.0-350m_q8_ekv1280.litertlm --host 127.0.0.1 --port 9379
# then POST /v1/chat/completions with "model": "granite-4.0-350m_q8_ekv1280"
Converted with Google's litert-torch
generic HF export (litert-torch==0.9.1, generative.export_hf): the checkpoint's own
transformers modeling code is torch.exported (prefill + decode, static KV cache),
quantized with the AI Edge Quantizer, and bundled with the HF tokenizer + chat template —
no per-family builder.
A lossless dense reinterpretation is applied first (all-attention GraniteMoeHybridForCausalLM → dense GraniteForCausalLM), because the hybrid wrapper is not torch.export-compatible against a static cache (see litert-torch#933).
This conversion ships recorded parity evidence against the Hugging Face reference (generated by the workbench parity gate; see parity_report.json).
Granite Nano ships under the GraniteMoeHybridForCausalLM class but is all-attention; it is losslessly reinterpreted as a dense GraniteForCausalLM before export. Logits of the original vs. the reinterpreted model over the pinned prompts:
7.41e-05 (within 0.001; residual is fp round-off from splitting the fused SwiGLU).litertlm, greedy)Greedy decoding (temp 0 / top-k 1) through each model's own chat template, over 5 pinned prompts:
Honest caveat: litert-lm exposes no logits and the export is quantized to int8, so runtime parity is text/token parity, not logit parity. It is token-exact on short prompts; longer generations may diverge due to int8 + greedy argmax sensitivity — expected, not a conversion bug.
Format conversion only — no additional training data was used. Training-data composition and governance are inherited from the base model, ibm-granite/granite-4.0-350m (see its model card).
All personally identifiable information has been scrubbed from the training data.
/workspace/models/ibm-granite_granite-4.0-350mlitert-torch==0.9.1c8e9a29493f62b7c44461fb36980987c4c1454c75e95f57ba0539a8edc9dce76Base model by its original authors (see the base model card). Conversion tooling: Google AI Edge (LiteRT-LM, litert-torch).