模型转换

把本地 GGUF 模型转成 LiteRT-LM(.litertlm):选择或拖入 .gguf 后只读取文件头部,完整解析元数据与张量表(架构、层数、参数量、上下文、词表、量化分布、逐张量映射),给出明确的可转性体检结论(架构是否支持、是否 MoE、是否含多模态塔、每层核心张量是否齐全),并导出 .litertlm 构建配方(llmMetadata / systemMetadata / 张量映射表)与一条可直接执行的转换命令、可下载 .sh 脚本;支持 Llama、Mistral、Qwen2、Qwen3、Gemma、Phi、SmolLM3,量化配方与 CPU/GPU/NPU 后端可切换。全程在浏览器本地解析,权重不读进内存、不上传;页面如实说明浏览器不直接产出 .litertlm(容器内是 TFLite 计算图,只有 Python 工具链能生成),把真正打包的一步交给命令行。

模型转换gguflitertlmlitert-lmgguf转litertlm模型格式转换llama.cpp量化架构体检本地转换model convertgguf to litertlm
关于「模型转换」

它属于「AI 本地推理」分类:用 WASM 在浏览器本地跑模型:语音合成、本地对话(含酒馆玩法)可完全离线,音视频与聊天内容不上传服务器;语音转文字的离线引擎默认用 Whisper(int8 权重约 43/76 MB),可选的 LiteRT-LM 档位受上游运行时限制,详见工具页说明。

  • 选择/拖入一个本地 .gguf 文件即可开始解析。文件只在你的浏览器里读取,不会上传到任何服务器。
  • 解析只读取文件头部(元数据 + 张量表,通常几十 KB 到几 MB),GB 级权重不会被读进内存,也不参与计算。
  • 「可转性体检」会给出明确结论:架构是否在支持列表、是否 MoE、是否含多模态塔、每层核心张量是否齐全。有任一条 blocker 就是不可转,不会含糊过去。
  • 页面**不会**直接产出 .litertlm:那个容器里是 TFLite 计算图,只有 Python 工具链能生成。页面给出的是构建配方(JSON)与一条可直接执行的转换命令。
  • 配方里的 llmMetadata(start/stop token、提示模板、采样参数、max_num_tokens、llm_model_type)按 GGUF 元数据与架构推导,可直接喂给打包器,省掉手填。
  • GGUF 若为量化权重,转换时会先反量化为中间精度再按目标配方重新量化;量化配方与目标后端可在页面上切换,命令会同步更新。

完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。

相关关键词:模型转换、AI 本地推理、gguf、litertlm、litert-lm、gguf转litertlm、模型格式转换、llama.cpp、量化、架构体检、本地转换、model convert、gguf to litertlm、在线工具、免费

如何使用「模型转换」
  1. 打开工具:打开「模型转换」页面,无需注册、无需安装任何软件。
  2. 准备输入:一个本地 .gguf 模型文件(llama.cpp 的 GGUF v1 / v2 / v3)
  3. 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
  4. 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
  5. 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
常见问题
为什么不能直接下载 .litertlm 文件?
因为 .litertlm 里装的是 TFLite 计算图(prefill / decode 两条签名子图)、分词器与 LLM metadata proto。把 GGUF 变成它需要「按架构搭计算图 → 转 TFLite → 打包」三步,目前只有 Python 工具链能做;浏览器里拼出来的字节容器必定装载失败。本页面因此只做解析、体检与生成配方,把真正产出的那一步交给命令行。
支持哪些源架构?
Llama、Mistral、Qwen2、Qwen3、Gemma(含 2/3/3n/4)、Phi-2、Phi-3 与 SmolLM3;不在列表里的架构会直接判为不可转,不做猜测。
为什么 MoE 模型不能直接转?
.litertlm 打包的是稠密主干:一个前向里是固定的 q/k/v/o 与 gate/up/down。MoE 多了路由与「每个专家一份」的权重,容器里没有对应位置,需要先合并/裁剪成稠密模型再转。
我的模型文件会被上传吗?
不会。文件通过 File System Access / 文件选择框在本地读取,解析与配方生成全部在浏览器内完成,全程不联网,页面也不保存文件内容。
配方 JSON 是给谁用的?
给打包器(litert-lm-builder,或社区封装的 litert-torch-by-qarnux)用:里面的 llmMetadata / systemMetadata / 张量映射表的字段名与它需要的字段一一对应,可直接填进去,也可以自己按它改。

