Instructions to use kloodia/laya-executorch with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use kloodia/laya-executorch with Laya:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Laya multilingual ExecuTorch gate (MLX INT4 iOS + XNNPACK 8DA4W Android, max_len=2048)
Browse files- .gitattributes +4 -0
- README.md +30 -0
- android/laya_gate_xnnpack_8da4w.pte +3 -0
- android/tokenizer.json +3 -0
- android/tokenizer_config.json +22 -0
- export_meta.json +15 -0
- ios/laya_gate_mlx_int4.pte +3 -0
- ios/tokenizer.json +3 -0
- ios/tokenizer_config.json +22 -0
- meta.json +25 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ 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 |
+
android/laya_gate_xnnpack_8da4w.pte filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
android/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
ios/laya_gate_mlx_int4.pte filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
ios/tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- multilingual
|
| 5 |
+
tags:
|
| 6 |
+
- executorch
|
| 7 |
+
- decision-model
|
| 8 |
+
- laya
|
| 9 |
+
- localia
|
| 10 |
+
base_model: convaiinnovations/laya
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Laya multilingual ExecuTorch (Localia gate)
|
| 14 |
+
|
| 15 |
+
Exported from [`convaiinnovations/laya`](https://huggingface.co/convaiinnovations/laya) (`subfolder=multilingual`, mmBERT).
|
| 16 |
+
|
| 17 |
+
| Path | Backend | Quant | Size (approx) |
|
| 18 |
+
| --- | --- | --- | --- |
|
| 19 |
+
| `ios/laya_gate_mlx_int4.pte` | MLX | INT4 linear + INT8 embedding | ~280 MB |
|
| 20 |
+
| `android/laya_gate_xnnpack_8da4w.pte` | XNNPACK | 8DA4W linears (embeddings fp32) | ~830 MB |
|
| 21 |
+
| `*/tokenizer.json` | — | mmBERT multilingual tokenizer | ~33 MB |
|
| 22 |
+
|
| 23 |
+
## I/O
|
| 24 |
+
|
| 25 |
+
- Inputs: `input_ids[1,2048]`, `attention_mask[1,2048]`, `marker_pos[1,4]`, `marker_mask[1,4]`, `qtype[1]` (`0=choice`, `1=score`, `2=noul`)
|
| 26 |
+
- Output: `logits[1,4]` (unused options masked ≈ -1e4)
|
| 27 |
+
|
| 28 |
+
## License
|
| 29 |
+
|
| 30 |
+
Apache-2.0 (same as upstream Convai Innovations Laya).
|
android/laya_gate_xnnpack_8da4w.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:31893b13e7f7c19ec4ae0e697ce3eb2d19a5d199be777c26201cce374f0eb61f
|
| 3 |
+
size 869522180
|
android/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
|
| 3 |
+
size 34363188
|
android/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<bos>",
|
| 3 |
+
"clean_up_tokenization_spaces": false,
|
| 4 |
+
"cls_token": "<bos>",
|
| 5 |
+
"eos_token": "<eos>",
|
| 6 |
+
"extra_special_tokens": {
|
| 7 |
+
"extra_0": "<start_of_turn>",
|
| 8 |
+
"extra_1": "<end_of_turn>"
|
| 9 |
+
},
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_input_names": [
|
| 12 |
+
"input_ids",
|
| 13 |
+
"attention_mask"
|
| 14 |
+
],
|
| 15 |
+
"model_max_length": 8192,
|
| 16 |
+
"pad_token": "<pad>",
|
| 17 |
+
"padding_side": "right",
|
| 18 |
+
"sep_token": "<eos>",
|
| 19 |
+
"spaces_between_special_tokens": false,
|
| 20 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
export_meta.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "convaiinnovations/laya/multilingual",
|
| 3 |
+
"max_len": 2048,
|
| 4 |
+
"max_opts": 4,
|
| 5 |
+
"android_ptes": [
|
| 6 |
+
"laya_gate_xnnpack_8da4w.pte"
|
| 7 |
+
],
|
| 8 |
+
"ios_ptes": [
|
| 9 |
+
"laya_gate_mlx_int4.pte"
|
| 10 |
+
],
|
| 11 |
+
"ok": {
|
| 12 |
+
"xnnpack_8da4w": true,
|
| 13 |
+
"mlx_int4": true
|
| 14 |
+
}
|
| 15 |
+
}
|
ios/laya_gate_mlx_int4.pte
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d3bd07f708d408b6fe42236a47b8ab5d905ff3f59f0fb6220fed83960c987de
|
| 3 |
+
size 293247360
|
ios/tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:609d8f4c067cd3950f88594c5a802616cea245823836ef5848ee4fc40aab5b6f
|
| 3 |
+
size 34363188
|
ios/tokenizer_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<bos>",
|
| 3 |
+
"clean_up_tokenization_spaces": false,
|
| 4 |
+
"cls_token": "<bos>",
|
| 5 |
+
"eos_token": "<eos>",
|
| 6 |
+
"extra_special_tokens": {
|
| 7 |
+
"extra_0": "<start_of_turn>",
|
| 8 |
+
"extra_1": "<end_of_turn>"
|
| 9 |
+
},
|
| 10 |
+
"mask_token": "<mask>",
|
| 11 |
+
"model_input_names": [
|
| 12 |
+
"input_ids",
|
| 13 |
+
"attention_mask"
|
| 14 |
+
],
|
| 15 |
+
"model_max_length": 8192,
|
| 16 |
+
"pad_token": "<pad>",
|
| 17 |
+
"padding_side": "right",
|
| 18 |
+
"sep_token": "<eos>",
|
| 19 |
+
"spaces_between_special_tokens": false,
|
| 20 |
+
"tokenizer_class": "PreTrainedTokenizerFast",
|
| 21 |
+
"unk_token": "<unk>"
|
| 22 |
+
}
|
meta.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"source": "convaiinnovations/laya/multilingual",
|
| 3 |
+
"role": "localia-command-gate",
|
| 4 |
+
"modalities": [
|
| 5 |
+
"text"
|
| 6 |
+
],
|
| 7 |
+
"languages": "100+",
|
| 8 |
+
"quant": {
|
| 9 |
+
"ios": "mlx weight-only int4 group32 + embedding int8",
|
| 10 |
+
"android": "xnnpack 8da4w (int8 dynamic act + int4 weights group32)"
|
| 11 |
+
},
|
| 12 |
+
"max_len": 2048,
|
| 13 |
+
"max_opts": 4,
|
| 14 |
+
"android": "android/laya_gate_xnnpack_8da4w.pte",
|
| 15 |
+
"ios": "ios/laya_gate_mlx_int4.pte",
|
| 16 |
+
"inputs": [
|
| 17 |
+
"input_ids[1,2048] long",
|
| 18 |
+
"attention_mask[1,2048] long",
|
| 19 |
+
"marker_pos[1,4] long",
|
| 20 |
+
"marker_mask[1,4] bool",
|
| 21 |
+
"qtype[1] long (0=choice, 1=score, 2=noul)"
|
| 22 |
+
],
|
| 23 |
+
"output": "logits[1,4] float",
|
| 24 |
+
"license": "Apache-2.0"
|
| 25 |
+
}
|