HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
huggingface
swift-transformers
Swift2024–2024
huggingface / swift-transformers

swift-transformers

Swift Package to implement a transformers-like API in Swift

2Distinct people
2Mentions
0Explicit recommenders
1.4KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Swift Package to implement a transformers-like API in Swift

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week2 dated mentions

Observed mentions: 2024-01-08 03:32:45 UTC to 2024-07-22 18:41:36 UTC. Weeks start Monday, UTC.

012024-01-08 00:00:00 UTC to 2024-01-15 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJan 82024-01-15 00:00:00 UTC to 2024-01-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-22 00:00:00 UTC to 2024-01-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-29 00:00:00 UTC to 2024-02-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-05 00:00:00 UTC to 2024-02-12 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-12 00:00:00 UTC to 2024-02-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-19 00:00:00 UTC to 2024-02-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-02-26 00:00:00 UTC to 2024-03-04 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-04 00:00:00 UTC to 2024-03-11 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-11 00:00:00 UTC to 2024-03-18 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-18 00:00:00 UTC to 2024-03-25 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-03-25 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-01 00:00:00 UTC to 2024-04-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-08 00:00:00 UTC to 2024-04-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-15 00:00:00 UTC to 2024-04-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 152024-04-22 00:00:00 UTC to 2024-04-29 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-04-29 00:00:00 UTC to 2024-05-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-06 00:00:00 UTC to 2024-05-13 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-13 00:00:00 UTC to 2024-05-20 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-20 00:00:00 UTC to 2024-05-27 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-05-27 00:00:00 UTC to 2024-06-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-03 00:00:00 UTC to 2024-06-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-10 00:00:00 UTC to 2024-06-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-17 00:00:00 UTC to 2024-06-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-24 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-01 00:00:00 UTC to 2024-07-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-08 00:00:00 UTC to 2024-07-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-15 00:00:00 UTC to 2024-07-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-22 00:00:00 UTC to 2024-07-29 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsJul 22

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 82024-01-08 00:00:00 UTC2024-01-15 00:00:00 UTC101
Jan 152024-01-15 00:00:00 UTC2024-01-22 00:00:00 UTC000
Jan 222024-01-22 00:00:00 UTC2024-01-29 00:00:00 UTC000
Jan 292024-01-29 00:00:00 UTC2024-02-05 00:00:00 UTC000
Feb 52024-02-05 00:00:00 UTC2024-02-12 00:00:00 UTC000
Feb 122024-02-12 00:00:00 UTC2024-02-19 00:00:00 UTC000
Feb 192024-02-19 00:00:00 UTC2024-02-26 00:00:00 UTC000
Feb 262024-02-26 00:00:00 UTC2024-03-04 00:00:00 UTC000
Mar 42024-03-04 00:00:00 UTC2024-03-11 00:00:00 UTC000
Mar 112024-03-11 00:00:00 UTC2024-03-18 00:00:00 UTC000
Mar 182024-03-18 00:00:00 UTC2024-03-25 00:00:00 UTC000
Mar 252024-03-25 00:00:00 UTC2024-04-01 00:00:00 UTC000
Apr 12024-04-01 00:00:00 UTC2024-04-08 00:00:00 UTC000
Apr 82024-04-08 00:00:00 UTC2024-04-15 00:00:00 UTC000
Apr 152024-04-15 00:00:00 UTC2024-04-22 00:00:00 UTC000
Apr 222024-04-22 00:00:00 UTC2024-04-29 00:00:00 UTC000
Apr 292024-04-29 00:00:00 UTC2024-05-06 00:00:00 UTC000
May 62024-05-06 00:00:00 UTC2024-05-13 00:00:00 UTC000
May 132024-05-13 00:00:00 UTC2024-05-20 00:00:00 UTC000
May 202024-05-20 00:00:00 UTC2024-05-27 00:00:00 UTC000
May 272024-05-27 00:00:00 UTC2024-06-03 00:00:00 UTC000
Jun 32024-06-03 00:00:00 UTC2024-06-10 00:00:00 UTC000
Jun 102024-06-10 00:00:00 UTC2024-06-17 00:00:00 UTC000
Jun 172024-06-17 00:00:00 UTC2024-06-24 00:00:00 UTC000
Jun 242024-06-24 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 12024-07-01 00:00:00 UTC2024-07-08 00:00:00 UTC000
Jul 82024-07-08 00:00:00 UTC2024-07-15 00:00:00 UTC000
Jul 152024-07-15 00:00:00 UTC2024-07-22 00:00:00 UTC000
Jul 222024-07-22 00:00:00 UTC2024-07-29 00:00:00 UTC110

