Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Integrate TileGym kernels into Hugging Face `transformers` models by replacing the library's submodule(s) and certain class(es)' implementations, and patching certain class(es)' init/forward/load weight methods prior to instantiating models. Used when the user requires integrating TileGym kernels into `transformers` models.
.claude/skills/nvidia-tilegym-monkey-patch-kernels-to-transformers/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 88% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -67% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -12% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -3% | 0% |
| case-13 | ✗→✓ | ▲ Improved | -64% | 0% |
The main purpose of TileGym project is to provide performant kernels for LLM training and inference. We will integrate proper kernels available in TileGym project to LLM models provided by Hugging Face transformers library to validate end-to-end functional correctness and performance improvements. Instead of modifying transformers source code, we will take a non-intrusive monkey-patch approach: We will replace certain modules/classes/methods in transformers library that implement the Transformer model we would like to integrate, such that at model instantiation, that model's core components will be replaced by TileGym implementations. At runtime the model will actually invoke TileGym kernels under the hood. In addition, we will follow an auto-research-style agent harness loop to create and integrate new cuTile kernels to the target model to improve kernel coverage and end-to-end throughput.
This is for human readers: Simply prompt your favorite AI Agent with skill name and target model ID. E.g.,:
Claude/CodeXHi, please /monkey-patch-kernels-to-transformers Qwen/Qwen3.5-0.8B.
The Agent might ask you several questions. Make clarifications and give a go confirmation.
This is for AI Agents executing this workflow.
Reusable transformer-local kernels must be represented with FlashInfer-Bench-style Definition and Solution metadata. Follow kernel-inventory-schema.md when researching compute requirements, inventorying existing kernels, proposing candidates, or creating new generated kernels.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 26,358 | 4,529 | -83% | 1 | 1 | 0% | 6,201 | 775 | -88% | 0 | 0 | — |
case-02 | fail→fail | 21,428 | 4,017 | -81% | 1 | 1 | 0% | 4,494 | 675 | -85% | 0 | 0 | — |
case-03 | fail→fail | 25,961 | 3,454 | -87% | 1 | 1 | 0% | 6,201 | 645 | -90% | 0 | 0 | — |
case-04 | pass→fail | 13,947 | 9,992 | -28% | 1 | 1 | 0% | 2,674 | 2,086 | -22% | 0 | 0 | — |
case-05 | pass→pass | 13,573 | 12,320 | -9% | 1 | 1 | 0% | 3,136 | 3,117 | -1% | 0 | 0 | — |
case-06 | pass→pass | 20,742 | 11,561 | -44% | 1 | 1 | 0% | 4,493 | 2,845 | -37% | 0 | 0 | — |
case-07 | fail→fail | 12,936 | 9,205 | -29% | 1 | 1 | 0% | 2,525 | 2,370 | -6% | 0 | 0 | — |
case-08 | fail→pass | 33,846 | 8,094 | -76% | 1 | 1 | 0% | 1,175 | 2,206 | +88% | 0 | 0 | — |
case-09 | fail→pass | 16,148 | 2,757 | -83% | 1 | 1 | 0% | 2,733 | 905 | -67% | 0 | 0 | — |
case-10 | fail→pass | 15,007 | 11,087 | -26% | 1 | 1 | 0% | 2,873 | 2,534 | -12% | 0 | 0 | — |
case-11 | fail→pass | 14,298 | 10,156 | -29% | 1 | 1 | 0% | 2,590 | 2,502 | -3% | 0 | 0 | — |
case-12 | pass→pass | 16,209 | 12,719 | -22% | 1 | 1 | 0% | 3,203 | 3,079 | -4% | 0 | 0 | — |
case-13 | fail→pass | 11,432 | 2,882 | -75% | 1 | 1 | 0% | 1,829 | 650 | -64% | 0 | 0 | — |
case-14 | fail→pass | 36,927 | 4,437 | -88% | 1 | 1 | 0% | 1,462 | 1,156 | -21% | 0 | 0 | — |
case-15 | pass→pass | 17,843 | 14,644 | -18% | 1 | 1 | 0% | 3,175 | 3,133 | -1% | 0 | 0 | — |
case-16 | fail→pass | 11,538 | 7,247 | -37% | 1 | 1 | 0% | 1,888 | 1,938 | +3% | 0 | 0 | — |
case-17 | fail→fail | 10,516 | 2,518 | -76% | 1 | 1 | 0% | 1,669 | 877 | -47% | 0 | 0 | — |
case-18 | fail→pass | 7,725 | 2,200 | -72% | 1 | 1 | 0% | 1,333 | 781 | -41% | 0 | 0 | — |
case-19 | pass→pass | 15,009 | 9,252 | -38% | 1 | 1 | 0% | 2,953 | 2,236 | -24% | 0 | 0 | — |
case-20 | fail→pass | 18,006 | 2,903 | -84% | 1 | 1 | 0% | 3,393 | 892 | -74% | 0 | 0 | — |
case-21 | fail→pass | 6,045 | 2,811 | -53% | 1 | 1 | 0% | 984 | 844 | -14% | 0 | 0 | — |
case-22 | fail→pass | 7,300 | 2,636 | -64% | 1 | 1 | 0% | 1,253 | 916 | -27% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 17 counted toward the lift figure. The other 5 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +45 percentage points is the difference between those two pass rates over the 17 comparable cases. 2 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.