Run this model with HF Jobs
Run rsvalerio/nomic-embed-code-coreml on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/rsvalerio/nomic-embed-code-coreml. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/rsvalerio/nomic-embed-code-coreml on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use rsvalerio/nomic-embed-code-coreml with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use rsvalerio/nomic-embed-code-coreml with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("rsvalerio/nomic-embed-code-coreml") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Update model card
Browse files12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849---license: apache-2.0tags: - coreml - sentence-transformers - embedding - nomic - codebase_model: nomic-ai/nomic-embed-codelibrary_name: coremltoolspipeline_tag: feature-extraction---
# nomic-embed-code — CoreML (.mlpackage)
CoreML conversion of [nomic-ai/nomic-embed-code](https://huggingface.co/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
```bashcai 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](https://github.com/rsvalerio/models) CI pipeline with `coremltools`.
```bashpip install coremltools transformers torchpython convert.py```README.mdAdded+49