edge-llm-accuracy-debugging
Skill631 starsChanged 3 days agoApache-2.0View on GitHub
Localize a TensorRT Edge-LLM accuracy mismatch against the model provider's PyTorch reference after few-layer validation identifies a failing component or layer.
In this repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- edge-llm-add-modelSkill
- edge-llm-benchmark-accuracySkill
- edge-llm-benchmark-performanceSkill
- edge-llm-convert-modelSkill
- edge-llm-cpp-testSkill
- edge-llm-cutedsl-kernelSkill
- edge-llm-documentationSkill
- edge-llm-e2e-testSkill
- edge-llm-feature-combinationsSkill
- edge-llm-few-layer-testSkill
- edge-llm-installSkill
- edge-llm-plugin-extensionSkill
- edge-llm-serveSkill
- edge-llm-version-migrationSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 14
Start an accuracy investigation with edge-llm-few-layer-test.
- Distinctive: line 20
If the few-layer test fails and the first incorrect operation is still unknown, use TensorRT debug-tensor instrumentation to capture …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --><!-- SPDX-License-Identifier: Apache-2.0 -->Edge-LLM accuracy debugging
Start an accuracy investigation with
edge-llm-few-layer-test. It compares
the reduced PyTorch and Edge-LLM executions and identifies the failing layer,
logits, cache, or recurrent state. Do not weaken its gate to make a mismatch
pass.
If the few-layer test fails and the first incorrect operation is still
unknown, use TensorRT debug-tensor instrumentation to capture intermediate
values from that layer. The full-intermediate guide
and assets/debugTensorDumper.{h,cpp} describe the diagnostic path; the
standalone comparator can compare a
compatible dump with model-provider PyTorch captures. Match checkpoint bytes,
inputs, preprocessing, dtype, and prefill/decode step before comparing values.
An exported ONNX graph is not the golden reference.
The source-injection guide provides a way to
instrument the builder and runtime with IDebugListener. Check the bundled
patch against the current code before applying it in an isolated worktree;
the technique is active, but the patch is revision-specific. Do not reset
unrelated changes. After fixing the first incorrect operation, rerun the
few-layer test and the original end-to-end workload.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

