Logo Optimize Runtime

Optimize Runtime

Cộng đồng
Scripter36
optimize-runtime

Iteratively optimize a specified workload by choosing suitable metrics and diagnostic tools, making causal code changes, remeasuring and validating outputs until no actionable axes remain. Use for sustained CPU, GPU, renderer, training, I/O or memory optimization; use a profiling skill for a single capture and tune-hyperparameters for learning-parameter search.

Tổng quan

Nhà phát hànhScripter36
Kho mãInstantMimic
Tên kỹ năngoptimize-runtime
Sao
20
Bản fork
1
Tệp đi kèm
4
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Scripter36 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Optimize Runtime trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/Scripter36/InstantMimic/tree/main/plugins/instantmimic-workflows/skills/optimize-runtime
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Scripter36/InstantMimic.git /tmp/InstantMimic
mkdir -p .claude/skills
cp -r /tmp/InstantMimic/plugins/instantmimic-workflows/skills/optimize-runtime .claude/skills/optimize-runtime
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Optimize Runtime trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Optimize Runtime ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Optimize Runtime không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Optimize Runtime

Own the complete loop: measure/diagnose → explain → change → remeasure → validate → reassess. Continue while evidence supports another actionable axis. One speedup, a successful capture or a target number is not completion. kFPS, Nsight, CUDA and learning checks are workload-specific choices, not prerequisites.

Choose the objective and tools

Read applicable repository instructions, the user's goal and actual runtime consumers. Reuse existing authorization. Record a compact measurement contract:

  • representative input/output and work volume, such as scenes, image resolution, data size, requests, frames or simulation rollouts;
  • source snapshot (commit plus dirty diff when needed), relevant hardware/software, execution settings, cache/load state and output destination;
  • primary metric with units, direction, aggregation and measurement boundary; constraints on output quality, latency tails, memory or other tradeoffs;
  • repeat/warmup plan, effect resolution derived from variation/user needs, allowed numerical/visual differences and required behavioral regressions;
  • allowed files/layers, compatibility/maintainability requirements, inherited budgets and material authority.

Infer a reasonable objective from the task and evidence, state it and ask only when a material tradeoff remains unresolved. Choose tools to answer the current causal question. Read Measurement and Tools for metric selection, CPU/native/Python, graphics, CUDA, memory and I/O routes. Use a small representative probe before an expensive capture. Missing one tool is not a blocker when another supplies the needed evidence. Do not install or run an irrelevant GPU profiler for CPU-only work.

Preserve the requested outputs, quality and executed work. Lowering resolution, samples, fidelity, precision or workload size is a tradeoff requiring explicit scope, not an implementation speedup. Preserve required runtime modes and behavior; apply graph, simulator or learning constraints only to paths that use them. A simulator-internals restriction still permits common orchestration and official-API reuse within that restriction.

Bound each measurement, diagnosis and regression run. Honor user/parent limits; do not invent an overall cycle, time or no-improvement cutoff in place of the exhaustion request. Ask only for missing material authority. Limits or unavailable necessary evidence yield a resumable incomplete result, not exhaustion.

Keep baselines comparable and observe relevant interference: CPU load, storage, GPU occupancy, thermal/clock changes or background jobs. Exclude invalid samples with documented reasons, while retaining real tail/jank behavior; do not terminate others. Read Optional Local Workflows before GPU work. For training experiments also use Experiment Protocol; its logger/seed and playback conventions do not impose training work on a renderer or CPU task.

Persistent evidence

Use one ignored task workspace following repository policy. Keep canonical outputs in their normal location (training runs in logs/ when applicable), reusable caches outside the task directory, and record:

  • README.md: contract, chosen tools/reasons, accepted result, next action, resume;
  • baseline.json: immutable starting config, commands and raw metric samples;
  • axes.json: discovered axes, status, evidence, hypotheses and closure reason;
  • cycles/NNN/: source diff, config/tool fingerprints, raw diagnostic/measurement/ validation evidence, decision and accepted revision for each attempt.

When invoked by a parent workflow, inherit its frozen scope/budgets and reuse its workspace. Route baseline/axes/cycles to the supplied artifact prefix; keep the parent's contract/state authoritative. Return status and raw evidence paths without advancing parent phases, changing its gates or replacing independent review. Do not create a second approval gate or state machine.

