--- license: apache-2.0 base_model: vllm-sr/d3-mini pipeline_tag: zero-shot-classification tags: - coreai - apple - decision-model - multimodal - experimental - vision - video --- # d3-mini — experimental Apple Core AI conversion Community conversion of [vllm-sr/d3-mini](https://huggingface.co/vllm-sr/d3-mini) at revision `a475367de0d8133a3c1a2a0dc12303d89cfa2ab4`. Converted by Max Farrell. This is an Apple **Core AI `.aimodel`** bundle for macOS 27, with its text backbone, original 255-way answer readout, and vision encoder. Choice, yes/no (noul), and score questions run through Core AI; tokenization, media decoding, and result formatting run on the host. No text is generated. **Experimental, with measured numerical drift.** All 10 smoke cases selected the same answer as the official BF16 PyTorch runtime on identical resized inputs. The largest absolute probability difference was **0.004804**. These are small conversion smoke tests, not a quality benchmark, calibration result, or evidence of equivalence on arbitrary inputs. Fixed-capacity padding and Core AI's BF16 execution can change probabilities and may change decisions on other inputs. The initial 0.02 probability-parity target was not met by every model; the full values are reported rather than claimed as strict numerical parity. ## Capacity and changes from upstream - One question per forward pass; `system_one` processes several questions sequentially. - **512 combined tokens**, including visual tokens and all prompt text. Oversized requests raise an error; nothing is truncated. - Images and sampled video frames are resized to **224×224**, including aspect-ratio changes. Each image or two-frame video patch group occupies 49 visual tokens. This is much smaller than upstream's default image/video resolution. - Multiple images/videos work only when their complete prompt fits. Video decoding retains upstream's 2-fps sampling, at least 4 and at most 32 frames; long sampled clips may exceed the 512-token limit and are rejected. - Up to 255 answer codes are retained; the prompt capacity generally limits practical option count well before 255. - The original **BF16 backbone weights** and **FP32 decision head** are retained. Linear attention stays causal; full attention remains noncausal as upstream specifies. - Default specialization was tested on this Mac. Forced CPU-only specialization crashed inside Apple's compiler during development. **No verified Neural Engine/GPU placement, iPhone compatibility, speedup, or power-efficiency claim.** ## Use ```bash hf download maxffarrell/d3-mini-CoreAI --local-dir d3-mini-CoreAI cd d3-mini-CoreAI python -m venv .venv source .venv/bin/activate pip install -r requirements.txt ``` ```python import asyncio from coreai_d3 import D3CoreAI async def main(): model = await D3CoreAI.load(".") result = await model.system_one( state="The customer was charged twice.", questions={"route": { "type": "choice", "instructions": "Which team should handle this?", "criteria": {"billing": "Payments", "shipping": "Delivery"} }}, # images=["receipt.png"], # videos=["clip.mp4"], ) print(result) asyncio.run(main()) ``` All neural inference in this adapter uses `decision.aimodel` and `vision.aimodel`. PyTorch/Transformers are dependencies for conversion and host preprocessing; source PyTorch weights are not included or needed for inference. Core AI may write a local specialization cache on first load. The adapter uses the upstream prompt formatter and typed response shapes. ## Validation macOS 27.0.1, `coreai-core==1.0.0b3`, default specialization. The BF16 reference uses Transformers 5.17.0 and the pinned upstream checkpoint. Images and video are compared using the same 224×224 input pixels, not against upstream's original full-resolution run. Text includes choice, noul, score, Spanish, 10 options, and a 433-token case. Additional checks cover one image, two images, video, and rejecting oversized text. End-to-end `system_one` is separately smoke-tested without loading source weights. | Case | Tokens | Options | Selected answer matches | Max probability difference | | --- | ---: | ---: | --- | ---: | | text / choice | 95 | 3 | Yes | 0.000260 | | text / noul | 97 | 2 | Yes | 0.000122 | | text / score | 102 | 4 | Yes | 0.002409 | | text / choice | 106 | 3 | Yes | 0.000016 | | text / choice | 149 | 10 | Yes | 0.000220 | | text / choice | 433 | 2 | Yes | 0.000008 | | image / choice | 145 | 3 | Yes | 0.000360 | | image / noul | 145 | 2 | Yes | 0.004804 | | images / noul | 196 | 2 | Yes | 0.003169 | | video / choice | 340 | 3 | Yes | 0.000349 | See `validation.json` for per-case records. Its elapsed times include reference work and are **not inference benchmarks**. ## Reproduce Download the exact source revision, convert, and reassemble into a fresh output directory: ```bash hf download vllm-sr/d3-mini --revision a475367de0d8133a3c1a2a0dc12303d89cfa2ab4 --local-dir upstream/d3-mini python convert.py --source upstream/d3-mini --output bundles/d3-mini-CoreAI --length 512 --precision bfloat16 python package.py d3-mini python validate_mm.py d3-mini ``` `coreai-torch==0.4.3` warns that PyTorch 2.14.0 is newer than its validated range; the supplied environment is the version used for these exports and smoke tests. `UPSTREAM_MANIFEST.json` describes original source files; `SHA256SUMS` verifies this converted bundle. ## Attribution and license Original model: vLLM Semantic Router Team, based on the Qwen model identified in `UPSTREAM_NOTICE`. Original model and this conversion are Apache-2.0; see `LICENSE` and `NOTICE`. The prompt contract and host decision formatting/media loader are included from the pinned upstream source. The upstream runtime contains an Apache-2.0 noncausal attention hook adapted from Perplexity AI and retains its original attribution. This is an independent community conversion, not an official Apple or vLLM release.