__SKILL_j6-plugin-__adaptation

Orchestrates five ordered sub-skills to adapt float PyTorch models for horizon_plugin_pytorch QAT.

3|Updated Aug 6, 2026
One-click install
npx skills add https://github.com/D-Robotics/rdk-skills --skill skill-j6-plugin-adaptation-d-robotics
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: __SKILL_j6-plugin-__adaptation
Source: https://github.com/D-Robotics/rdk-skills/tree/main/skills/oe-skills-s/skills/plugin/j6-plugin-adaptation
Command: npx skills add https://github.com/D-Robotics/rdk-skills --skill skill-j6-plugin-adaptation-d-robotics

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires horizon_plugin_pytorch, torch.

What problem does it solve? Adapting a float PyTorch model to the horizon_plugin_pytorch QAT toolchain requires multiple interdependent code changes (march setup, QuantStub/DeQuantStub insertion, dynamic_block annotation, prepare, fake quantize states) that must happen in a strict order; doing them out of sequence causes scope errors, broken graphs, or wrong quantization states. ## Core Features & Use Cases - Ordered orchestration: Invokes five sub-skills in a fixed sequence: set-march → insert-quant-dequant → dynamic-block → prepare → set-fake-quantize. - Mandatory march confirmation: Pauses the entire workflow to ask the user which march (e.g., NASH_E, NASH_P, NASH_B) to use before any code changes. - Consistency checks: Verifies structural changes happen before prepare, quant/dequant sit only at deployment boundaries, and fake quantize states match the calibration/QAT/validation phase. - Use Case: A user asks to fully adapt a float model in train.py to the Horizon QAT toolchain; the skill confirms the march, then applies each adaptation step in order and runs a final consistency checklist. ## Quick Start Ask the agent to fully adapt your float PyTorch model file to the horizon_plugin_pytorch QAT workflow and specify your target march.

Frequently Asked Questions about __SKILL_j6-plugin-__adaptation

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

FAQPage Schema
How do I adapt a float PyTorch model to horizon_plugin_pytorch QAT?▼

Run the full adaptation workflow in fixed order: set the march, insert QuantStub/DeQuantStub at deployment boundaries, annotate dynamic control flow with dynamic_block, call prepare to build the QAT model, then set fake quantize states per phase. The march must be confirmed before any other step.

What is the correct order for Horizon QAT adaptation steps?▼

The required order is set-march, insert-quant-dequant, dynamic-block, prepare, then set-fake-quantize. All structural changes like quant/dequant insertion and dynamic_block annotation must complete before prepare, since prepare freezes the model structure and hooks.

When should I use dynamic_block in horizon_plugin_pytorch?▼

Use Tracer.dynamic_block only when dynamic control flow (input- or randomness-dependent loops) contains logic that triggers function replacement or operator fusion during graph-mode prepare. Do not wrap entire loops, pure submodule calls, or purely static code.

Why does prepare fail or produce wrong scales after model changes?▼

Prepare relies on hooks and wrapper tensors for function-to-module replacement, so modifying model structure or hooks after prepare breaks replacement and causes forward errors or accuracy issues. Move all structural changes before the prepare call and re-run it.

Can I keep a fallback path when horizon_plugin_pytorch is not installed?▼

No. This workflow forbids try/except import fallbacks, None substitutions, or nn.Identity stand-ins for QuantStub, prepare, or set_fake_quantize. Horizon APIs must be imported and called directly, and missing dependencies should fail loudly.

When should I not use the full QAT adaptation workflow?▼

Skip the orchestration skill when you only need a single step, such as setting march, inserting QuantStub/DeQuantStub, or configuring fake quantize states, or when the model is already a QAT model. Invoke the corresponding individual sub-skill directly instead.