返回崽崽工具箱首页

Model Converter (GGUF → LiteRT-LM)

Turn a local GGUF model into LiteRT-LM (.litertlm): pick or drop a .gguf file and only its header is read — metadata and the tensor table are parsed in full (architecture, layers, parameters, context, vocabulary, quantization breakdown, per-tensor mapping). You get a clear convertibility verdict (supported architecture, MoE, multimodal towers, missing per-layer core tensors) plus an exportable .litertlm build spec (llmMetadata / systemMetadata / tensor mapping), a ready-to-run conversion command and a downloadable .sh. Supports Llama, Mistral, Qwen2, Qwen3, Gemma, Phi and SmolLM3, with switchable quantization recipes and CPU/GPU/NPU backends. Everything is parsed locally in the browser: weights are never loaded into memory or uploaded. The page states plainly that it does not emit a .litertlm directly (the container holds a TFLite graph that only the Python toolchain can build) and hands the packing step to the command line.

model convertgguflitertlmlitert-lmgguf to litertlmmodel formatllama.cppquantizationarchitecture checklocal conversionmodel converterconvert gguf
About Model Converter (GGUF → LiteRT-LM)

Belongs to “Local AI”: Run models locally in your browser with WASM: speech synthesis and local chat (with tavern features) work fully offline and never upload audio or conversations; the offline speech-to-text engine uses Whisper by default (int8 weights, ~43/76 MB), while the optional LiteRT-LM path is limited by the upstream runtime — see the tool page for details.

  • Drop a local .gguf file to start parsing. It is read only in your browser and never uploaded.
  • Only the file header (metadata + tensor table, usually tens of KB to a few MB) is read; GB-scale weights are never loaded into memory.
  • The health check gives a clear verdict: supported architecture, MoE, multimodal towers, and per-layer core tensors. Any blocker means "not convertible" — no hedging.
  • This page does **not** emit a .litertlm file: that container holds a TFLite graph, which only the Python toolchain can produce. You get a build spec (JSON) plus a ready-to-run command.
  • The llmMetadata in the spec (start/stop tokens, prompt template, sampler params, max_num_tokens, llm_model_type) is derived from GGUF metadata and architecture — ready for the packager.
  • Quantized GGUF weights are dequantized to an intermediate precision and re-quantized per the target recipe; switch the recipe and backend on the page and the command updates.

Free, no sign-up; everything runs locally in your browser and files are never uploaded.

Keywords: Model Converter (GGUF → LiteRT-LM), Local AI, model convert, gguf, litertlm, litert-lm, gguf to litertlm, model format, llama.cpp, quantization, architecture check, local conversion, model converter, convert gguf, online tool, free

How to use Model Converter (GGUF → LiteRT-LM)
  1. Open the tool:Open the “Model Converter (GGUF → LiteRT-LM)” page — no sign-up and nothing to install.
  2. Prepare the input:A local .gguf model file (llama.cpp GGUF v1 / v2 / v3)
  3. Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
  4. Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
  5. Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.
FAQ
Why can’t I just download a .litertlm file here?
Because a .litertlm holds a TFLite graph (prefill/decode signature subgraphs), the tokenizer and an LLM metadata proto. Turning GGUF into that requires building the graph per architecture, converting to TFLite and packing — currently only the Python toolchain can do it. A byte container assembled in the browser would always fail to load, so this page parses, checks and emits a spec, leaving the actual build to the command line.
Which source architectures are supported?
Llama, Mistral, Qwen2, Qwen3, Gemma (2/3/3n/4), Phi-2, Phi-3 and SmolLM3. Anything else is reported as not convertible rather than guessed.
Why can’t MoE models be converted?
A .litertlm packs a dense backbone with fixed q/k/v/o and gate/up/down projections. MoE adds a router and per-expert weight sets that have no slot in the container, so it must be merged or pruned to a dense model first.
Is my model file uploaded?
No. The file is read locally via the file picker / drag-and-drop; parsing and spec generation happen entirely in your browser, with no network access and nothing stored.
Who consumes the spec JSON?
The packager (litert-lm-builder, or the community wrapper litert-torch-by-qarnux). Its llmMetadata / systemMetadata / tensor-mapping field names match what the packager expects, so you can feed it directly or tweak it.

Back to Zaizai Tools home