Add Qwen3-0.6B_dynamic_wi4b32_afp32.ios.litertlm for the iPhone GPU

#14
LiteRT Community (FKA TFLite) org

This adds Qwen3-0.6B_dynamic_wi4b32_afp32.ios.litertlm for the iPhone GPU. With LiteRT-LM 0.18.0 on iOS, the current Qwen3-0.6B_dynamic_wi4b32_afp32.litertlm (my re-export, PR 6) cannot create a GPU engine (LiteRT-LM#4055); the new file can. The existing files do not change; the card gets a row and a paragraph for the new file and a note on iOS.

Measurements (LiteRT-LM 0.18.0, the two files back to back on each device):

  • iPhone 18 Pro GPU: the new file answers on-task and decodes at 180.9 tok/s (19-token chat) and 142.5 tok/s (1,338-token prompt); the current file fails at engine creation.
  • iPhone 18 Pro CPU, and Mac Studio M4 Max GPU and CPU: the two files decode within 3 % of each other.
  • Pixel 8a GPU: the new file decodes 15.8–22.5 % slower, so the card keeps Android on the current file.

The new file is this variant's first upload (8414150f, 2026-08-05) with the current file's LlmMetadata section (only the chat template differs); its other sections are byte-identical to 8414150f. Its sha256 is e6bf25c0cf7e1a09d19fc6ad716072bb5b8ac96a0eca75075a69f7ce8c1a8f91; the commands at the end rebuild it, with a different sha256 only because the packer writes a new uuid and creation timestamp.

This is independent of my open PR 13; both add text right after the same card paragraph, so I will rebase whichever merges second. When a LiteRT-LM release creates the current file's engine on the iOS GPU, I will open a PR to remove this file.

Rebuild (WORK = an empty directory):

litert-lm() { uvx --from litert-lm==0.18.0 litert-lm "$@"; }
litert-lm --version
mkdir -p $WORK/src $WORK/out
curl -fsSL -o $WORK/src/0805.litertlm https://huggingface.co/litert-community/Qwen3-0.6B/resolve/8414150f2e9dcc82449bcc9c5abc404b399a4d06/Qwen3-0.6B_dynamic_wi4b32_afp32.litertlm
curl -fsSL -o $WORK/src/main.litertlm https://huggingface.co/litert-community/Qwen3-0.6B/resolve/a3c5d805ae362dff7f580bc25f2dfb9a5a7eaa76/Qwen3-0.6B_dynamic_wi4b32_afp32.litertlm
shasum -a 256 $WORK/src/0805.litertlm $WORK/src/main.litertlm
litert-lm unpack $WORK/src/0805.litertlm --output-dir $WORK/0805
litert-lm unpack $WORK/src/main.litertlm --output-dir $WORK/main
cp $WORK/main/LlmMetadataProto.pbtext $WORK/0805/LlmMetadataProto.pbtext
litert-lm pack $WORK/0805 --output $WORK/out/Qwen3-0.6B_dynamic_wi4b32_afp32.ios.litertlm
litert-lm unpack $WORK/out/Qwen3-0.6B_dynamic_wi4b32_afp32.ios.litertlm --output-dir $WORK/chk
diff -r -x model.toml $WORK/0805 $WORK/chk
shasum -a 256 $WORK/out/Qwen3-0.6B_dynamic_wi4b32_afp32.ios.litertlm
mlboydaisuke changed pull request status to closed
LiteRT Community (FKA TFLite) org

Closing this: with LiteRT-LM 0.19.0 on an iPhone 18 Pro, both the earlier file and the one now under Qwen3-0.6B_dynamic_wi4b32_afp32.litertlm build their Metal GPU engine (checked 2026-10-31 with the v0.19.0 xcframework), so a separate iOS file is no longer needed. The v0.19.0 tag's Swift package still points at the 0.18.1 zips; the model card has the details.

Sign up or log in to comment