litert-conversion-workflow

litert-conversion-workflow is a skill for Claude Code, Codex from google-ai-edge/litert-samples. It costs 132 tokens per session (2,335 once invoked), scanned A, original, Apache-2.0.

A workflow for converting a Hugging Face language or vision-language model checkpoint into a `.litertlm` bundle for the LiteRT-LM runtime. It covers conversion, quantization, loading, generation, and quality checks on the intended device path.

In plain words
What is it for?
Preparing text or vision-language models for LiteRT-LM, choosing a conversion approach, testing generated output against the source model, and verifying the target device and backend.
Why use it?
A model can convert successfully but fail to run, lose quality after quantization, or break during a multi-turn conversation. The workflow checks these failure points in order.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/google-ai-edge/litert-samples/litert-conversion-workflow
Any agent
npx skills add google-ai-edge/litert-samples --skill litert-conversion-workflow
Clone the repo
git clone --depth 1 https://github.com/google-ai-edge/litert-samples

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for litert-conversion-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/google-ai-edge/litert-samples/litert-conversion-workflow.svg)](https://agentmods.dev/skills/google-ai-edge/litert-samples/litert-conversion-workflow)
Your own site
<a href="https://agentmods.dev/skills/google-ai-edge/litert-samples/litert-conversion-workflow"><img src="https://agentmods.dev/badge/skills/google-ai-edge/litert-samples/litert-conversion-workflow.svg" alt="Measured on agentmods" height="20"></a>
Per session 132 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,335 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00132 $0.02335
Opus 5 $0.00066 $0.01167
Sonnet 5 $0.00026 $0.00467
Haiku 4.5 $0.00013 $0.00233

Measured 5d ago against content hash f0db444f8aeb, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

litert-conversion-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/litert-conversion-workflow/SKILL.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LiteRT-LM conversion workflow

A conversion is done when three things hold, in this order:

  1. the bundle loads and generates through the LiteRT-LM engine (not just the raw interpreter),
  2. output quality is gated against the source model — a floor gate plus a task-level parity check, not a smoke test,
  3. it holds up on the deployment path it claims: the target backend, the target device, and multi-turn conversation.

Each step can pass while the next one fails. A bundle that converts can die at engine creation; an engine that generates can be quantization garbage; a model that answers 8/8 single-turn can crash on message two. The gates exist because every one of these has happened.

Scope: models producing a .litertlm bundle consumed by the LiteRT-LM engine (pip install litert-lm) — text LLMs and vision-language models (a VLM bundle is an LLM bundle plus two vision graphs; references/vlm-conversion.md covers the delta). Standalone/classic .tflite models go through the gpu-clean-conversionaccuracy-safe-quantizationon-device-verification lane; this skill is the LM sibling and reuses their discipline where it applies.

Step 0: classify before you convert

Look at config.json (model_type, layer_types, MoE fields, size) before running anything. Architecture decides everything downstream, and some structures die at a known point no recipe can route around. references/architecture-walls.md is the lookup table: structure → where it dies (export / load / engine / backend) → the error signature you'll see. Check it first; it turns a day of debugging into a table lookup.

Then pick the lane in references/recipe-selector.md: plain dense decoders ride a standard export; hybrids (SSM / linear-attention / short-conv) need state-aware export plus executor metadata; reasoning models need template care; MoE and MLA are currently walls.

Loop

1. Export with a minimal, extraction-safe template. The single most common ship-killer is not math — it is the chat template. Export with use_jinja_template=False and a minimal ChatML-style template swapped in, so the bundle carries plain prefix/suffix markers and no Jinja at all. Vendor templates routinely call Python methods (.get(), .startswith(), .strip()) that the runtime's minijinja renderer does not implement — such a bundle imports fine and dies on the first message. Details, the multi-turn prefix contract, and the tokenizer traps that pair with this: references/template-tokenizer-traps.md.

Read the full file on GitHub · 162 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 162 lines · 132 tokens per session scan A f0db444f8aeb

Subscribe to this mod's changes

litert-conversion-workflow is a skill published in the GitHub repository google-ai-edge/litert-samples (417 stars, last pushed yesterday), licensed Apache-2.0. It adds 132 tokens to every session and 2,335 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

adversarial-ml-evasion

Craft adversarial examples that cause trained ML classifiers to misclassify at inference time — image recognition, malware detectors, IDS, spam filters.

PurpleAILAB/Decepticon · 36 tokens

misinformation

Hunt LLM misinformation / overreliance (OWASP LLM09:2025) — confident-but-wrong outputs that flow into downstream automated decisions, compliance reports, customer communications, or autonomous code commits without verification.

PurpleAILAB/Decepticon · 49 tokens

vector-and-embedding-weaknesses

Hunt vector / embedding weaknesses (OWASP LLM08:2025) — adversarial inputs against the RAG / similarity layer that cause cross-tenant leak, embedding-inversion privacy loss, semantic confusion, and retriever-driven prompt injection.

PurpleAILAB/Decepticon · 59 tokens

llm-redteam-overview

LLM red team category — full AATMF v3 tactic coverage (T01–T15). Routing skill: read this first to identify which tactic applies, then load the matching sub-skill. Maps to MITRE ATLAS where overlap exists.

PurpleAILAB/Decepticon · 58 tokens

sensitive-information-disclosure

Hunt LLM sensitive-information disclosure (OWASP LLM02:2025) — leakage of PII, secrets, internal source, model details, and other-tenant data through model outputs, training-data extraction, or retrieval-side joins.

PurpleAILAB/Decepticon · 55 tokens

aatmf-t12-rag-poisoning

AATMF T12 — RAG & Knowledge Base Manipulation. PoisonedRAG, vector store flood, embedding collision, retrieval-bias attacks.

PurpleAILAB/Decepticon · 41 tokens