dashai-system-one-plugin
Plugin de modelos abiertos System One (decisiones neuronales rápidas y tipadas) para DashAI. Añade a la tarea Text Classification de DashAI modelos que clasifican texto zero-shot a partir de los nombres de las clases, con inferencia 100 % local en CPU y Apple Silicon (MPS).
| Modelo | Checkpoint | En DashAI |
|---|---|---|
| Laya (EN / multilingüe) | convaiinnovations/laya, convaiinnovations/laya-multilingual |
LayaTextClassifier, LayaMultilingualTextClassifier |
| GLiNER 2.5 Decide (EN / multilingüe) | fastino/GLiNER2.5-Decide, fastino/GLiNER2.5-multi-Decide |
GLiNERDecideTextClassifier, GLiNERMultiDecideTextClassifier |
Características
- Inferencia local. Ninguna llamada a APIs externas durante la inferencia. Internet se usa una sola vez
para descargar paquetes y pesos; con
HF_HUB_OFFLINE=1el plugin funciona sin conexión (verificado con la red denegada a nivel de proceso). - Contrato tipado unificado.
choice,scoreynoul(core/contracts.py). Laya y GLiNER implementanchoice;scoreynoulquedan en el contrato para otros backends. - Honestidad sobre las probabilidades. Solo se exponen probabilidades que el modelo calcula. GLiNER solo
da la etiqueta, así que entrega one-hot con
calibrated=False; las de Laya se marcancalibrated=Falseporque están sobreconfiadas. Ver ADR-002. - Integración con DashAI. Aparecen en el catálogo de modelos de Text Classification con formulario bilingüe (ES/EN). Probado de punta a punta con DashAI 0.10.0.
Resultados (resumen)
Zero-shot sobre MASSIVE (18 escenarios, 300 muestras por idioma, Apple M1 8 GB). Detalle, intervalos de confianza, calibración, memoria y límites en docs/benchmark-results.md.
| Modelo | Idioma | Accuracy | Latencia p50 (CPU / MPS) | ECE |
|---|---|---|---|---|
| Laya | en | 0,51 | 215 / 134 ms | 0,38 |
| Laya multilingüe | en / es | 0,53 / 0,44 | 79 / 57 ms | 0,27 / 0,35 |
| GLiNER Decide | en | 0,63 | 253 / 128 ms | n/a (solo etiqueta) |
| GLiNER multi Decide | en / es | 0,53 / 0,44 | 86 / 48 ms | n/a (solo etiqueta) |
Son modelos pequeños para decisiones rápidas, no clasificadores afinados a tu dominio. Entre el 12 % y el 23 % de las predicciones cambian al invertir el orden de las etiquetas. Mide sobre una muestra etiquetada tuya antes de automatizar decisiones.
Instalación
Requiere Python ≥ 3.10. Desde el código fuente:
git clone https://github.com/diegoolguinw/dashai_system_one_plugin.git && cd dashai_system_one_plugin
pip install -e ".[all]" # DashAI + Laya + GLiNER
# o solo lo que necesites:
pip install -e ".[laya]" # Laya
pip install -e ".[gliner]" # GLiNER
pip install -e . # contratos y backend de prueba, sin modelos
Instálalo en el mismo entorno que DashAI.
Uso en DashAI
- Inicia DashAI con el intérprete de ese entorno:
python -m DashAI --no-browser. - Sube un dataset con una columna de texto y una categórica (hay uno de ejemplo en
examples/routing_sample.csv). - Crea una sesión de Text Classification y elige uno de los modelos de la tabla.
- Ejecuta y compara métricas con el resto de modelos de DashAI.
Guía paso a paso con capturas: docs/tutorial.md.
Uso en Python
from dashai_system_one_plugin.backends import LayaBackend
from dashai_system_one_plugin.core.contracts import DecisionSpec, QuestionSpec
spec = DecisionSpec(
state="I was charged twice for order 1182. Please refund one of the charges.",
questions={
"team": QuestionSpec(
type="choice",
instructions="Which team should handle this?",
criteria={"billing": "Charges and refunds", "shipping": "Deliveries", "returns": "Exchanges"},
)
},
)
backend = LayaBackend()
backend.load("convaiinnovations/laya", device="auto") # descarga los pesos la primera vez
answer = backend.predict(spec).answers["team"]
print(answer.value, answer.probabilities, answer.calibrated)
backend.unload()
Más ejemplos: examples/real_backends.py (Laya y GLiNER) y
examples/local_inference.py (sin dependencias, con FakeBackend).
Documentación
- Tutorial · Solución de problemas
- Modelos locales y modo sin conexión · Compatibilidad
- Arquitectura · Decisiones (ADR)
- Protocolo de benchmark · Resultados
Desarrollo
pip install -e ".[dev]"
ruff check .
pytest # suite unitaria (no descarga modelos)
pytest -m integration # con checkpoints reales en la caché de Hugging Face
python benchmarks/prepare_data.py && python benchmarks/run_benchmark.py && python benchmarks/report.py
Las reglas de colaboración de los agentes del proyecto están en AGENTS.md; ver también CONTRIBUTING.md.
Limitaciones conocidas
batch_sizeno acelera: el adaptador procesa las muestras una a una.- GLiNER no devuelve probabilidades, solo la etiqueta.
- Solo se ha probado en macOS (Apple M1, CPU y MPS); CUDA no se ha verificado.
- Los modelos en español rinden claramente peor que en inglés en el benchmark.
Licencia
El código se distribuye bajo la licencia MIT. Los pesos de los modelos tienen su propia licencia (todos Apache-2.0 al momento de escribir esto).
Metadata
Release files for dashai-system-one-plugin 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dashai_system_one_plugin-0.1.0.tar.gz | 67.2 kB | With provenance | Details for dashai_system_one_plugin-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dashai_system_one_plugin-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for dashai_system_one_plugin-0.1.0-py3-none-any.whl |
Total release size: 92.3 kB
Release files / dashai_system_one_plugin-0.1.0.tar.gz
| Download URL | dashai_system_one_plugin-0.1.0.tar.gz |
|---|---|
| Size | 67.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
60833642068880bee210b26e8f511c6069883533809bef9f24ec375805f825a5
|
|
BLAKE2b-256 checksum How to use checksums |
c1fa27011179730ada1212d0ffac7998487986341f9eee33df8686e21c29c80d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / dashai_system_one_plugin-0.1.0-py3-none-any.whl
| Download URL | dashai_system_one_plugin-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ab2c232f9f56da552250e29ef25c124a3ff7436001d6c21dbec49d3e04550857
|
|
BLAKE2b-256 checksum How to use checksums |
399b3997f3ce932c6f6e88962caa599078e1412bdfe25e9cf1b34a5e34a4c26b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for dashai-system-one-plugin 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for dashai_system_one_plugin-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.