Text Classification
Transformers
Safetensors
Chinese
spam-detection
advertising-detection
ad-classification
chinese
modernbert
mmbert
multi-task
four-head
Instructions to use x6nux/laya-ad with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use x6nux/laya-ad with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="x6nux/laya-ad")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("x6nux/laya-ad", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 745 Bytes
71dabc7 0cd599e 71dabc7 0cd599e 71dabc7 | 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 | services:
app:
image: x6nux/laya-server:${LAYA_IMAGE_TAG:-latest}
environment:
- LAYA_ADMIN_USERNAME
- LAYA_ADMIN_PASSWORD
- LAYA_CPU_THREADS
- LAYA_AD_BATCH
- LAYA_AD_BATCH_WINDOW_MS
# 模型从 HF 下载(镜像不带权重)
- LAYA_HF_ENDPOINT=${LAYA_HF_ENDPOINT:-https://huggingface.co}
- LAYA_HF_REPO=${LAYA_HF_REPO:-x6nux/laya-ad}
- LAYA_MODEL_VERSION=${LAYA_MODEL_VERSION:-v2.2}
- LAYA_MODEL_PRECISION=${LAYA_MODEL_PRECISION:-fp8}
- LAYA_PRELOAD=${LAYA_PRELOAD:-}
- LAYA_AUTO_DOWNLOAD=${LAYA_AUTO_DOWNLOAD:-1}
ports:
- "127.0.0.1:8080:8080"
volumes:
- laya-data:/data
restart: unless-stopped
init: true
volumes:
laya-data:
|