1
stars
11
commits
4
linked in READMEs
Sep 7, 2026
updated
Core AI is Apple's on-device ML runtime in iOS 27 / macOS 27 and the successor to Core ML: PyTorch models are exported with Apple's coreai-torch (LLMs: coreai.llm.export) into .aimodel bundles that run on the GPU or the Neural Engine, e.g. Qwen3-8B 4-bit decodes at 94 tok/s on an M4 Max GPU, MLX 90 under the same protocol (apple-silicon-llm-bench, macOS 27 beta, 2026-06).
google/timesfm-2.5-200m-transformers
(Apache-2.0, 200M) converted to Apple Core AI .aimodel — the
zoo's first time-series forecasting
foundation model. A decoder-only patched transformer: feed it any univariate series, get a
128-step point + 10-quantile forecast, entirely on device.
TimesFM is a decoder-only transformer over time-series patches (32 points/patch), with the familiar LLM stack — RoPE, RMSNorm sandwich-norm, QK-norm, a learnable per-dim attention scale — but numeric patches in and quantile forecasts out. The zoo port runs it as **one stateless Core AI graph
GraphModel.timesfm_2p5_200m_ctx2048_fp16.aimodel — the transformer graph (fp16, ~463 MB). Fixed context
2048 (64 patches); shorter series are front-padded + masked by the host, so one bundle
covers every context length ≤ 2048.
Inputs tok_in[1,64,64], cos/sin[1,64,80], attn_bias[1,1,64,64] →
outputs proj_point[1,64,1280], proj_q[1,64,10240].host/ — the Python host-DSP reference (timesfm_core.py, host_forecast.py): patching,
two-level RevIN (global + per-patch causal Welford), flip-invariance (2 graph calls on ±input),
continuous-quantile head, denormalization, positivity clamp. This is the exact spec the Swift
Forecaster follows.TimesFm2_5ModelForPrediction fp32 oracle)KitForecaster, AOT h18p): device forecast == Mac to 3 decimals
(Δ ≤ 0.001, fp16 GPU rounding).import numpy as np, torch, coreai.runtime as rt, asyncio
from host_forecast import forecast # host/host_forecast.py
from timesfm_core import EngineCore # thin engine adapter (see host/)
CFG = dict(patch=32, horizon=128, hidden=1280, layers=20, heads=16,
head_dim=80, inter=1280, q=9, oql=1024, eps=1e-6)
model = asyncio.run(rt.AIModel.load("timesfm_2p5_200m_ctx2048_fp16.aimodel",
rt.SpecializationOptions.from_preferred_compute_unit_kind(
rt.ComputeUnitKind.gpu())))
core = EngineCore(model.load_function("main"), torch.float16)
series = torch.tensor(my_1d_series, dtype=torch.float32) # any length ≤ 2048
mean_pred, full_pred = forecast(core, series, ctx_len=2048, cfg=CFG) # (128,), (128,10)
let forecaster = try await KitForecaster(catalog: "timesfm-2.5-200m")
let out = try await forecaster.forecast(series) // [Float] → point + quantiles
// out.mean (128-step), out.quantiles (128 × 10)
Base model: TimesFM 2.5 (Google Research). Core AI export: coreai-model-zoo. Apache-2.0.
More models in this format: Core AI Model Zoo — 75 models, each with the recipe that produced it.
Want a different model on-device? Open a request — free, open weights only; the export and its measured numbers get published publicly.
11 commits
1
stars
11
commits
4
linked in READMEs
Sep 7, 2026
updated
Core AI is Apple's on-device ML runtime in iOS 27 / macOS 27 and the successor to Core ML: PyTorch models are exported with Apple's coreai-torch (LLMs: coreai.llm.export) into .aimodel bundles that run on the GPU or the Neural Engine, e.g. Qwen3-8B 4-bit decodes at 94 tok/s on an M4 Max GPU, MLX 90 under the same protocol (apple-silicon-llm-bench, macOS 27 beta, 2026-06).
google/timesfm-2.5-200m-transformers
(Apache-2.0, 200M) converted to Apple Core AI .aimodel — the
zoo's first time-series forecasting
foundation model. A decoder-only patched transformer: feed it any univariate series, get a
128-step point + 10-quantile forecast, entirely on device.
TimesFM is a decoder-only transformer over time-series patches (32 points/patch), with the familiar LLM stack — RoPE, RMSNorm sandwich-norm, QK-norm, a learnable per-dim attention scale — but numeric patches in and quantile forecasts out. The zoo port runs it as **one stateless Core AI graph
GraphModel.timesfm_2p5_200m_ctx2048_fp16.aimodel — the transformer graph (fp16, ~463 MB). Fixed context
2048 (64 patches); shorter series are front-padded + masked by the host, so one bundle
covers every context length ≤ 2048.
Inputs tok_in[1,64,64], cos/sin[1,64,80], attn_bias[1,1,64,64] →
outputs proj_point[1,64,1280], proj_q[1,64,10240].host/ — the Python host-DSP reference (timesfm_core.py, host_forecast.py): patching,
two-level RevIN (global + per-patch causal Welford), flip-invariance (2 graph calls on ±input),
continuous-quantile head, denormalization, positivity clamp. This is the exact spec the Swift
Forecaster follows.TimesFm2_5ModelForPrediction fp32 oracle)KitForecaster, AOT h18p): device forecast == Mac to 3 decimals
(Δ ≤ 0.001, fp16 GPU rounding).import numpy as np, torch, coreai.runtime as rt, asyncio
from host_forecast import forecast # host/host_forecast.py
from timesfm_core import EngineCore # thin engine adapter (see host/)
CFG = dict(patch=32, horizon=128, hidden=1280, layers=20, heads=16,
head_dim=80, inter=1280, q=9, oql=1024, eps=1e-6)
model = asyncio.run(rt.AIModel.load("timesfm_2p5_200m_ctx2048_fp16.aimodel",
rt.SpecializationOptions.from_preferred_compute_unit_kind(
rt.ComputeUnitKind.gpu())))
core = EngineCore(model.load_function("main"), torch.float16)
series = torch.tensor(my_1d_series, dtype=torch.float32) # any length ≤ 2048
mean_pred, full_pred = forecast(core, series, ctx_len=2048, cfg=CFG) # (128,), (128,10)
let forecaster = try await KitForecaster(catalog: "timesfm-2.5-200m")
let out = try await forecaster.forecast(series) // [Float] → point + quantiles
// out.mean (128-step), out.quantiles (128 × 10)
Base model: TimesFM 2.5 (Google Research). Core AI export: coreai-model-zoo. Apache-2.0.
More models in this format: Core AI Model Zoo — 75 models, each with the recipe that produced it.
Want a different model on-device? Open a request — free, open weights only; the export and its measured numbers get published publicly.
11 commits