loading-openmed-models

Loads OpenMed NER models for reuse in offline clinical text processing workflows.

5.0k|615|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/maziyarpanahi/openmed --skill loading-openmed-models
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loading-openmed-models
Source: https://github.com/maziyarpanahi/openmed/tree/main/skills/loading-openmed-models
Command: npx skills add https://github.com/maziyarpanahi/openmed --skill loading-openmed-models

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill simplifies loading OpenMed clinical and biomedical NER models while avoiding repeated model initialization, uncontrolled cache locations, and unnecessary network access.

Core Features & Use Cases

  • Flexible Model Selection: Load models by registry key, full Hugging Face identifier, or local directory.
  • Efficient Reuse: Reuse a ModelLoader to keep models, tokenizers, and pipelines in memory across repeated inference calls.
  • Offline and Deployment Control: Configure cache directories, devices, Hugging Face organization settings, offline operation, sequence-length inspection, and memory cleanup.
  • Use Case: Prepare a batch clinical text-processing service that downloads a model once, reuses it for many notes, and then runs entirely within an air-gapped environment.

Quick Start

Use the loading-openmed-models skill to load an OpenMed disease detection model once, reuse it across multiple clinical notes, and configure it for offline CPU inference.

Frequently Asked Questions about loading-openmed-models

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load Hugging Face clinical NER models for offline inference?

You can load Hugging Face clinical NER models for offline inference by using a ModelLoader to cache pipelines locally, enabling offline environment controls to prevent network access, and reusing the loaded models across repeated inference calls.

Can I run biomedical NER models in an air-gapped deployment?

Running biomedical NER models in an air-gapped deployment is supported by pre-loading models into local directories, configuring cache locations, and setting offline operation flags to execute fully without external network connectivity.

What is the best way to manage model memory lifecycle during batch clinical text processing?

Managing model memory lifecycle during batch clinical text processing is best handled by reusing a single ModelLoader instance across multiple notes, inspecting maximum sequence lengths, and explicitly unloading models from memory when inference is complete.

How do I configure OpenMed settings for local model loading?

Configuring OpenMed settings for local model loading involves specifying registry keys, full Hugging Face identifiers, or local directory paths, alongside setting configurable cache directories and device selection parameters for CPU inference.

Why does repeated model initialization slow down Hugging Face inference and how to fix it?

Repeated model initialization slows down Hugging Face inference by reloading tokenizers and pipelines into memory for every call. You fix this by reusing a ModelLoader to keep models in memory across repeated inference requests.