Saltar al contenido
Skillpedia
Machine learning5,8 mil · #14719

pick-a-pii-model

Qué hace

Esta skill enseña a un agente a elegir un modelo que encuentra datos personales en texto y se ejecuta en un dispositivo local. Usa una lista guardada de modelos, así que la elección funciona sin conexión.

Cuándo usarla

  • ✓Cuando un equipo necesita un detector de datos personales que se ejecute en un portátil, un Mac con Apple Silicon o un teléfono.
  • ✓Cuando un proyecto tiene texto en un idioma concreto y necesita el modelo de privacidad predeterminado adecuado para él.
  • ✓Cuando un usuario está a punto de publicar un modelo de privacidad y necesita comprobar primero que detecta los identificadores directos.

Link de la skill

https://github.com/maziyarpanahi/openmed/blob/master/skills/pick-a-pii-model/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/maziyarpanahi/openmed/blob/master/skills/pick-a-pii-model/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Qué modelo sin conexión debo usar para encontrar nombres de personas en mis notas médicas en inglés en un Mac?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente lee una lista integrada de modelos y la filtra por idioma, formato de archivo y tamaño. Prefiere el modelo predeterminado y recomienda una prueba de rendimiento antes de publicar.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Pick an on-device PII model

Use the committed registry to build an offline shortlist. Treat the language default as the safety baseline, but never treat model size or format as proof of recall.

Procedure

  1. Identify the input language and script before choosing a model.
  2. Choose the runtime: pytorch for local CPU/GPU and mobile export sources, mlx-fp or mlx-8bit for Apple Silicon.
  3. Read get_default_pii_model(language) as the baseline.
  4. Filter get_pii_models_by_language(language) by runtime and device budget.
  5. Prefer the baseline when it fits; otherwise select a compatible candidate.
  6. Benchmark the candidate on direct identifiers, critical leakage, scripts, and the target quantization before shipping.

Runnable offline shortlist

This snippet reads only the bundled manifest; it does not download weights.

from openmed import get_default_pii_model, get_pii_models_by_language

LANGUAGE = "en"
TARGET_FORMAT = "mlx-fp"  # Use "pytorch" for CPU or as an export source.
MAX_PARAMETERS_M = 150

baseline_id = get_default_pii_model(LANGUAGE)
models = get_pii_models_by_language(LANGUAGE)

shortlist = [
    (key, info)
    for key, info in models.items()
    if TARGET_FORMAT in info.formats
    and info.size_mb is not None
    and info.size_mb <= MAX_PARAMETERS_M
]
shortlist.sort(
    key=lambda item: (
        item[1].model_id != baseline_id,
        item[1].size_mb,
        item[0],
    )
)

if not shortlist:
    raise RuntimeError("No compatible PII model fits the requested budget")

registry_key, selected = shortlist[0]
print(
    {
        "registry_key": registry_key,
        "model_id": selected.model_id,
        "format": TARGET_FORMAT,
        "parameters_m": selected.size_mb,
        "recommended_confidence": selected.recommended_confidence,
        "is_language_default": selected.model_id == baseline_id,
    }
)
print("Benchmark this candidate against the language default before release.")

For Android, Core ML, ONNX, or browser deployment, select a compatible pytorch source and use the target export workflow. Re-run PII recall after conversion or quantization.

Selection rules

  • Reject an unsupported language instead of silently falling back to English.
  • Prefer audited script coverage over a model's name or marketing description.
  • Treat parameter count as a rough capacity signal, not download size, latency, peak memory, or quality.
  • Measure latency and peak memory on the real target device.
  • Fail closed when conversion or quantization drops direct-identifier recall or introduces residual critical leakage.
  • Cache approved weights locally and set offline mode for steady-state use.

Repository example

Read the PII model comparison example for registry inspection and model-by-model inference.

Preguntas frecuentes

¿Descarga modelos?

No. La lista corta lee solo una lista incluida y no descarga los pesos de los modelos.

¿Un modelo más pequeño es siempre más seguro?

No. La skill indica que el tamaño o el formato del modelo no demuestran que detecte bien los datos personales.

¿Qué formatos maneja?

Menciona PyTorch para uso en CPU y GPU, y formatos MLX para Apple Silicon.

Detalles

Descripción original del autor

Select an on-device OpenMed PII model from the committed registry by language, runtime format, and size budget, then require recall validation before deployment. Use when an agent must choose a local PII detector for CPU, Apple Silicon, or a mobile export without relying on live model discovery.

repo: maziyarpanahi/openmed

Popularidad

Estrellas en GitHub
5,8 mil
Posición en el ranking
#14719
Licencia
Apache-2.0
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas