# swift-transformers

A Swift package providing utilities and an idiomatic API for using transformer language models in Swift applications, including tokenization and model downloads.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## STAR-XPC: Set Transformer for Estimating X-ray Transmission in Polymer Composites

DevFeed: [STAR-XPC: Set Transformer for Estimating X-ray Transmission in Polymer Composites](<https://devfeed.tech/articles/star-xpc-set-transformer-for-estimating-x-ray-transmission-in-polymer-composites-94796.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2610.28709>)

Author: Can Erer, H. Birkan Yilmaz, Nebahat Aral

Published: 2026-10-22T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [swift-transformers](<https://devfeed.tech/topics/swift-transformers.md>)

Tags: [beam](<https://devfeed.tech/tags/beam.md>), [chemistry](<https://devfeed.tech/tags/chemistry.md>), [cross](<https://devfeed.tech/tags/cross.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [inference](<https://devfeed.tech/tags/inference.md>), [monte-carlo](<https://devfeed.tech/tags/monte-carlo.md>), [neural-network](<https://devfeed.tech/tags/neural-network.md>), [orders](<https://devfeed.tech/tags/orders.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [radiation](<https://devfeed.tech/tags/radiation.md>), [ratio](<https://devfeed.tech/tags/ratio.md>), [set](<https://devfeed.tech/tags/set.md>), [simulation](<https://devfeed.tech/tags/simulation.md>), [transformer](<https://devfeed.tech/tags/transformer.md>), [transmission](<https://devfeed.tech/tags/transmission.md>)

### AI overview

STAR-XPC estimates X-ray transmission through polymer shielding composites in milliseconds, providing a fast surrogate for Monte Carlo simulations that can take several hours. It uses a permutation-invariant Set Transformer to process mixtures of up to 11 molecular constituents, their mass fractions, and four bulk physical descriptors; ChemBERTa supplies constituent embeddings. The model was trained on 4,697 configurations generated with PENELOPE/penEasy for polyethylene-based slabs 0.15-2.5 mm thick under 30, 80, 100, and 120 kV sources. In jointly stratified, leakage-free 10-fold cross-validation, it achieved R² = 0.9988, median absolute percentage error of 1.15%, and an alpha-trimmed error of 1.66%. These results are reported for the simulated configurations and described setup.

### Source excerpt

arXiv:2610.28709v1 Announce Type: new Abstract: Evaluating the energy transmission ratio of an X-ray beam through a polymer composite is a challenging task in radiation shielding studies. The reference solution with Monte Carlo transport simulation is highly accurate but computationally expensive: each of our reference simulations is capped at $4\times10^9$ photon histories and a 20,000 s (over 5 hours) time limit, while closed-form analytical methods fail to represent such complex scenarios. We present an artificial neural network model that maps the unordered multi-set of molecular constituents, their mass fractions, and four bulk physical descriptors directly to the transmission ratio $I(t)/I_0$ in 1-3 milliseconds. The model is a Set Transformer, which makes it permutation invariant by construction and accepts mixtures of different sizes up to 11 constituents within a fixed-size padded set. Each constituent is embedded with a chemistry-pretrained transformer language model, ChemBERTa. In our proposed method, training data are produced by an automated PENELOPE/penEasy pipeline using the radiation source at 30, 80, 100, and 120 kV tube voltages over polyethylene-based shielding composite slabs of thicknesses spanning 0.15-2.5 mm. After preprocessing, the dataset contains $n = 4697$ simulated configurations on which a leakage-free, jointly stratified 10-fold cross-validation is performed, attaining mean squared error MSE = $(1.12 \pm 0.56)\times10^{-4}$, normalized-MSE percentage NMSE% = 0.0294% $\pm$ 0.0147%, and $R^2 = 0.9988$. The corresponding per-sample percentage errors give an alpha-trimmed ($\alpha = 0.10$) absolute percentage error (APE) of 1.66% and a median APE of 1.15%. Our model's inference is several orders of magnitude faster than the underlying Monte Carlo simulation (sub-millisecond per query vs. several hours for the reference run) with effective accuracy in predicting $I(t)/I_0$.

## AWS, Upstage and Ollama agree on a decision-model API. OpenAI hasn't signed on.

DevFeed: [AWS, Upstage and Ollama agree on a decision-model API. OpenAI hasn't signed on.](<https://devfeed.tech/articles/aws-upstage-and-ollama-agree-on-a-decision-model-api-openai-hasn-t-signed-on-83975.md>)

Original publisher: [Read original article](<https://thenewstack.io/decision-models-system-one/>)

Author: Janakiram MSV

Published: 2026-10-09T12:00:00Z

Content type: article

Language: en

Sources: [The New Stack](<https://devfeed.tech/sources/the-new-stack.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [swift-transformers](<https://devfeed.tech/topics/swift-transformers.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [open-responses](<https://devfeed.tech/topics/open-responses.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-agents](<https://devfeed.tech/tags/ai-agents.md>), [ai-models](<https://devfeed.tech/tags/ai-models.md>), [api](<https://devfeed.tech/tags/api.md>), [api-management](<https://devfeed.tech/tags/api-management.md>), [aws](<https://devfeed.tech/tags/aws.md>), [cloudflare](<https://devfeed.tech/tags/cloudflare.md>), [ollama](<https://devfeed.tech/tags/ollama.md>), [strands-decider-2b](<https://devfeed.tech/tags/strands-decider-2b.md>)

### AI overview

Decision models return structured, probabilistic answers to typed questions, allowing AI applications to route requests, gate tool calls, and make policy judgments. The article traces how TypeSafe's System One API schema has spread across hosted and open-weight implementations, enabling portability while leaving differences in confidence, quality, and limits that require testing. It also discusses adversarial robustness and the possibility of competing API contracts.

### Source excerpt

AWS's new decision model comes with a familiar address. Released October 1, Strands Decider 2B is an open-weight model built The post AWS, Upstage and Ollama agree on a decision-model API. OpenAI hasn't signed on. appeared first on The New Stack.

## Introducing swift-huggingface: The Complete Swift Client for Hugging Face

DevFeed: [Introducing swift-huggingface: The Complete Swift Client for Hugging Face](<https://devfeed.tech/articles/introducing-swift-huggingface-the-complete-swift-client-for-hugging-face-7495.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/swift-huggingface>)

Author: Mattt

Published: 2025-12-05T00:00:00Z

Content type: article

Language: en

Sources: [Hugging Face](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [hugging face](<https://devfeed.tech/topics/hugging-face.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [API](<https://devfeed.tech/topics/api.md>), [OAuth 2.0](<https://devfeed.tech/topics/oauth2.md>), [swift-transformers](<https://devfeed.tech/topics/swift-transformers.md>), [OAuth](<https://devfeed.tech/topics/oauth.md>), [Cache](<https://devfeed.tech/topics/cache.md>), [spaces](<https://devfeed.tech/topics/spaces.md>), [dataset](<https://devfeed.tech/topics/dataset.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [cache](<https://devfeed.tech/tags/cache.md>), [community](<https://devfeed.tech/tags/community.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [hub](<https://devfeed.tech/tags/hub.md>), [hugging-face](<https://devfeed.tech/tags/hugging-face.md>), [oauth](<https://devfeed.tech/tags/oauth.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-transformers](<https://devfeed.tech/tags/swift-transformers.md>), [xet](<https://devfeed.tech/tags/xet.md>)

### AI overview

The article introduces swift-huggingface, a complete Swift client for Hugging Face. It focuses on reliable large-file downloads, resumable transfers, Python-compatible caching, clearer authentication, OAuth 2.0 for user-facing apps, and broad Hub API coverage for models, datasets, and spaces.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.

## Swift Transformers Reaches 1.0 - and Looks to the Future

DevFeed: [Swift Transformers Reaches 1.0 - and Looks to the Future](<https://devfeed.tech/articles/swift-transformers-reaches-1-0-and-looks-to-the-future-7496.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/swift-transformers>)

Author: Pedro Cuenca; Christopher Fleetwood; Mattt; Vaibhav Srivastav

Published: 2025-09-26T00:00:00Z

Content type: release

Language: en

Sources: [Hugging Face](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [swift-transformers](<https://devfeed.tech/topics/swift-transformers.md>), [MLX](<https://devfeed.tech/topics/mlx.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Local AI](<https://devfeed.tech/topics/local-ai.md>), [hugging face](<https://devfeed.tech/topics/hugging-face.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [Open Source](<https://devfeed.tech/topics/open-source.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [asr](<https://devfeed.tech/tags/asr.md>), [coreml](<https://devfeed.tech/tags/coreml.md>), [hugging-face](<https://devfeed.tech/tags/hugging-face.md>), [inference](<https://devfeed.tech/tags/inference.md>), [llms](<https://devfeed.tech/tags/llms.md>), [local](<https://devfeed.tech/tags/local.md>), [mlx](<https://devfeed.tech/tags/mlx.md>), [open-source](<https://devfeed.tech/tags/open-source.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-transformers](<https://devfeed.tech/tags/swift-transformers.md>), [transformers](<https://devfeed.tech/tags/transformers.md>)

### AI overview

swift-transformers reaches version 1.0 as a Swift library for running local models on Apple Silicon, including iPhones. It combines input preparation, Hugging Face Hub access, local caching and offline downloads, and wrappers for running Core ML-converted LLMs. The release establishes a stable foundation for Apple-focused local inference and future MLX and agentic use cases.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.

## WWDC 24: Running Mistral 7B with Core ML

DevFeed: [WWDC 24: Running Mistral 7B with Core ML](<https://devfeed.tech/articles/wwdc-24-running-mistral-7b-with-core-ml-7353.md>)

Original publisher: [Read original article](<https://huggingface.co/blog/mistral-coreml>)

Author: Pedro Cuenca; Christopher Fleetwood; Vaibhav Srivastav; Omar Sanseviero

Published: 2024-07-22T00:00:00Z

Content type: tutorial

Language: en

Sources: [Hugging Face](<https://devfeed.tech/sources/hugging-face-blog.md>)

Topics: [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [Swift](<https://devfeed.tech/topics/swift.md>), [swift-transformers](<https://devfeed.tech/topics/swift-transformers.md>), [AI Models](<https://devfeed.tech/topics/ai-models.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [macOS](<https://devfeed.tech/topics/macos.md>)

Tags: [ai-models](<https://devfeed.tech/tags/ai-models.md>), [apple](<https://devfeed.tech/tags/apple.md>), [coreml](<https://devfeed.tech/tags/coreml.md>), [guide](<https://devfeed.tech/tags/guide.md>), [inference](<https://devfeed.tech/tags/inference.md>), [llm](<https://devfeed.tech/tags/llm.md>), [mistral](<https://devfeed.tech/tags/mistral.md>), [ml](<https://devfeed.tech/tags/ml.md>), [swift](<https://devfeed.tech/tags/swift.md>), [swift-transformers](<https://devfeed.tech/tags/swift-transformers.md>), [wwdc](<https://devfeed.tech/tags/wwdc.md>)

### AI overview

A hands-on guide to running the Mistral 7B language model on Apple Silicon using Core ML and Swift. It covers converting or downloading Core ML models, running inference, and using new Core ML tensor features introduced with iOS 18 and macOS Sequoia, including execution across the CPU, GPU, and Neural Engine.

### Source excerpt

We're on a journey to advance and democratize artificial intelligence through open source and open science.