nomic-embed-code โ€” CoreML (.mlpackage)

CoreML conversion of nomic-ai/nomic-embed-code for native Apple Neural Engine / GPU inference on macOS and iOS.

Files

File Description
model.mlpackage/ CoreML model (FP16, flexible shapes)
tokenizer.json HF fast tokenizer
config.json Model configuration

Details

  • Architecture: NomicBERT (RoPE, SwiGLU, no token_type_ids)
  • Precision: FP16 (native ANE precision)
  • Compute units: .all โ€” CoreML schedules across ANE, GPU, and CPU
  • Input shapes: batch=1, seq_len=1..8192 (flexible range)
  • Embedding dimension: 768

Usage with cai

cai index --embed-backend swift --embed-model "rsvalerio/nomic-embed-code-coreml"

The Swift backend downloads the .mlpackage from this repo, compiles it to .mlmodelc on first run (~30-60s), and caches the compiled model for subsequent runs.

Conversion

Converted using rsvalerio/models CI pipeline with coremltools.

pip install coremltools transformers torch
python convert.py
Downloads last month
18
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for rsvalerio/nomic-embed-code-coreml

Base model

Qwen/Qwen2.5-7B
Quantized
(9)
this model