<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Apple · LLMobile.news</title><link>https://llmobile.kavents.com/tags/apple/</link><description>A concise news ticker covering AI on mobile devices, local models, apps and hardware.</description><language>en-GB</language><atom:link href="https://llmobile.kavents.com/tags/apple/index.xml" rel="self" type="application/rss+xml"/><item><title>iPhone 18 Pro: A20 Pro adds a dual 16-core Neural Engine</title><link>https://llmobile.kavents.com/ticker/iphone-18-pro-a20-pro-neural-engine/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/iphone-18-pro-a20-pro-neural-engine/</guid><pubDate>Wed, 09 Sep 2026 19:00:00 +0200</pubDate><description>Apple has introduced the iPhone 18 Pro and iPhone 18 Pro Max with the A20 Pro chip. According to Apple, the chip has a new dual 16-core Neural Engine, 32 cores in total, which the company describes as double the AI processing power of A19 Pro. Apple says the Neural Engine accelerates on-device AI models and computational photography.
Image: Apple. The A20 Pro also offers 50 percent more memory bandwidth than A19 Pro, and its 6-core CPU includes integrated Neural Accelerators. Apple positions the chip for &amp;amp;ldquo;more advanced on-device AI workloads&amp;amp;rdquo; alongside games.
The phones ship with iOS 27, Apple Intelligence and the new Siri AI. Apple states that Apple Intelligence uses on-device processing together with Private Cloud Compute. Pre-orders start on 12 September, with availability from 18 September; prices start at $1,199 for the iPhone 18 Pro and $1,299 for the iPhone 18 Pro Max, both with 256 GB.
Source: https://www.apple.com/newsroom/2026/09/apple-debuts-iphone-18-pro-and-iphone-18-pro-max/
Read the article: https://llmobile.kavents.com/ticker/iphone-18-pro-a20-pro-neural-engine/</description><category>Apple</category><category>iPhone</category><category>Chips</category><category>NPU</category></item><item><title>Ornith releases Ornith-1.5, a 9B model with a mobile build for iPhone and Android</title><link>https://llmobile.kavents.com/ticker/ornith-1-5/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/ornith-1-5/</guid><pubDate>Wed, 19 Aug 2026 00:00:00 +0200</pubDate><description>Ornith has released Ornith-1.5, a model family with a 9B dense model, a 35B mixture-of-experts model that activates about 3B parameters per token and a 397B mixture-of-experts model. The 9B model also comes as Ornith-1.5-9B-Mobile, which the company says can be deployed on iPhone and Android devices. Ornith gives no size, memory or speed figures for the mobile build.
The 9B model scores 47.0 on Terminal-Bench 2.1 with the Claude Code harness and 70.6 on SWE-bench Verified in Ornith&amp;amp;rsquo;s tests. The company says the model matches or exceeds much larger models such as Gemma 4-31B and Qwen 3.6-35B. In the company&amp;amp;rsquo;s chart, Qwen3.6-35B-A3B leads on SWE-bench Verified with 73.4 and on Terminal-Bench 2.1 with 52.5, while the 9B model scores 86.4 on GPQA Diamond and 54.2 on MCP-Atlas. The previous Ornith-1.0-9B reaches 43.1 on Terminal-Bench 2.1 in the same chart.
Ornith&amp;amp;#39;s own benchmark figures for the 9B model. According to Ornith, its training loop lets the model propose new tasks, generate task-specific scaffolds and produce solution rollouts, with the reward from the rollouts propagated across all three stages. The company reports that the 35B model scores 67.8 on Terminal-Bench 2.1 with the Terminus-2 harness, against 52.5 for Qwen 3.6-35B. The models are on Hugging Face, with GGUF builds of all three sizes and MLX builds of the 9B and 35B models.
Source: https://ornith.ai/ornith_1_5.html
Read the article: https://llmobile.kavents.com/ticker/ornith-1-5/</description><category>Models</category><category>Apple</category><category>Android</category></item><item><title>Apple ships Python bindings for the on-device Foundation Models framework</title><link>https://llmobile.kavents.com/ticker/apple-foundation-models-sdk/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/apple-foundation-models-sdk/</guid><pubDate>Wed, 25 Feb 2026 20:47:00 +0100</pubDate><description>Apple published python-apple-fm-sdk, Python bindings for its Foundation Models framework, with a first beta release on February 25, 2026 according to the repository&amp;amp;rsquo;s release history. The package reaches the on-device model at the core of Apple Intelligence from Python on macOS, and installs with pip install apple-fm-sdk.
The Python API follows the Swift one. SystemLanguageModel reports whether the model is available and, if not, why, while LanguageModelSession holds a conversation and its async respond call returns text or streams it. A @fm.generable decorator marks a Python class for the model to fill in, and fm.guide adds per-field constraints such as a numeric range, as the README shows with a Cat class whose age is bounded to 0 through 20. Tool calling and session transcripts are exposed as well.
The bindings do not reimplement inference. The repository carries a Swift package named foundation-models-c that wraps the framework behind a C interface and builds it as a dynamic library, which the Python layer then calls. Apple writes in the documentation that the bindings run the Swift framework underneath, so evaluations reflect real on-device performance and behaviour, and its evaluation guide notes that inference calls are processed one at a time rather than in parallel at the macOS hardware level.
Apple lists macOS 26.0 or later, Xcode 26.0 or later with its agreement accepted in the Xcode app, Python 3.10 or later, and Apple Intelligence switched on. PyPI carries only source distributions for the package, so the Swift component is compiled locally during installation, which is what the Xcode requirement covers. Apple Intelligence on the Mac runs on Apple silicon machines only.
The code is under the Apache 2.0 license and the package metadata on PyPI classifies it as alpha. Apple pushed 0.1.0 to PyPI on March 8, 2026, added the Attachment API for sending images alongside text in 0.2.0 on June 8, 2026 for WWDC 2026, and exposed the model&amp;amp;rsquo;s context size and the token count of a given input in 0.2.1 on June 29, 2026. The README states the project is not yet taking contributions.
Source: https://github.com/apple/python-apple-fm-sdk
Read the article: https://llmobile.kavents.com/ticker/apple-foundation-models-sdk/</description><category>Apple</category><category>Developer tools</category><category>Apple Silicon</category><category>Open source</category></item><item><title>A19 Pro puts Neural Accelerators in every GPU core</title><link>https://llmobile.kavents.com/ticker/a19-pro-neural-accelerators/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/a19-pro-neural-accelerators/</guid><pubDate>Tue, 09 Sep 2025 20:00:00 +0200</pubDate><description>Apple announced the A19 Pro alongside the iPhone 17 Pro on September 9, 2025. Its 6-core GPU carries Neural Accelerators built into each core, which Apple says work together with the 16-core Neural Engine to power AI models, graphics and games. The company states that the chip enables running large local language models on the phone.
The A19 Pro also has a 6-core CPU that Apple calls the fastest in any smartphone, along with a larger cache and more memory than the A18 Pro. Combined with a vapor chamber cooling system, Apple puts sustained performance at up to 40 percent above the previous generation.
Image: Apple. The vapor chamber Apple credits for the sustained performance gain.
Source: https://www.apple.com/newsroom/2025/09/apple-unveils-iphone-17-pro-and-iphone-17-pro-max/
Read the article: https://llmobile.kavents.com/ticker/a19-pro-neural-accelerators/</description><category>Apple</category><category>iPhone</category><category>Chips</category><category>Apple Silicon</category><category>NPU</category></item><item><title>Apple puts the cost of 2-bit compression at 3.4 MMLU points</title><link>https://llmobile.kavents.com/ticker/apple-foundation-models-report-2025/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/apple-foundation-models-report-2025/</guid><pubDate>Fri, 18 Jul 2025 01:37:00 +0200</pubDate><description>Apple posted its 2025 foundation models tech report to arXiv on July 17, 2025, giving the numbers behind the roughly 3-billion-parameter on-device model it shipped at WWDC25. The report&amp;amp;rsquo;s Table 3 puts the price of compressing that model to 2 bits per weight at 3.4 points of MMLU, from 67.8 in 16 bits down to 64.4, with IFEval falling from 85.1 to 82.3.
Apple reaches 2 bits through quantisation-aware training with a learnable scaling factor per weight tensor, and reports that a balanced set of four levels at -1.5, -0.5, 0.5 and 1.5 trains more smoothly than the usual -2, -1, 0 and 1. The embedding table is quantised to 4 bits and the key-value cache to 8 bits, and low-rank adapters are fine-tuned afterwards to claw back the quality the compression costs. The server model takes a different route, compressed after training to 3.56 bits per weight with Adaptive Scalable Texture Compression, a GPU texture format whose fixed-function decode hardware on Apple GPUs unpacks the weights at no cost to the compute cores.
The report also spells out the KV cache sharing the framework announcement only named. Apple splits the transformer so that Block 1 holds 62.5 percent of the layers and Block 2 the remaining 37.5 percent with its key and value projections removed, reusing Block 1&amp;amp;rsquo;s cache instead. That cuts KV cache memory by 37.5 percent, and because Block 2 produces no keys or values, prefill skips its computation entirely, which Apple says cuts time to first token by about the same 37.5 percent.
Apple rebuilt how the on-device model is trained. The company first trained a dense model on about 14T tokens, sparse-upcycled it into a 64-expert mixture-of-experts version, where only part of the model runs per token, using 1T high-quality tokens, then retrained the dense model on its last 10 percent of tokens against a distillation loss from that MoE teacher. Apple states this cut the cost of training the teacher by 90 percent and removed the need for structural pruning. The server model was trained on 8192 v5p Cloud TPU chips for 13.4T tokens.
For the language expansion the report states the models are designed to support 16 languages, built on a text tokenizer grown from a 100k to a 150k vocabulary and a continued pre-training mix whose multilingual share rose from 8 percent to 30 percent. In Apple&amp;amp;rsquo;s own human evaluation on US English text prompts, graders preferred the on-device model over Qwen-2.5-3B on 35.3 percent of prompts against 12.9 percent the other way, while against Gemma-3-4B the split was 21.0 percent to 21.9 percent. The report is on arXiv under a Creative Commons Attribution 4.0 license.
Chart: Apple&amp;amp;#39;s own human evaluation, from the tech report. Rows marked with an asterisk were tested against the compressed on-device model.
Source: https://arxiv.org/abs/2507.13575
Read the article: https://llmobile.kavents.com/ticker/apple-foundation-models-report-2025/</description><category>Apple</category><category>Apple Silicon</category><category>Quantisation</category><category>Distillation</category><category>Benchmarks</category></item><item><title>Apple opens its on-device model to all apps with the Foundation Models framework</title><link>https://llmobile.kavents.com/ticker/apple-foundation-models-framework/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/apple-foundation-models-framework/</guid><pubDate>Mon, 09 Jun 2025 21:00:00 +0200</pubDate><description>Apple opened its on-device foundation model to third-party apps at WWDC25 on June 9, 2025. The Foundation Models framework gives any app direct access to the roughly 3-billion-parameter model, which runs offline and costs developers nothing per call.
Developers annotate Swift data structures with the @Generable macro, and the framework applies constrained decoding, which Apple calls guided generation, so the model returns those structures rather than free text. Tool calling lets the model invoke functions the app supplies. Developers who need more control can train rank 32 adapters with a Python toolkit.
Apple compressed the model to 2 bits per weight using quantisation-aware training. It splits the transformer into two blocks at a 5:3 depth ratio and shares the key-value cache between them, which Apple says cuts KV cache memory use by 37.5 percent. Images are handled by a 300M-parameter ViTDet-L vision encoder.
The model is designed to support 15 languages. The companion server model on Private Cloud Compute uses what Apple calls a Parallel-Track Mixture-of-Experts design, where independent transformer tracks cut how often the tracks have to synchronise with each other.
Diagram: Apple. The server model, not the on-device one.
Source: https://machinelearning.apple.com/research/apple-foundation-models-2025-updates
Read the article: https://llmobile.kavents.com/ticker/apple-foundation-models-framework/</description><category>Apple</category><category>iOS</category><category>Developer tools</category><category>Quantisation</category><category>Agents</category></item><item><title>Locally AI runs Llama, Gemma and Qwen offline on iPhone and iPad through MLX</title><link>https://llmobile.kavents.com/ticker/locally-ai/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/locally-ai/</guid><pubDate>Sun, 13 Apr 2025 09:00:00 +0200</pubDate><description>Adrien Grondin released Locally AI on April 13, 2025, an iPhone and iPad app that downloads open-weight language models and runs them entirely on the device. The App Store listing gives that release date and lists the app as free with no in-app purchases. Once a model is on disk the app needs no account and no internet connection, and Grondin states that no data is collected and nothing is sent to a cloud service.
The site at launch named Meta Llama 3.2 and Llama 3.1, Google Gemma 2, Qwen 2 and DeepSeek R1 as the models on offer, and described them as language and vision models, so a picture can go into the prompt alongside text. A user picks a model, downloads it once and can edit the system prompt the model runs under.
Grondin builds the app on MLX, Apple&amp;amp;rsquo;s machine learning framework for Apple silicon, and attributes the performance to unified memory, where the CPU and the GPU reach the same memory pool so arrays need not be copied between them. The app fetches open-weight model files itself rather than calling any model that ships with the operating system.
Neither the site nor the App Store entry names a minimum chip. The site says only that Locally AI covers recent iPhone and iPad models and is optimised for Apple silicon, and the listing asks for iOS 18.1 or iPadOS 18.1 or later. No generation speed, memory requirement or model file size is given anywhere in the developer&amp;amp;rsquo;s own material, and the launch site was a bought template whose team, testimonial and FAQ sections still carried placeholder Latin text.
Update, April 8, 2026. Grondin added support for Apple&amp;amp;rsquo;s on-device Foundation Models framework in September 2025, so the app can open a conversation with the model built into iOS 26 without downloading anything, which Simon Willison recorded on September 21, 2025. A Mac version followed and requires macOS 26 or later. LM Studio announced on April 8, 2026 that Locally AI had joined the company and that Grondin had moved with it, and the App Store entry now reads Locally AI by LM Studio with Element Labs Inc as the seller.
Source: https://locallyai.app/
Read the article: https://llmobile.kavents.com/ticker/locally-ai/</description><category>Apple</category><category>Apple Silicon</category><category>MLX</category><category>iOS</category><category>iPhone</category></item><item><title>Apple team finds H100 last on tokens per dollar for models up to 2B</title><link>https://llmobile.kavents.com/ticker/small-model-training-bottlenecks/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/small-model-training-bottlenecks/</guid><pubDate>Fri, 25 Oct 2024 12:30:00 +0200</pubDate><description>Seven Apple researchers measured what it costs to train language models up to 2B parameters on rented Nvidia GPUs and found the most expensive card was the worst buy. The H100-80GB returned the fewest tokens per dollar of the three cards tested at every one of their four model sizes, 100M, 500M, 1B and 2B, while costing 2.53 times as much per hour as the A100-40GB.
The price scale comes from normalising published hourly rates at Lambda Labs and Google Cloud, with the A100-40GB set at 1.00 and the A100-80GB landing at 1.46. The same comparison shows cost efficiency falling as GPUs are added, with a single card the best or near-best point at all four model sizes. For the 1B model, tokens per dollar drop from about 17,000 on one GPU to about 10,300 on 64.
FlashAttention mattered more at small scale than at large. Reading the authors&amp;amp;rsquo; first figure, the 100M model gained roughly three times the tokens per dollar over vanilla attention, while at 2B the gain was under two times. The authors put this down to the cost of attention being quadratic in context length, so it dominates once the hidden dimension shrinks and the small models become bound by data movement between CPU and GPU and between GPUs. Vanilla attention also ran out of memory at a global batch size of 1024 on the 1B and 2B models, where FlashAttention did not.
Two habits carried over from large-model training did not pay off. Plain Distributed Data Parallel, which keeps a full copy of the model on every GPU, beat both sharded FSDP variants for the smaller models because it moves less data, and FSDP only pulled ahead at 2B, where it kept training at a global batch size that made DDP run out of memory. Filling the cards was not cost-optimal either, since the batch size figure peaks around a global batch size of 128 for the 100M model, 32 for 500M, 16 for 1B and 8 for 2B, in every case well short of what the memory allowed.
These are training runs on datacentre GPUs, not anything running on a phone, and the authors frame the work as guidance for labs with small budgets rather than for deployment. They name their own limits, running each setup at least three times for only 10 training steps, reporting normalised price ratios rather than absolute dollars, using no gradient accumulation, and leaving GPU utilisation and memory bandwidth measurements to future work. They also assume that settings such as the learning rate can be retuned to converge at whichever hardware configuration turns out cheapest. The 8-page paper is free to read on arXiv under the site&amp;amp;rsquo;s non-exclusive distribution licence.
Source: https://arxiv.org/abs/2410.19456
Read the article: https://llmobile.kavents.com/ticker/small-model-training-bottlenecks/</description><category>Apple</category><category>Nvidia</category><category>Research</category><category>Benchmarks</category><category>PyTorch</category></item><item><title>Apple's MobileCLIP-S0 encodes an image in 1.5 ms on an iPhone 12 Pro Max</title><link>https://llmobile.kavents.com/ticker/mobileclip/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/mobileclip/</guid><pubDate>Fri, 21 Jun 2024 02:15:00 +0200</pubDate><description>Five Apple researchers presented MobileCLIP at CVPR 2024 on June 20, a family of image-text models built for phones. They exported each model with Core ML Tools 7.0 and timed it at batch size 1 on an iPhone 12 Pro Max running iOS 17.0.3, and their Table 7 gives the smallest variant, MobileCLIP-S0, 1.5 ms for the image encoder and 1.6 ms for the text encoder at 67.8% zero-shot accuracy on ImageNet. The same authors measure OpenAI&amp;amp;rsquo;s ViT-B/16 CLIP on that phone at 11.5 ms and 3.3 ms for 68.3%, and both models average 58.1 across the 38 datasets of the DataComp evaluation suite.
Multi-modal reinforced training, the method the paper introduces, moves the expensive part of distillation out of the training loop and into the dataset. Apple reinforces the DataComp dataset once, writing five synthetic captions per image with the CoCa model in OpenCLIP, storing the parameters of strong random image augmentations, 30 per image for the 12M subset and 10 for the billion-sample set, and storing the embeddings that two ViT-L/14 teacher models produce for those augmented images and for the real and synthetic captions. Training afterwards reads the captions and the teacher embeddings from disk, so the captioning model and the teachers never run again however many models are trained on the set.
The paper puts numbers on what that saves. One epoch over the 12.8M samples of the reinforced set on a single node of 8 A100-80GB GPUs takes 1.3 hours, the same as an epoch on the unreinforced data, against 21.1 hours when the captioning model and the teacher ensemble run during training, according to Table 4d. The cost moves to storage, and Table 4c puts DataComp-1B at 90 TB against 140 TB for the reinforced DataCompDR-1B, with the 12M subset going from 0.9 TB to 1.9 TB.
MobileCLIP comes in four sizes, and Table 7 lists image and text encoder parameters separately. S0 pairs an 11.4M-parameter image encoder with a 42.4M-parameter text encoder, S1 uses 21.5M and 63.4M at 2.5 ms and 3.3 ms, S2 uses 35.7M and 63.4M at 3.6 ms and 3.3 ms, and MobileCLIP-B keeps a standard ViT-B/16 image encoder at 86.3M and 10.4 ms. Zero-shot ImageNet accuracy across the four runs 67.8%, 72.6%, 74.4% and 76.8%, and a version of B trained on 39B seen samples instead of 13B reaches 77.2%. All three small variants replace the vision transformer with a convolution-transformer hybrid derived from Apple&amp;amp;rsquo;s FastViT, and S0 also swaps the text encoder for one that mixes 1-D convolutions with four self-attention layers, which the authors report as 5% smaller and 15.8% faster than the 12-layer transformer text encoder that S1 and S2 keep.
Apple released the code, the weights and the reinforced data at apple/ml-mobileclip, with checkpoints for all four variants and the longer-trained B, and with DataCompDR-1B and DataCompDR-12M on Hugging Face as synthetic captions, augmentation parameters and teacher embeddings keyed to DataComp images rather than as the images themselves. The repository lists the code under MIT, the models under Apple&amp;amp;rsquo;s own machine learning research model terms, and the data under CC BY-NC-ND. Apple showed zero-shot scene classification running in real time on an iPhone in the CVPR exhibit hall, and added an iOS app for the same task to the repository in November 2024.
Source: https://openaccess.thecvf.com/content/CVPR2024/html/Vasu_MobileCLIP_Fast_Image-Text_Models_through_Multi-Modal_Reinforced_Training_CVPR_2024_paper.html
Read the article: https://llmobile.kavents.com/ticker/mobileclip/</description><category>Apple</category><category>iPhone</category><category>Research</category><category>Benchmarks</category><category>Open weights</category></item><item><title>Apple Intelligence pairs a 3-billion-parameter on-device model with a server model</title><link>https://llmobile.kavents.com/ticker/apple-intelligence-foundation-models/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/apple-intelligence-foundation-models/</guid><pubDate>Mon, 10 Jun 2024 21:00:00 +0200</pubDate><description>Apple introduced Apple Intelligence on June 10, 2024, built on a roughly 3-billion-parameter language model that runs on the device and a larger model that runs on Apple silicon servers through Private Cloud Compute. The on-device model uses a 49K token vocabulary, the server model 100K.
Apple compresses the on-device model with a mix of 2-bit and 4-bit weights, averaging 3.7 bits per weight, and says an option at 3.5 bits per weight costs no significant quality. On an iPhone 15 Pro the company reports a time to first token of about 0.6 milliseconds per prompt token and 30 tokens per second, both measured before token speculation.
Rather than ship a separate model per feature, Apple swaps LoRA adapters on top of the shared base model. The adapters are stored in 16 bits and, at rank 16, take tens of megabytes each. Apple says human graders preferred its models over comparable ones including GPT-3.5, GPT-4, Llama, Mistral and Gemma across its evaluations.
Diagram: Apple.
Source: https://machinelearning.apple.com/research/introducing-apple-foundation-models
Read the article: https://llmobile.kavents.com/ticker/apple-intelligence-foundation-models/</description><category>Apple</category><category>iPhone</category><category>iOS</category><category>Quantisation</category><category>Apple Silicon</category></item><item><title>ExecuTorch alpha runs Llama 2 7B on iPhone 15 Pro and Galaxy phones</title><link>https://llmobile.kavents.com/ticker/executorch-alpha/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/executorch-alpha/</guid><pubDate>Tue, 30 Apr 2024 18:00:00 +0200</pubDate><description>PyTorch released ExecuTorch alpha on April 30, 2024, the first version of its edge runtime aimed at large language models rather than small vision and speech networks. PyTorch says the work enables Llama 2 7B to run on iPhone 15 Pro, iPhone 15 Pro Max and Samsung Galaxy S22, S23 and S24 phones, with early support for Llama 3 8B. The example project shipped with the release reports 8.15 to 11.6 tok/s for the quantised 7B model, measured by PyTorch over adb on a Galaxy S22, a Galaxy S24 and a OnePlus 12. The 0.1 preview from October 2023 had no such path.
Fitting a 7B model on a phone came down to quantisation. Every linear layer carries 4-bit weights in groups of 128 or 256 values, with activations quantised to 8-bit at runtime from their observed range. PyTorch measured WikiText perplexity at 9.16 for the full-precision model against 10.2 and 10.7 for the two group sizes, and notes that groups smaller than 128 were not enabled because the resulting files were still too large, since the embedding table and the weight scales remained in 32-bit floats. Support for 16-bit floats was under way.
Arm, Apple and Qualcomm Technologies worked on the release, and PyTorch describes the mobile accelerator paths through Core ML, MPS, TOSA and the Qualcomm AI Stack as ongoing work rather than finished. The release notes add Snapdragon 8 Gen 3 support and 4-bit and 16-bit quantisation on the Qualcomm side, over 100 operators on Apple&amp;amp;rsquo;s MPS backend, and a Vulkan delegate for mobile GPUs. PyTorch also credits Google for joint work on XNNPACK, the CPU library that carried the language model numbers, and says MediaTek was enabling the Llama models on its own chips.
PyTorch was explicit about what alpha did not yet do. The release notes mark XNNPACK as the only finished performance path for generative models and everything else as in progress, and the announcement calls on-device LLM support early while asking the community for help building GPU and NPU delegates and expanding the quantisation schemes. Meta was already shipping the runtime elsewhere, using it for hand tracking on Quest 3, for several models on the Ray-Ban Meta smart glasses and in a beginning rollout inside Instagram. The Python package became installable from PyPI with this release.
Source: https://pytorch.org/blog/executorch-alpha/
Read the article: https://llmobile.kavents.com/ticker/executorch-alpha/</description><category>PyTorch</category><category>Llama</category><category>Quantisation</category><category>Apple</category><category>Qualcomm</category></item><item><title>Apple releases OpenELM at 270M to 3B, with parameters spread unevenly across layers</title><link>https://llmobile.kavents.com/ticker/openelm/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/openelm/</guid><pubDate>Tue, 23 Apr 2024 01:12:00 +0200</pubDate><description>Apple posted OpenELM to arXiv on April 22, 2024, a family of four language models at 270M, 450M, 1.1B and 3B parameters, each also released in an instruction-tuned version. The name stands for Open-source Efficient Language Models, and the efficiency comes from layer-wise scaling, which spreads the parameter budget unevenly across the transformer&amp;amp;rsquo;s layers instead of giving every layer the same shape. Table 1 of the paper gives the 1.1B model an average of 45.93% across the OpenLLM leaderboard tasks against 43.57% for OLMo 1.2B, a gap the authors state as 2.36%, reached on 1.5T pre-training tokens against OLMo&amp;amp;rsquo;s 3.0T.
Layer-wise scaling varies the number of attention heads and the width of the feed-forward network from layer to layer, keeping layers near the input narrower and widening them towards the output, so a layer late in the stack holds more parameters than an early one. Apple trained the four variants for 350k iterations with its CoreNet library on public data only, drawing on RefinedWeb, a deduplicated PILE, a subset of RedPajama and a subset of Dolma v1.6, about 1.8T tokens in total. Text is filtered and tokenised on the fly rather than pre-tokenised, using the same tokeniser as Llama.
The paper benchmarks the models on an Apple MacBook Pro with an M2 Max chip and 64 GiB of RAM running macOS 14.4.1, through a port of OpenELM to MLX v0.10.0, and separately on a Linux workstation with an Intel i9-13900KF and an NVIDIA RTX 4090. On the MacBook in BFloat16, Apple measures the 270M model generating 212.40 tok/s and the 3B model 33.96 tok/s, with the 4-bit versions at 256.35 and 60.33 tok/s. On the CUDA machine OpenELM 1.08B is slower than OLMo 1.18B, at 92.15 tok/s against 203.40, which the authors attribute to a naive RMSNorm implementation and to OpenELM having 113 normalisation layers where OLMo has 33.
Apple presents the release as the complete framework rather than weights and inference code, covering the training and evaluation code for public datasets, the training logs, multiple checkpoints, the pre-training configurations and the code that converts a model to MLX for inference and fine-tuning on Apple devices, with pre-converted bf16 and 4-bit checkpoints for all four sizes. The eight models are on Hugging Face and the code is in CoreNet. Both the model cards and CoreNet name the terms as the Apple sample code license, which is Apple&amp;amp;rsquo;s own license and not one of the standard open source licenses.
Source: https://arxiv.org/abs/2404.14619
Read the article: https://llmobile.kavents.com/ticker/openelm/</description><category>Apple</category><category>Apple Silicon</category><category>Research</category><category>Open weights</category><category>Benchmarks</category></item><item><title>Apple researchers run models twice the size of available DRAM from flash</title><link>https://llmobile.kavents.com/ticker/llm-in-a-flash/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/llm-in-a-flash/</guid><pubDate>Tue, 12 Dec 2023 12:00:00 +0100</pubDate><description>Apple researchers published LLM in a flash on December 12, 2023, a method for running language models that do not fit in a device&amp;amp;rsquo;s memory. By keeping parameters in flash storage and loading them into DRAM only when needed, the paper reports running models up to twice the size of the available DRAM.
Two techniques carry the result. Windowing reuses neurons that were already loaded for recent tokens, which reduces how much data has to move. Row-column bundling arranges the weights so that reads follow the sequential access patterns flash memory handles best.
Measured against naive loading from flash, the authors report a 4 to 5 times increase in inference speed on CPU and a 20 to 25 times increase on GPU. The paper was last revised in July 2024.
Chart: Alizadeh et al. Latency per token when only half the model fits in memory.
Source: https://arxiv.org/abs/2312.11514
Read the article: https://llmobile.kavents.com/ticker/llm-in-a-flash/</description><category>Apple</category><category>Memory</category><category>Research</category></item><item><title>Apple publishes MLX, where CPU and GPU share arrays without copies</title><link>https://llmobile.kavents.com/ticker/apple-mlx/</link><guid isPermaLink="true">https://llmobile.kavents.com/ticker/apple-mlx/</guid><pubDate>Tue, 05 Dec 2023 01:04:00 +0100</pubDate><description>Apple machine learning research shipped the first public release of MLX on December 5, 2023, an array framework for machine learning on Apple silicon. The repository carries a v0.0.2 tag dated that day and the same version went up on PyPI minutes later, after an initial commit on November 28. Arrays in MLX live in shared memory, so an operation can run on the CPU or on the GPU without the data being copied from one place to the other.
That behaviour comes from the hardware. Apple silicon uses a unified memory architecture in which the CPU and the GPU have direct access to the same memory pool, and the MLX documentation states that an array therefore has no device of its own. Code names the device when it runs an operation instead of moving an array to a device first, and when two operations on different devices depend on each other, the documentation says the MLX scheduler inserts the dependency between the streams automatically.
Computation is lazy. The documentation states that operations only record a compute graph and that nothing is computed until an eval call asks for a result, which is what lets MLX apply function transformations such as automatic differentiation and automatic vectorisation to the graph. It gives memory as the second reason, since a model whose weights are created as float32 and then replaced with float16 before any evaluation peaks at half the memory eager computation would need.
The MLX Swift bindings followed a week later, with an initial commit on December 12, 2023, and the package manifest lists macOS 14, iOS 17, tvOS 17 and visionOS 1 as supported platforms. The example apps build for iOS as well as macOS and include a chat client for language and vision-language models, a text generation demo that downloads weights from Hugging Face, and Stable Diffusion image generation. The LLMEval example uses the Increased Memory Limit entitlement on iOS, which its README attributes to the size of language model weights, and caps the MLX buffer cache at 20 MB.
MLX LM is the Python package that runs and fine-tunes language models on top of MLX, first published to PyPI on January 12, 2024. It installs the mlx_lm.generate and mlx_lm.chat command line tools, whose default model is a 4-bit quantised Llama 3.2 3B Instruct from the mlx-community organisation on Hugging Face, and it can quantise and upload converted models back to the Hub. MLX is published under the MIT license, and the install documentation lists Apple silicon, macOS 14.0 or newer and Python 3.10 or newer for the macOS package, alongside CUDA and CPU-only builds for Linux added later.
Source: https://github.com/ml-explore/mlx
Read the article: https://llmobile.kavents.com/ticker/apple-mlx/</description><category>Apple</category><category>Apple Silicon</category><category>Developer tools</category><category>Open source</category><category>iOS</category></item></channel></rss>