laya-web / README.md
archevel's picture
Upload folder using huggingface_hub
da1f557 verified
|
Raw History Blame Contribute Delete
1.13 kB
---
license: apache-2.0
base_model: convaiinnovations/laya
library_name: onnx
tags: [onnx, onnxruntime-web, webgpu, laya]
---
# Laya for WebGPU in the browser (int8 ONNX, fp32 embeddings)
Unofficial copy of [convaiinnovations/laya](https://huggingface.co/convaiinnovations/laya) (Apache-2.0,
Copyright ConvAI Innovations) for onnxruntime-web. Used by https://archevel.github.io/laya/.
Made from [harshpreet931/cut-laya-onnx](https://huggingface.co/harshpreet931/cut-laya-onnx)
(revision `192138dfb32a0b2f73425ba70345946d415bfde1`: 8-bit weight-only MatMulNBits, split encoder/head for
[laya-ts](https://github.com/NandhaKishorM/laya/tree/main/laya-ts)) with one change: the token-embedding table in
`encoder.onnx` is widened from fp16 to fp32 (lossless). With the fp16 table, onnxruntime-web's WebGPU Gather
requires the `shader-f16` feature, which Chrome does not expose on e.g. Linux with NVIDIA GPUs.
Script: `tools/embeddings_to_fp32.py` in https://github.com/archevel/laya.
Outputs differ slightly from the PyTorch checkpoint because of the 8-bit weights.
Licensed under the Apache License, Version 2.0, like the original.