본문으로 건너뛰기
Skillpedia
머신러닝5.8k · #14719

pick-a-pii-model

하는 일

이 스킬은 에이전트에게 로컬 기기에서 실행되며 텍스트의 개인 정보를 찾는 모델을 고르는 방법을 가르칩니다. 저장된 모델 목록을 사용하므로 오프라인에서도 선택할 수 있습니다.

사용하는 경우

  • ✓노트북, Apple Silicon Mac, 휴대폰에서 실행되는 개인 데이터 탐지기가 필요할 때.
  • ✓특정 언어의 텍스트가 있는 프로젝트에 맞는 기본 개인 정보 모델이 필요할 때.
  • ✓개인 정보 모델을 출시하기 전에 직접 식별자를 먼저 잘 잡아내는지 확인해야 할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/maziyarpanahi/openmed/blob/master/skills/pick-a-pii-model/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Mac에서 영어 의료 노트의 개인 이름을 찾으려면 어떤 오프라인 모델을 써야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 내장된 모델 목록을 읽고 언어, 파일 형식, 크기로 걸러 냅니다. 기본 모델을 우선하며, 출시 전에 벤치마크를 권장합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

자주 묻는 질문

모델을 내려받나요?

아니요. 후보 목록은 번들된 목록만 읽으며 모델 가중치는 내려받지 않습니다.

작은 모델이 항상 더 안전한가요?

아니요. 모델 크기나 형식이 개인 정보를 잘 찾는다는 것을 증명하지 않는다고 스킬이 설명합니다.

어떤 형식을 다루나요?

CPU와 GPU용 PyTorch, Apple Silicon용 MLX 형식을 언급합니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
5.8k
순위
#14719
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