Downloads · 30 days
4
15% of all-time downloads
groxaxo/Nemotron-3-Embed-1B-CoreML-S256-W4A16
Nemotron-3-Embed-1B-CoreML-S256-W4A16 is a feature extraction model from groxaxo. Use it when you need embeddings to search or compare text. It is set up for coremltools. The card lists the license as openmdw-1.1.
Nemotron-3-Embed-1B-CoreML-S256-W4A16 is a Core ML conversion intended for deployment on Apple platforms, published by groxaxo. It is intended for open-source evaluation, reproducible experimentation, and compatible l…
Downloads · 30 days
4
15% of all-time downloads
All-time downloads
26
Public
Repo size
659 MB
Likes
0
Public
Click a slice to open those files.
.bin642 MB · 97%
From the Hugging Face model README
Nemotron-3-Embed-1B-CoreML-S256-W4A16 is a Core ML conversion intended for deployment on Apple platforms, published by groxaxo.
It is intended for open-source evaluation, reproducible experimentation, and compatible local or
hosted inference workflows. The wording below is deliberately limited to what can be verified
from this repository's metadata and artifacts.
| Field | Details |
|---|---|
| Format | Core ML |
| Source / base | nvidia/Nemotron-3-Embed-1B-BF16 |
| Intended task | feature-extraction |
| License | openmdw-1.1 |
*.bin (1 file)Use the compiled Core ML assets from an Apple-platform application or a current Core ML tooling stack. Check the repository's input/output metadata before wiring the model into a production pipeline.
Quantization or conversion changes numerical behavior, memory use, and throughput relative to the source checkpoint; validate quality on your own workload.
Generated outputs may be inaccurate or unsuitable for a given use case. Users are responsible for testing behavior, applying appropriate safeguards, and complying with applicable licenses and laws.
<!-- polished-overview:end -->This repository contains an independently converted Core ML version of
nvidia/Nemotron-3-Embed-1B-BF16.
It uses symmetric INT4 weight-only quantization with block size 32. Activations
remain floating point (W4A16). No weights were retrained.
The exported contract is fixed-shape:
input_ids: int32[1, 256]attention_mask: int32[1, 256]embedding: normalized 2,048-dimensional vectorquery: prefix for queriespassage: prefix for documentsThis is a community conversion. It is not affiliated with or endorsed by NVIDIA.
The conversion used the immutable upstream revision
a5e0f804b9e90a1ca6784ecbf6e41595774fc834.
| Check | Cosine similarity |
|---|---|
| Fixed-shape attention vs. the original attention implementation | 1.000000000 |
| Core ML FP16 vs. PyTorch reference | 0.999999642 |
| Core ML INT4 vs. PyTorch reference | 0.986392558 |
These are mechanical single-input parity checks. They verify the conversion path but do not replace retrieval evaluation.
We also evaluated the INT4 model on a deliberately difficult synthetic set of 16 English/Spanish conversation summaries and 16 queries. The cases include corrections, negation, superseded facts, and near-topic distractors. The Core ML model and PyTorch reference received identical token IDs, prefixes, left padding, sequence length, and cosine-ranking methodology.
| Output dimensions | Variant | Recall@1 | Recall@3 | MRR | Top-1 agreement | Mean vector cosine | Minimum vector cosine |
|---|---|---|---|---|---|---|---|
| 256 | PyTorch reference | 0.9375 | 1.0000 | 0.96875 | — | — | — |
| 256 | Core ML INT4 | 0.9375 | 1.0000 | 0.96875 | 1.0000 | 0.96609 | 0.91556 |
| 512 | PyTorch reference | 1.0000 | 1.0000 | 1.00000 | — | — | — |
| 512 | Core ML INT4 | 1.0000 | 1.0000 | 1.00000 | 1.0000 | 0.97468 | 0.94720 |
| 768 | PyTorch reference | 0.9375 | 1.0000 | 0.96875 | — | — | — |
| 768 | Core ML INT4 | 1.0000 | 1.0000 | 1.00000 | 0.9375 | 0.97798 | 0.96012 |
| 2048 | PyTorch reference | 0.9375 | 1.0000 | 0.96875 | — | — | — |
| 2048 | Core ML INT4 | 1.0000 | 1.0000 | 1.00000 | 0.9375 | 0.98236 | 0.96986 |
Top-1 agreement and vector cosine compare INT4 directly with the PyTorch
reference. Lower-dimensional rows slice the first N dimensions and renormalize
before cosine search.
The apparent INT4 improvement at 768 and 2,048 dimensions is one changed rank on a very small set. It is quantization noise, not evidence that INT4 is more accurate than the reference model.
Raw results are available in
results/conversion-report.json and
results/conversation-retrieval-benchmark.json.
from pathlib import Path
import coremltools as ct
import numpy as np
from huggingface_hub import snapshot_download
from transformers import AutoTokenizer
root = Path(snapshot_download("groxaxo/Nemotron-3-Embed-1B-CoreML-S256-W4A16"))
tokenizer = AutoTokenizer.from_pretrained(
root / "tokenizer",
local_files_only=True,
padding_side="left",
)
model = ct.models.MLModel(
str(root / "model" / "Nemotron3Embed1B-S256-W4A16-B32.mlpackage")
)
encoded = tokenizer.encode("query: What decision was corrected?", add_special_tokens=True)
encoded = encoded[:256]
pad_id = tokenizer.pad_token_id if tokenizer.pad_token_id is not None else 11
padding = 256 - len(encoded)
input_ids = np.asarray([[pad_id] * padding + encoded], dtype=np.int32)
attention_mask = np.asarray([[0] * padding + [1] * len(encoded)], dtype=np.int32)
embedding = model.predict(
{"input_ids": input_ids, "attention_mask": attention_mask}
)["embedding"].reshape(-1)
embedding /= max(float(np.linalg.norm(embedding)), 1e-12)
print(embedding.shape) # (2048,)
The conversion and evaluation scripts are included under scripts/.
The recorded environment used Python 3.12, PyTorch 2.7.1, Core ML Tools 9.0,
and Transformers 5.5.0.
python scripts/convert_nemotron_coreml.py \
--output-dir artifacts \
--sequence-length 256 \
--revision a5e0f804b9e90a1ca6784ecbf6e41595774fc834
python scripts/benchmark_nemotron_conversations.py \
--mlmodel artifacts/Nemotron3Embed1B-S256-W4A16-B32.mlpackage \
--tokenizer artifacts/tokenizer \
--sequence-length 256 \
--output results/conversation-retrieval-benchmark.json
The benchmark script compares against the exact upstream BF16 revision and expects those upstream weights to be available in the local Hugging Face cache.
This repository includes the upstream LICENSE, NOTICE, and
THIRD_PARTY_NOTICES.md. Use is subject to those terms.