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
Download code/laya-server/compose.yaml from x6nux/laya-ad: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/compose.yaml
- Command line
-
hf download hf://x6nux/laya-ad/code/laya-server/compose.yaml
-
curl -L -o compose.yaml https://huggingface.co/x6nux/laya-ad/resolve/main/code/laya-server/compose.yaml
745 Bytes
| 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: | |