Instructions to use archevel/laya-web with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Laya
How to use archevel/laya-web 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
Upload folder using huggingface_hub
Browse files- README.md +21 -0
- encoder.onnx +3 -0
- head.onnx +3 -0
- rl_agent_config.json +33 -0
- tokenizer.json +0 -0
README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: convaiinnovations/laya
|
| 4 |
+
library_name: onnx
|
| 5 |
+
tags: [onnx, onnxruntime-web, webgpu, laya]
|
| 6 |
+
---
|
| 7 |
+
# Laya for WebGPU in the browser (int8 ONNX, fp32 embeddings)
|
| 8 |
+
|
| 9 |
+
Unofficial copy of [convaiinnovations/laya](https://huggingface.co/convaiinnovations/laya) (Apache-2.0,
|
| 10 |
+
Copyright ConvAI Innovations) for onnxruntime-web. Used by https://archevel.github.io/laya/.
|
| 11 |
+
|
| 12 |
+
Made from [harshpreet931/cut-laya-onnx](https://huggingface.co/harshpreet931/cut-laya-onnx)
|
| 13 |
+
(revision `192138dfb32a0b2f73425ba70345946d415bfde1`: 8-bit weight-only MatMulNBits, split encoder/head for
|
| 14 |
+
[laya-ts](https://github.com/NandhaKishorM/laya/tree/main/laya-ts)) with one change: the token-embedding table in
|
| 15 |
+
`encoder.onnx` is widened from fp16 to fp32 (lossless). With the fp16 table, onnxruntime-web's WebGPU Gather
|
| 16 |
+
requires the `shader-f16` feature, which Chrome does not expose on e.g. Linux with NVIDIA GPUs.
|
| 17 |
+
Script: `tools/embeddings_to_fp32.py` in https://github.com/archevel/laya.
|
| 18 |
+
|
| 19 |
+
Outputs differ slightly from the PyTorch checkpoint because of the 8-bit weights.
|
| 20 |
+
|
| 21 |
+
Licensed under the Apache License, Version 2.0, like the original.
|
encoder.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:17f8032808a9b36ec51376b5c42ccb3181e6706054ee883f8259d5c058506159
|
| 3 |
+
size 596133441
|
head.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff9e93e3bd54014a8416d8076cd33ad618f4ab94fa26a0f2047c3f74d268bfbe
|
| 3 |
+
size 36942512
|
rl_agent_config.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"encoder": "answerdotai/ModernBERT-large",
|
| 3 |
+
"head_layers": 2,
|
| 4 |
+
"max_len": 512,
|
| 5 |
+
"head_max_len": 192,
|
| 6 |
+
"max_prefixes": 6,
|
| 7 |
+
"act_costs": {
|
| 8 |
+
"escalate": 0.5
|
| 9 |
+
},
|
| 10 |
+
"cost_wrong_act": 3.0,
|
| 11 |
+
"amp_dtype": "bf16",
|
| 12 |
+
"model_name": "rl-agent",
|
| 13 |
+
"temperature": [
|
| 14 |
+
1.6369030475616455,
|
| 15 |
+
1.2514300346374512,
|
| 16 |
+
1.983399510383606
|
| 17 |
+
],
|
| 18 |
+
"temperature_by_options": {
|
| 19 |
+
"choice:3-5": 1.7601518630981445,
|
| 20 |
+
"choice:6-10": 1.0000158548355103,
|
| 21 |
+
"score:3-5": 1.2514300346374512,
|
| 22 |
+
"noul:2": 1.983399510383606,
|
| 23 |
+
"choice:11+": 0.10058280825614929,
|
| 24 |
+
"choice:2": 1.9063563346862793
|
| 25 |
+
},
|
| 26 |
+
"training": {
|
| 27 |
+
"updates": 7313,
|
| 28 |
+
"epochs_completed": 1,
|
| 29 |
+
"hours": 1.96,
|
| 30 |
+
"world_size": 1,
|
| 31 |
+
"fine_tuned_from_checkpoint": true
|
| 32 |
+
}
|
| 33 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|