Text Classification
Transformers
Safetensors
Laya
Chinese
system-one
calibrated-decisions
rlcd
chinese
classification
routing
scoring
guardrails
non-autoregressive
commercial-license-required
Instructions to use ZichenAI/layazh-zh with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZichenAI/layazh-zh with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="ZichenAI/layazh-zh")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZichenAI/layazh-zh", device_map="auto") - Laya
How to use ZichenAI/layazh-zh 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
File size: 2,060 Bytes
f69ec12 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | {
"encoder": "hfl/chinese-roberta-wwm-ext-large",
"encoder_type": "bert",
"head_layers": 2,
"max_len": 512,
"head_max_len": 192,
"max_prefixes": 6,
"act_costs": {
"escalate": 0.5
},
"cost_wrong_act": 3.0,
"amp_dtype": "bf16",
"train_dtype": "fp32",
"temperature": [
0.467223,
1.034508,
0.970277
],
"temperature_by_options": {
"choice:11+": 0.466635,
"choice:2": 0.253066,
"choice:3-5": 0.545042,
"noul:2": 0.970277,
"score:3-5": 1.034508
},
"model_name": "layazh",
"training": {
"recipe": {
"head_lr": 0.0003,
"encoder_lr": 2e-05,
"warmup_frac": 0.06,
"scheduler": "linear warmup 6% + cosine",
"unfrozen_encoder_layers": 8,
"option_order_augmentation": true,
"grad_checkpointing": true,
"amp": "fp32 (sm_52/Maxwell has no bf16)",
"batch_tokens": 4096,
"optimizer": "AdamW",
"grad_clip": 1.0
},
"effective_steps": "~1250 (stopped near plateau; not the full planned schedule)",
"probe_best": 0.7991,
"probe_acc": {
"choice": 0.7243,
"score": 0.7744,
"noul": 0.9638,
"ALL": 0.7991
},
"hardware": "GTX Titan X (Maxwell, sm_52, 12GB), torch 2.7.1+cu128"
},
"calibration": {
"scheme": "bucket",
"report_ece": 0.2546653607969531,
"fit_n": 3122,
"report_n": 3122,
"by_qtype": [
0.467223,
1.034508,
0.970277
],
"by_bucket": {
"choice:11+": 0.466635,
"choice:2": 0.253066,
"choice:3-5": 0.545042,
"noul:2": 0.970277,
"score:3-5": 1.034508
},
"all_schemes_report_ece": {
"identity": 0.3511506951291145,
"qtype": 0.26843774177473434,
"bucket": 0.2546653607969531
}
},
"evaluation": {
"full_eval_n": 6244,
"full_eval_acc": 0.6951,
"baselines": {
"random": 0.2959,
"majority_class": 0.4734
},
"upstream_laya_multilingual_acc": 0.4783,
"ab_n": 1200
}
} |