These are agent artifacts, not an application API or new controller. Use relative artifact references and omit private endpoints. On resume verify code/config/ hardware fingerprints before reusing evidence. Rebaseline changed workloads explicitly while retaining earlier results.

Repeat the optimization cycle

  1. Measure and locate. Establish a baseline under the objective's actual conditions, including cold startup or tail load when those are the goal. Use suitable sampling, traces, counters, allocation data or phase timings to attribute the cost. Profiling is optional when simpler measurements establish ownership. Read Axis Review; inspect the whole relevant path, not a fixed list of CUDA kernels or training phases.
  2. Explain one hypothesis. Trace avoidable cost to its owner and dependencies. Estimate attainable benefit in the target metric relative to noise and code complexity. Eliminate unnecessary work before optimizing its implementation. Use a deeper tool only when it answers an unresolved question; record its selection or justified omission. Re-select tools when the bottleneck changes.
  3. Make a narrow change. Protect the affected behavioral contract first and make one causal change (a tightly coupled implementation may be one change). Preserve readable code, resource/output ownership and supported fallbacks. Fix shared layers when they own the cost and check other consumers. Avoid a second runtime or input-specific branch merely to favor the benchmark. Preserve other worktree edits.
  4. Remeasure under normal conditions. Compare the candidate with the actual incumbent and retain initial-baseline progress. Match inputs, outputs, load, modes and timing boundaries. Use repeated/interleaved trials as needed for drift/noise. Benchmark with expensive diagnostic instrumentation disabled; an already calibrated production counter may remain part of normal operation. Capture the target metric and guardrails, not only a locally faster phase.
  5. Validate and decide. Follow Validation for this workload. Adopt a useful measured gain only when affected output quality, correctness, lifecycle, compatibility and resource checks pass at justified complexity. Reject guardrail violations and revert only this attempt's owned changes; honor explicitly permitted metric tradeoffs. Mark noisy/interfered/incomplete evidence inconclusive; resolve it before claiming a gain. A failed idea does not close an axis.
  6. Reassess the accepted path. Obtain fresh relevant whole-path attribution using appropriate tools or measurements. Reopen changed assumptions, discover new axes and revisit prior closures. Rejected candidates leave the incumbent in place; test other supported hypotheses. Return to step 1 while actionable axes remain; repeated heavy Nsight captures are not mandatory.

For training, apply existing nsys/ncu/smoke/evaluation skills when their specific capabilities are needed. Runtime implementation optimization and convergence search are different tasks; use $tune-hyperparameters only when requested.

Exhaustion and handoff

Read closure rules before ending. Completion requires final-path attribution and normal-condition baseline-to-final measurements, evidence-backed review of every discovered in-scope axis, passing affected output/regression/guardrail checks and a maintainable intended diff. No actionable or unexamined axis may remain. Required representative workloads and applicable startup/resource checks must support the retained gains.

High utilization, one no-gain trial, fixed attempts or reaching a desired metric does not exhaust a workload. Promising unmeasured axes or unavailable necessary evidence stay open/blocked; do not relabel them out of scope. Follow explicit stop requests and limits with an incomplete result and exact continuation.

Report exhausted within the recorded scope and measurement resolution only when those conditions hold, not global optimality. Otherwise report incomplete and the blocker/limit. Include chosen metric/tools, accepted/rejected changes, measured gains and tradeoffs, quality checks, remaining bounds and artifact paths. Commit only authorized changes; optimization does not imply push/publication.

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Optimize Runtime làm được gì?

Iteratively optimize a specified workload by choosing suitable metrics and diagnostic tools, making causal code changes, remeasuring and validating outputs until no actionable axes remain. Use for sustained CPU, GPU, renderer, training, I/O or memory optimization; use a profiling skill for a single capture and tune-hyperparameters for learning-parameter search.

Vì sao nên dùng Optimize Runtime trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Optimize Runtime là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Optimize Runtime trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Scripter36/InstantMimic/tree/main/plugins/instantmimic-workflows/skills/optimize-runtime. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Optimize Runtime?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Optimize Runtime với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Optimize Runtime với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Optimize Runtime có miễn phí không?

Có. Kỹ năng này được Scripter36 phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