Run Laya on your machine. Classify tickets in Portuguese, check the signals, and send them for review.

A fork of the official Laya with a small, verifiable application. The model suggests; a person confirms.
Department, urgency, threat of cancellation, and refund request using the multilingual checkpoint.
Choose a browser to try it out, or use JSON to integrate it into a local process.
16 synthetic tickets, metrics, and predictions recorded. Errors are part of the deliverable, too.
The input is validated before inference. The application rejects text that would lose tokens and keeps human review in place for every response.
Python 3.10+ recommended (tested with 3.12), Git, space for weights, and internet access for the first download. GPU is optional; CPU is the default.
Use a virtual environment. If you choose GPU, install a PyTorch version compatible with your hardware.
# command
python3 --version
git --versionCommands for Linux/macOS. On Windows, activate the environment with .venv\Scripts\activate. The published site is the guide; inference happens on the local server.
The clone preserves the official SDK and adds the practical folder.
git clone https://github.com/inematds/laya.git cd laya python3 -m venv .venv source .venv/bin/activate python3 -m pip install -e . -r practical/requirements.txt
Downloads and loads multilingual only. The first run takes longer.
python3 -m practical download
The output is JSON. No external action is performed.
python3 -m practical triage \ --message "Fui cobrado duas vezes. Quero o reembolso."
Open http://127.0.0.1:8765 in a browser on the same machine. Port in use? Use --port 8875.
python3 -m practical serve --port 8765 # GPU opcional: --device vem antes do subcomando python3 -m practical --device cuda serve --port 8875
HTTP 422 indicates invalid input; 503 indicates the model is unavailable. Use the prediction only after HTTP 200.
curl -X POST http://127.0.0.1:8765/api/triage \
-H "Content-Type: application/json" \
-d '{"message":"Quero contratar o plano empresarial."}'Compare the output with the expected labels and preserve the test conditions.
python3 -m practical --device cuda evaluate --output avaliacao.json python3 -m unittest discover -s tests/practical -v
NVIDIA GB10, multilingual checkpoint, four questions per message. Small educational sample: this is not a production validation.
81.25% accuracy, versus a 25% majority-class baseline. Multiclass Brier score: 0.30835; ECE across ten bins: 0.17988.
A purchase of 20 licenses went to finance. A weather forecast and a message sent by mistake went to technical support.
The result shows why the policy keeps human review in place, even for confident predictions.
The choice confidence in the SDK measures how concentrated the distribution is; it does not guarantee a correct answer. Churn is an explicit threat in the text for this schema. None of these outputs authorize a refund or cancellation.
The next steps depend on your own data and operational criteria. No automatic training is included in this release.