Views
No views yet
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)1# CLI
2litert-lm run granite-4.0-350m_q8_ekv1280.litertlm --prompt "What is the capital of France?"1litert-lm serve granite-4.0-350m_q8_ekv1280.litertlm --host 127.0.0.1 --port 9379
2# then POST /v1/chat/completions with "model": "granite-4.0-350m_q8_ekv1280"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.GraniteMoeHybridForCausalLM → dense GraniteForCausalLM), because the hybrid wrapper is not torch.export-compatible against a static cache (see litert-torch#933).parity_report.json).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)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.
/workspace/models/ibm-granite_granite-4.0-350mlitert-torch==0.9.1c8e9a29493f62b7c44461fb36980987c4c1454c75e95f57ba0539a8edc9dce76