choosing-openmed-models
Skill này làm gì
Skill này giúp tìm mô hình OpenMed phù hợp cho một tác vụ lâm sàng hoặc y sinh, bằng cách dùng sổ đăng ký mô hình thay vì một danh sách cố định. Dành cho người biết tác vụ của mình nhưng chưa biết nên tải mô hình nào.
Khi nào nên dùng
- ✓Khi bạn biết tác vụ, như tìm bệnh hoặc khối u, nhưng chưa biết tên mô hình.
- ✓Khi bạn cần mô hình bảo vệ quyền riêng tư cho một ngôn ngữ cụ thể.
- ✓Khi bạn muốn lọc mô hình theo kích thước, tác vụ hoặc bậc trước khi tải một mô hình.
Liên kết skill
https://github.com/maziyarpanahi/openmed/blob/master/skills/choosing-openmed-models/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi nên dùng mô hình OpenMed nào để tìm bệnh trong các ghi chú xuất viện bằng tiếng Tây Ban Nha?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent truy vấn sổ đăng ký mô hình khi chạy để lấy danh mục và mô hình, kiểm tra nhãn và chi tiết của từng ứng viên, rồi trả về một khóa mô hình để tải.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Choosing OpenMed Models
OpenMed ships a registry of clinical and biomedical NER models grouped into 12 categories. Never hardcode a model list — query the registry at runtime so your code stays correct as models are added. This skill helps you go from "I need to find diseases in Spanish discharge notes" to a concrete model key.
When to use
- The user knows the task (find diseases / tumors / PHI) but not the model.
- You need the right PII model for a language (es, fr, de, …).
- You want to filter models by size, task, or tier before loading.
- You want to inspect a model's labels, params, and license first.
Once you have a key, hand off to loading-openmed-models to load it.
Install
pip install openmed # registry queries work without the [hf] extra
Quick start: browse categories, then pick
import openmed
# 1) The 12 categories
openmed.list_model_categories()
# ['Medical', 'Privacy', 'Anatomy', 'Hematology', 'Chemical', 'Disease',
# 'Genomics', 'Oncology', 'Species', 'Pathology', 'Pharmaceutical', 'Protein']
# 2) Models in a category -> list[ModelInfo]
for m in openmed.get_models_by_category("Disease"):
print(m.model_id, "|", m.size_category, "|", m.entity_types)
# 3) Inspect one model before loading
info = openmed.get_model_info("OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M")
print(info.display_name, info.task, info.param_count, info.license)
get_models_by_category and get_all_models return ModelInfo objects.
get_all_models() returns a dict[str, ModelInfo] keyed by registry key.
What ModelInfo tells you
Every model exposes (real attributes):
model_id # HF repo id, e.g. "OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M"
display_name # human-friendly name
category # one of the 12 categories
specialization # e.g. "disease entity detection"
entity_types # list[str] of labels the model emits, e.g. ["DISEASE", ...]
size_category # "Tiny" | "Small" | "Medium" | "Large" | "XLarge"
recommended_confidence # suggested confidence_threshold for this model
family # "NER" | "PII" | ...
task # "token-classification"
languages # e.g. ["en"], ["es"]
param_count # e.g. 278000000
license # e.g. "apache-2.0"
Use entity_types to confirm the model emits the labels you need, and
recommended_confidence as a sensible default confidence_threshold.
Disease vs Oncology vs Privacy: worked choices
import openmed
# Disease conditions in a general clinical note:
disease = openmed.get_models_by_category("Disease")
# e.g. "OpenMed/OpenMed-NER-DiseaseDetect-BigMed-278M"
# "OpenMed/OpenMed-NER-DiseaseDetect-BioClinical-108M" (smaller/faster)
# Tumors, staging, oncologic findings -> Oncology, not Disease:
onco = openmed.get_models_by_category("Oncology")
# e.g. "OpenMed/OpenMed-NER-OncologyDetect-BigMed-278M"
# PHI / PII detection -> Privacy category:
privacy = openmed.get_models_by_category("Privacy")
Rule of thumb: bigger (278M/560M) = more accurate, slower; smaller (108M, "Small"/"Tiny") = faster, edge-friendly. Start with a mid-size model and size up only if recall is short.
Pick a PII model by language
import openmed
# All PII models for Spanish -> dict[str, ModelInfo]
es_models = openmed.get_pii_models_by_language("es")
# The recommended default PII model id for a language:
default_es = openmed.get_default_pii_model("es")
print(default_es) # HF repo id, or None if unsupported
deidentify(..., lang="es") and extract_pii(..., lang="es") already select an
appropriate default — use these helpers when you need to override or to confirm
coverage. Supported de-id languages live in
openmed.SUPPORTED_LANGUAGES (en es pt fr de it nl hi te ar tr ja).
Structured search with ModelQuery
For filtering by task, language, size, or tier, use the typed search:
from openmed import search_models, ModelQuery
results = search_models(ModelQuery(
task="token-classification",
language="en",
max_params=200_000_000, # keep it small for on-device
license="apache-2.0",
))
for r in results:
print(r.repo_id, r.param_count, r.languages, r.formats)
Each result is a ModelSearchResult with fields like repo_id, family, task,
languages, tier, param_count, architecture, base_model, formats,
canonical_labels, license, and released. ModelQuery filters include
`task
Câu hỏi thường gặp
Tôi có cần nhớ tên mô hình không?
Không. Skill tra cứu chúng từ sổ đăng ký, nên luôn cập nhật khi có mô hình mới.
Tôi có thể kiểm tra mô hình trước khi tải không?
Có. Skill giúp xem nhãn, kích thước và giấy phép của mô hình trước.
Tôi cần cài gì?
Chỉ cần gói Python openmed, vì truy vấn sổ đăng ký hoạt động mà không cần runtime mô hình bổ sung.
Chi tiết
Mô tả gốc của tác giả
Discover and pick the right OpenMed model for a clinical or biomedical task, domain, or language. Use when the user asks which OpenMed model to use, wants to list model categories, find a Disease vs Oncology vs Privacy/PII model, get a PII model for a specific language, search models by size or task, or inspect a model's labels and metadata before loading. Covers list_model_categories, get_models_by_category, get_pii_models_by_language, get_default_pii_model, search_models(ModelQuery(...)), get_model_info, and the openmed models CLI. Pairs with loading-openmed-models.
repo: maziyarpanahi/openmed
Độ phổ biến
- Sao GitHub
- 5.8k
- Vị trí xếp hạng
- #14682
- Giấy phép
- Apache-2.0
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
annotating-variants
5.8kGiúp agent dự đoán tác động của biến thể di truyền, đổi tên HGVS sang vị trí bộ gen và gắn tần suất quần thể bằng công cụ chú giải miễn phí.
ask-openmed
5.8kGiúp agent chọn đúng quy trình OpenMed cho yêu cầu về văn bản lâm sàng, luôn kiểm tra quyền riêng tư trước khi có thể có dữ liệu bệnh nhân.
assembling-fhir-bundles
5.8kGói nhiều bản ghi y tế FHIR thành một Bundle giao dịch để gửi tới EHR, với các tham chiếu nội bộ được liên kết đúng.
auditing-deid-leakage
5.8kQuét văn bản lâm sàng đã khử nhận dạng để tìm định danh còn sót như SSN, số thẻ, email và ngày tháng, và chặn phát hành nếu còn sót.
Skill tương tự
pytorch-patterns
280kGiúp agent của bạn dùng PyTorch cho các mô hình học máy. Áp dụng thực hành tốt nhất để huấn luyện mô hình hiệu quả và đảm bảo kết quả có thể lặp lại.
evm-token-decimals
280kGiúp agent tránh lỗi về số thập phân khi làm việc với các mạng blockchain khác nhau. Đảm bảo giá trị token chính xác trong giao dịch và phép tính.
ito-inference
280kGiúp agent kiểm tra xem các mô hình AI đã sẵn sàng để dùng chưa. Kết nối yêu cầu tài nguyên tính toán với dịch vụ mô hình đã sẵn sàng.