What Hacker News says

2 sources
TL;DR: No, nearly all these apps will use GPU (via Metal), or CPU, not Neural Engine (ANE). Why? I suggest a few main reasons: 1) No Neural Engine API 2) CoreML has challenges modeling LLMs efficiently right now. 3) Not Enough Benefit (For the Cost... Yet!) This is my best understanding based on my own work and research for a local LLM iOS app. Read on for more in-depth justifications of each point! --- 1) No Neural Engine API - There is no developer API to use the Neural Engine programmatically, so CoreML is the only way to be able to use it. 2) CoreML has challenges modeling LLMs efficiently right now. - Its most-optimized use cases seem tailored for image models, as it works best with fixed input lengths[1][2], which are fairly limiting for general language modeling (are all prompts, sentences and paragraphs, the same number of tokens?
Read the rest
do you want to pad all your inputs?). - CoreML features limited support for the leading approaches for compressing LLMs (quantization, whether weights-only or activation-aware). Falcon-7b-instruct (fp32) in CoreML is 27.7GB [3], Llama-2-chat (fp16) is 13.5GB [4] — neither will fit in memory on any currently shipping iPhone. They'd only barely fit on the newest, highest-end iPad Pros. - HuggingFace‘s swift-transformers[5] is a CoreML-focused library under active development to eventually help developers with many of these problems, in addition to an `exporters` cli tool[6] that wraps Apple's `coremltools` for converting PyTorch or other models to CoreML. 3) Not Enough Benefit (For the Cost... Yet!) - ANE & GPU (Metal) have access to the same unified memory. They are both subject to the same restrictions on background execution (you simply can't use them in the background, or your app is killed[7]). - So the main benefit from unlocking the ANE would be multitasking: running an ML task in parallel with non-ML tasks that might also require the GPU: e.g. SwiftUI Metal Shaders, background audio processing (shoutout Overcast!), screen recording/sharing, etc. Absolutely worthwhile to achieve, but for the significant work required and the lack of ecosystem currently around CoreML for LLMs specifically, the benefits become less clear. - Apple's hot new ML library, MLX, only uses Metal for GPU[8], just like Llama.cpp. More nuanced differences arise on closer inspection related to MLX's focus on unified memory optimizations. So perhaps we can squeeze out some performance from unified memory in Llama.cpp, but CoreML will be the only way to unlock ANE, which is lower priority according to lead maintainer Georgi Gerganov as of late this past summer[9], likely for many of the reasons enumerated above. I've learned most of this while working on my own private LLM inference app, cnvrs[10] — would love to hear your feedback or thoughts! Britt --- [1] https://github.com/huggingface/exporters/pull/37 [2] https://apple.github.io/coremltools/docs-guides/source/flexi... [3] https://huggingface.co/tiiuae/falcon-7b-instruct/tree/main/c... [4] https://huggingface.co/coreml-projects/Llama-2-7b-chat-corem... [5] https://github.com/huggingface/swift-transformers [6] https://github.com/huggingface/exporters [7] https://developer.apple.com/documentation/metal/gpu_devices_... [8] https://github.com/ml-explore/mlx/issues/18 [9] https://github.com/ggerganov/llama.cpp/issues/1714#issuecomm... [10] https://testflight.apple.com/join/ERFxInZg
In I made an app that runs Mistral 7B 0.2 LLM locally on iPhone Pros

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.