Qwen3-Embedding-0.6B for Core AI: asset, tokenizer files, config
Browse files
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
embed-qwen3-0.6b-float32.aimodel/main.mlirb filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3-Embedding-0.6B
|
| 4 |
+
tags:
|
| 5 |
+
- text-embeddings
|
| 6 |
+
- sentence-similarity
|
| 7 |
+
- retrieval
|
| 8 |
+
- core-ai
|
| 9 |
+
- apple-silicon
|
| 10 |
+
- macos
|
| 11 |
+
library_name: swift-text-embedder
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# embed-qwen3 — Qwen3-Embedding-0.6B for Core AI (macOS 27)
|
| 15 |
+
|
| 16 |
+
Alibaba's [Qwen3-Embedding-0.6B](https://huggingface.co/Qwen/Qwen3-Embedding-0.6B) (Apache 2.0)
|
| 17 |
+
exported to an Apple Core AI `.aimodel` for on-device text embeddings and semantic search. Read by
|
| 18 |
+
[swift-text-embedder](https://github.com/arraypress/swift-text-embedder) and the
|
| 19 |
+
[`embed`](https://github.com/arraypress/swift-embed-cli) command-line tool.
|
| 20 |
+
|
| 21 |
+
## Files
|
| 22 |
+
|
| 23 |
+
| Path | What |
|
| 24 |
+
|---|---|
|
| 25 |
+
| `embed-qwen3-0.6b-float32.aimodel/` | Entry points `t128` and `t512`: token ids `[1, L]` + attention mask `[1, L]` (int32, LEFT-padded with `<|endoftext|>` = 151643) → the last position's hidden state `[1, 1024]`. Float32, 2.4 GB. |
|
| 26 |
+
| `embed-support/vocab.json`, `merges.txt` | The checkpoint's own Qwen2 byte-level BPE files. |
|
| 27 |
+
| `embed-support/config.json` | The pad / end-of-text id, the exported lengths, the dimension. |
|
| 28 |
+
|
| 29 |
+
The host tokenises (NFC, Qwen2's pre-tokeniser, end-of-text appended), pads on the left, picks the
|
| 30 |
+
shortest length that holds the text, and L2-normalises the output. Queries are embedded as
|
| 31 |
+
`Instruct: <task>\nQuery: <text>`, documents as they are, per the model card.
|
| 32 |
+
|
| 33 |
+
## Fidelity
|
| 34 |
+
|
| 35 |
+
Against `transformers` 5.17 on the same inputs: tokenizer ids and masks identical over 13 texts at
|
| 36 |
+
both lengths (Unicode, code, newlines included); embeddings 125–126 dB PSNR, cosine ≥ 0.999999.
|
| 37 |
+
The fixed-length left padding changes an embedding by at most 3e-7 against the unpadded model.
|
| 38 |
+
|
| 39 |
+
## Use
|
| 40 |
+
|
| 41 |
+
```sh
|
| 42 |
+
hf download arraypress/embed-qwen3 --local-dir models
|
| 43 |
+
embed model install models
|
| 44 |
+
embed index ~/Notes && embed search "how do I rotate the API key"
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Requires macOS 27 (Core AI) on Apple silicon. Converted with coreai-torch 0.4.2 / torch 2.13.
|
embed-qwen3-0.6b-float32.aimodel/main.hash
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
�)X �Q�%��u�`�����b��^<?e\~�
|
embed-qwen3-0.6b-float32.aimodel/main.mlirb
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f2852958098d519625fcb70175956080aab195f362e418bb5e3c3f655c017efe
|
| 3 |
+
size 2384530505
|
embed-qwen3-0.6b-float32.aimodel/metadata.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"assetVersion" : "2.0",
|
| 3 |
+
"license" : "Apache-2.0",
|
| 4 |
+
"author" : "Alibaba Qwen team — Qwen3-Embedding-0.6B; Core AI export by TextEmbedder",
|
| 5 |
+
"producer" : "coreai-core 1.0.0b2",
|
| 6 |
+
"description" : "Qwen3-Embedding-0.6B: entry points t128, t512 take left-padded token ids [1,L] + mask [1,L] (int32, pad 151643) and return the last position's hidden state [1,1024]; normalise in the host. Queries: 'Instruct: <task>\\nQuery: <text>'.",
|
| 7 |
+
"creationDate" : "20260924T123107Z"
|
| 8 |
+
}
|
embed-support/config.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "Qwen/Qwen3-Embedding-0.6B",
|
| 3 |
+
"lengths": [
|
| 4 |
+
128,
|
| 5 |
+
512
|
| 6 |
+
],
|
| 7 |
+
"pad": 151643,
|
| 8 |
+
"dimension": 1024
|
| 9 |
+
}
|
embed-support/merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
embed-support/vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|