Repository navigation
Re-export Femto or Pico and the same checkpoint runs noticeably faster on several runtimes.
- Get up to 2.6x faster Femto inference on a Snapdragon NPU with the new
export()graph.
Drop-in upgrade, no code changes. Re-export to pick up the speedup.
✨ Spotlights / highlights
Faster export graphs for the PE-Core-T models
export() on RFDETRAtto, RFDETRFemto and RFDETRPico now applies RoPE (rotary position embedding) to contiguous channel halves, so the exported encoder has no stride-2 Slice and no Neg ops. Outputs equal the previous export up to fp32 rounding, with no COCO AP loss reported for Femto and Pico. (#89)
from rfdetr_plus import RFDETRFemto
model = RFDETRFemto()
model.export(format="onnx") # re-export to get the faster graphReported speedups over the previous export:
| Runtime | Femto and Pico |
|---|---|
| Snapdragon NPU (QNN HTP, FP16) | Femto 2.6x, Pico 2.2x |
| ONNX Runtime CPU, phone and Mac | 1.2-1.6x |
| ONNX Runtime CoreML EP (CPU and GPU units) | up to 2.4x |
| TensorRT FP16 | unchanged to 4% faster |
| ONNX Runtime CPU, Raspberry Pi 5 | no material change |
Atto gains less: 1.09x on the Snapdragon NPU, with no figures for other runtimes.
export(format="tflite") builds on the new graph too, but TFLite conversion hasn't been tested with it. TensorRT 8.5, the QNN GPU backend and native CoreML on the Apple Neural Engine weren't measured either.
🔄 Migration guide
No breaking changes, deprecations or removals in this release.
📝 Notable changes
🌱 Changed
- Exported-model speed —
export()graphs ofRFDETRAtto,RFDETRFemtoandRFDETRPiconow apply RoPE to contiguous channel halves instead of using interleaved stride-2 slices. A qkv that export does not recognise as a stocknn.Linearcall, for example one with unmerged LoRA adapters (backbone_lora=True), runs as is, gathers its output at run time and emits a warning. Monkeypatchingnn.Linearor othertorchinternals on the class is unsupported: export detects some such patches on a best-effort basis, and a missed one may be left out of the exported graph. Afterexport(),PECoreEncoder.rope_for_gridreturns its rows in the new channel order. Checkpoints, training, eager inference withoutexport()andexport_cpu_onnx()are unchanged. (#89, #90)
🔧 Fixed
- Package links — the
Homepagelink in the package metadata, and the license, install-from-git and new-issue links in the README, pointed toroboflow/rf-detr-plus, which returns 404. They now point toroboflow/rf-detr_plus. (#90)
🏆 Contributors
Welcome to Erik, contributing for the first time.
- Erik (@Erol444, LinkedIn) — the faster half-layout RoPE export and its cross-device benchmarks.
- Jirka Borovec (@Borda, LinkedIn) — INT8 accuracy tests and CI, work on the export change, and the release.
Automated contributions: claude[bot], Claude, Copilot Autofix
Full changelog: 1.3.0...1.3.1
Drafted by /oss:release, an AI skill in AI Rig. If it saved you time, a ⭐ helps others find it.