model-runtimes-mobile
Operate OpenMed model discovery, local/offline caches, backend selection, runtime/export probes, and mobile/browser parity without implicit model invocation.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- model-runtimes-mobile
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate OpenMed model discovery, local/offline caches, backend selection, runtime/export probes, and mobile/browser parity without implicit model invocation.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/backend-compatibility.md10.2 KB
- 参考文档references/model-runtime-workflows.md13.6 KB
- 参考文档references/troubleshooting.md10.0 KB
- 脚本scripts/backend_capability_probe.py21.3 KB
03 SKILL.md 正文
OpenMed model runtimes and mobile/browser routing
Use this sub-skill when a task asks how to choose, cache, inspect, export, or run OpenMed models across Python, Apple, Android, or browser runtimes. Keep the workflow local-first: never download, load, or invoke a model unless the downstream user explicitly asks for that action and the model license/data terms are acceptable.
Route map
- Model discovery and selection: use
openmed.core.model_registry, the top-levelopenmed.list_models(...), and manifest metadata summarized inreferences/model-runtime-workflows.md. - Offline/Hugging Face cache planning: use
openmed.core.hf_hubhelpers andOPENMED_OFFLINE/OpenMedConfig(local_only=True)guidance inreferences/model-runtime-workflows.md. - Python pipeline loading: use
openmed.core.models.ModelLoader,OpenMedConfig(backend=...), and cache-release methods fromreferences/model-runtime-workflows.md. - Backend capability checks: run the bundled
scripts/backend_capability_probe.pyand interpret the matrix inreferences/backend-compatibility.md. - Runtime/export choices: choose among Hugging Face/Torch, MLX/MLX-LM, ONNX Runtime, OpenVINO, CoreML, Android ONNX Runtime Mobile, Swift OpenMedKit, or browser WebGPU/WASM using
references/backend-compatibility.md. - Failure diagnosis: use
references/troubleshooting.mdfor offline cache misses, missing extras, unsupported hardware, tokenizer/span drift, quantized recall deltas, artifact layout problems, and platform toolchain issues.
Boundaries
This sub-skill covers runtime and artifact operations only. Route clinical task design and high-level NER/grounding behavior to clinical-extraction-grounding; route PHI/PII policy semantics, masking, date shifting, and surrogate handling to deidentification-privacy; route REST/MCP/service deployment contracts to interoperability-serving.
Use synthetic text only in examples and probes. Do not log raw clinical text, token strings from real notes, secrets, Hub tokens, local cache contents containing sensitive filenames, or model outputs from real PHI.
Minimal safe first step
From this sub-skill directory, probe capabilities without downloads or model loads:
python scripts/backend_capability_probe.py --json
The probe reports import availability, optional extras, and hardware/toolchain signals. Treat unavailable optional backends as planning constraints, not as package failures, unless the user's requested target requires that backend.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).