Run this model with HF Jobs

Run DeathSurfing/clauseguard-laya-base-onnx on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/DeathSurfing/clauseguard-laya-base-onnx. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/DeathSurfing/clauseguard-laya-base-onnx on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

ClauseGuard Laya base (ONNX)

ONNX export of the multilingual Laya base checkpoint, used by ClauseGuard for local contract review. This is the base model. It is not legal-tuned, and its risk output is not a statement of Indian law.

Root layout (fp32, server runtime)

model.onnx
model.onnx.data
rl_agent_config.json
tokenizer/
  tokenizer.json
  tokenizer_config.json

model.onnx.data holds the fp32 weights for the fused export.

Browser variants

All variants keep the same inputs and outputs. The tokenizer and rl_agent_config.json are shared with the root model.

Path Size Format
fp16/model.onnx 646 MB fp16 weights, fp32 inputs/outputs
int8/model.onnx 335 MB dynamic int8 weights
int4/model.onnx 186 MB 4-bit MatMulNBits + GatherBlockQuantized

Measured in Chrome with ONNX Runtime Web 1.31.1 WebGPU on an RTX 4080 SUPER, six markers, median of three runs after warmup:

Variant 128 tokens 512 tokens 1024 tokens Verdict
fp32 29 ms 50 ms 87 ms baseline
fp16 41 ms 58 ms 77 ms best fidelity
int4 48 ms 127 ms 264 ms best size/speed
int8 674 ms 2.0 s 4.2 s do not use on WebGPU

fp16 matches fp32 findings exactly on the two-clause fixture. int4 matched 14/16 decisions, 14/16 risk levels, and 16/16 review flags. int8 matched 14/16 decisions, 10/16 risk levels, and 8/16 review flags, and its MatMulInteger nodes fell back to the browser CPU.

Use fp16 when fidelity matters and int4 when download size matters. Keep int8 only for CPU or WASM inference.

Use

hf download DeathSurfing/clauseguard-laya-base-onnx --local-dir model

For the server, set MODEL_DIR to the downloaded root directory and MODEL_CHECKPOINT=multilingual. For a browser build, load int4/model.onnx or fp16/model.onnx with ONNX Runtime Web and cache it after the first download.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support