fp16-trt-network
Skill290 starsChanged 45 days agoApache-2.0View on GitHub
Implement or review FP16 and BF16 behavior in one family-owned, strongly typed TensorRT network without changing unrelated families.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- website/static/llms.txtllms.txt
- debug-trt-mismatchSkill
- doc-syncSkill
- optimize-model-precisionSkill
- pr-babysitterSkill
- profile-modelSkill
- review-trtmc-prSkill
- setup-trtmc-environmentSkill
- submit-github-bug-issueSkill
- submit-github-prSkill
- transform-modelSkill
- write-git-messagesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Create the network with trt.NetworkDefinitionCreationFlag.STRONGLY_TYPED.
- Very specific: line 20
Create constants in an intentional storage dtype and use network.add_cast(...) when the runtime dtype differs.
- Distinctive: line 22
Keep all inputs to an elementwise operation dtype-compatible, including epsilon, masks, scales, and affine parameters.
- Distinctive: line 27
Use FP32 only where the family implementation or measured reference evidence requires it, commonly reductions, normalization, probability …
≈ “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
FP16 and BF16 TensorRT Networks
Work in the owning families/<family>/ implementation. Read its model.py,
local graph helpers, manifests, and tests before changing dtype behavior.
Preserve the typed graph
- Create the network with
trt.NetworkDefinitionCreationFlag.STRONGLY_TYPED. - Resolve
request.precisionexplicitly and reject unsupported values. - Track checkpoint storage dtype, TensorRT tensor dtype, shape, and layout at every cast-sensitive boundary.
- Create constants in an intentional storage dtype and use
network.add_cast(...)when the runtime dtype differs. - Keep all inputs to an elementwise operation dtype-compatible, including epsilon, masks, scales, and affine parameters.
- Preserve compact K/V projection and cache shapes for grouped or multi-query attention.
Use FP32 only where the family implementation or measured reference evidence requires it, commonly reductions, normalization, probability arithmetic, or comparison-sensitive outputs. Cast back explicitly. Do not apply a blanket FP32 layer list or remove an established family boundary without evidence.
Precision and quantization are separate request values. Change one at a time, and do not add a shared model helper merely because another family has similar code. Copy a small proven pattern into the owner when needed.
Prove the change
Build through the public Python build command with the exact checkpoint and precision. Inspect the resulting bundle, run focused family Python/C++ tests, then run the declared family E2E testcase against its existing oracle.
Bundle size is only a signal. Qualification requires the requested graph path to execute and the unchanged family correctness contract to pass. Report any hardware or precision variant not run.
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.

