File size: 3,697 Bytes
ebef316 f7f4846 ebef316 f7f4846 ebef316 b74a0b6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | ---
license: apache-2.0
base_model: mukaddamzaid/amos-1-small
tags: [coreai, core-ai, apple, aimodel, decisions, vision]
---
# amos-1-small — Apple Core AI
Independent AMOS-1 conversion with its checkpoint's **bidirectional full attention** preserved. Text backbone, 255-code readout, vision tower, span head, region head and trained box head execute through Core AI. Original prompt formatting, temperatures and quote decoding are retained. This is a decision model, not a text generator.
## Use
Requires macOS 27 and the Core AI Python runtime. Tested with `coreai-torch==0.4.3`, PyTorch 2.14.0, Transformers 5.19 development, NumPy and Pillow. Exact dependencies are in `requirements.txt`. The converter warns that this PyTorch version exceeds its validated range. Host preprocessing/decoding uses PyTorch tensors; it loads no PyTorch neural weights.
```python
import asyncio
from coreai_decoder import AmosDecoder
async def main():
m = await AmosDecoder.load(".")
print(await m.request({
"state": "Please refund the duplicate charge.",
"questions": {"refund": {
"type": "noul", "instructions": "Is a refund requested?"
}}
}))
asyncio.run(main())
```
`predict(state, questions, images=())` takes upstream internal questions (`text`, `options`) and PIL images, including image options. `request()` takes base64 images in the original AMOS format.
## Verified scope and limits
Batch one, **512 combined tokens**, 224×224 images (49 merged tokens), float32 backbone/vision weights with FP32 readout and heads. Requests over capacity raise an error. Original longer contexts, variable image resolution, wide-choice two-pass routing, rotations, thinking, hosted server and explanation endpoints are not implemented. Up to 255 option codes are available subject to token capacity. No iPhone, Neural Engine placement, throughput or upstream benchmark accuracy claim has been verified. Core AI uses default specialization.
Nine smoke/parity cases cover all six typed question kinds, quote extraction, Unicode, 24 options, synthetic state images and image options. Tested discrete decisions matched upstream. Maximum measured probability/box-coordinate error: **0.00001019**. Full results are in `validation.json`; these smoke cases do not establish benchmark accuracy. `runtime-smoke.json` verifies inference with PyTorch neural execution disabled.
The primary parity reference executes the pinned checkpoint in FP32. Compared with the original BF16 serving path in 8 additional cases, maximum probability/box error was 0.034142. Region confidence can change discontinuously when a box crosses a grid boundary. See `bf16-comparison.json`; this is not bit-identical BF16 serving.
## Attribution and reproducibility
Original model and serving code: Zaid Mukaddam, [mukaddamzaid/amos-1-small](https://huggingface.co/mukaddamzaid/amos-1-small). Weights derive from Qwen3.5. Apache-2.0 applies; see `LICENSE` and `SOURCE.json` for the pinned AMOS revision and source hashes. Conversion adds no restrictions. Upstream serving sources are included under `serve/`.
Download the pinned source and reproduce from a directory holding these scripts:
```bash
hf download mukaddamzaid/amos-1-small --revision 09ba3e9d8f506cfcb96ea130845d5d76d9d92028 --local-dir upstream/amos-1-small
python convert_decoder.py amos-1-small --precision float32
python validate_decoder.py amos-1-small --mode reference
python validate_decoder.py amos-1-small --mode coreai
python smoke_decoder.py amos-1-small
```
The two validation processes keep the reference model and Core AI runtime out of memory at the same time. Release integrity is recorded in `SHA256SUMS`.
|