fp16-trt-network

fp16-trt-network is a skill for Claude Code, Codex from NVIDIA/TensorRT-Model-Connect. It costs 59 tokens per session (1,396 once invoked), scanned A, original, Apache-2.0.

A guide to using FP16 or BF16, lower-precision number formats, in strongly typed TensorRT neural-network graphs.

In plain words
What is it for?
Use it when adding, reviewing, or debugging low-precision TensorRT networks, including explicit FP32 boundaries and compact attention state.
Why use it?
It helps keep tensor data types, constants, casts, backend selection, and shape or layout ownership consistent when reducing precision.

Skill for Claude CodeCodex

About the project

NVIDIA/TensorRT-Model-Connect is a collection of C++ reference implementations for deploying supported Hugging Face models with NVIDIA TensorRT, a system that runs trained models to produce inference results. It is for developers who want to build and run supported models or evaluate model integrations through TensorRT. The catalogue entries provide skills and instructions for using this model deployment workflow.

NVIDIA/TensorRT-Model-Connect · 219 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/nvidia/tensorrt-model-connect/fp16-trt-network
Any agent
npx skills add NVIDIA/TensorRT-Model-Connect --skill fp16-trt-network
Clone the repo
git clone --depth 1 https://github.com/NVIDIA/TensorRT-Model-Connect

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fp16-trt-network

README.md
[![agentmods](https://agentmods.dev/badge/skills/nvidia/tensorrt-model-connect/fp16-trt-network.svg)](https://agentmods.dev/skills/nvidia/tensorrt-model-connect/fp16-trt-network)
Your own site
<a href="https://agentmods.dev/skills/nvidia/tensorrt-model-connect/fp16-trt-network"><img src="https://agentmods.dev/badge/skills/nvidia/tensorrt-model-connect/fp16-trt-network.svg" alt="Measured on agentmods" height="20"></a>
Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,396 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.01396
Opus 5 $0.00030 $0.00698
Sonnet 5 $0.00012 $0.00279
Haiku 4.5 $0.00006 $0.00140

Measured 5d ago against content hash 5840237bd66c, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

fp16-trt-network scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/trtmc-agent-skills/skills/fp16-trt-network/SKILL.md · 167 lines

How it starts

The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.

FP16/BF16 TensorRT Networks

Contract

TensorRT networks in this repository are strongly typed:

from tensorrt_model_connect import trt_compat

flags = trt_compat.network_creation_flags(strongly_typed=True)
network = builder.create_network(flags)

Follow an owning family's established direct flag when it is intentionally backend-specific. For new backend-agnostic code, use trt_compat so TensorRT versions without EXPLICIT_BATCH and the optional TensorRT-RTX backend share one flag boundary. Backend selection, including --rtx, must happen before a module imports TensorRT; never switch backends after TensorRT is loaded.

Precision follows tensor dtypes, typed constants, and explicit network.add_cast(...) boundaries. Do not use BuilderFlag.FP16, BuilderFlag.INT8, layer.setPrecision(), layer.setOutputType(), or direct tensor.dtype mutation to override inference in a strongly typed network.

Keep changes in the owning family under python/tensorrt_model_connect/families/<family>/. Root graph helper modules are intentionally absent. Share a helper only within an ownership boundary where shape, dtype, and layout semantics genuinely match.

Map Precision Before Editing

For every input, weight, constant, intermediate, state tensor, and output, record:

  • storage dtype used to create the constant;
  • TensorRT runtime dtype;
  • shape and layout;
  • the operation where a cast occurs;
  • the required comparison dtype.

BF16 needs special care. Some family builders store constants in FP16-compatible NumPy storage and explicitly cast them to trt.bfloat16. Do not assume a NumPy dtype maps directly to the TensorRT dtype. Follow the owning family's constant helper and checkpoint mapper.

FP32 Boundaries

Use the family implementation and reference numerics to decide boundaries. Common FP32 candidates include:

  • normalization reductions and reciprocal/square-root arithmetic;
  • softmax and probability normalization;
  • batch/group statistics;
  • final logits or comparison-sensitive outputs;
  • unstable scale or calibration arithmetic.

Read the full file on GitHub · 167 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 167 lines · 59 tokens per session scan A 5840237bd66c

Subscribe to this mod's changes

fp16-trt-network is a skill published in the GitHub repository NVIDIA/TensorRT-Model-Connect (219 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,396 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

graphsignal-profiler

Set up the Graphsignal Profiler for inference workloads — vLLM, SGLang, PyTorch, and dstack services. Use when the user wants GPU profiling, tracing, or monitoring for inference, asks about graphsignal-run or graphsignal.watch(), or asks about CUPTI / Prometheus / OTLP setup.

graphsignal/graphsignal-profiler · 74 tokens

perf-host-analysis

Analyze host/CPU overhead in TensorRT-LLM inference from nsys traces. Detect whether host overhead is the bottleneck using GPU idle ratio, host prep exposed ratio, and per-phase evidence. For regressions, isolate forward steps via allreduce/NVTX patterns, compare host operation breakdowns across versions, and identify…

NVIDIA/TensorRT-LLM · 171 tokens

perf-host-optimization

Profiles and optimizes TensorRT-LLM host/CPU overhead using lineprofiler (with nsys support planned). Runs iterative profile-analyze-optimize-validate rounds. Use when GPU utilization is low or optimizing PyExecutor throughput.

NVIDIA/TensorRT-LLM · 52 tokens

weights-and-biases

Track ML experiments with automatic logging, visualize training in real-time, optimize hyperparameters with sweeps, and manage model registry with W&B - collaborative MLOps platform.

OpenLAIR/dr-claw · 39 tokens

huggingface-accelerate

Simplest distributed training API. 4 lines to add distributed support to any PyTorch script. Unified API for DeepSpeed/FSDP/Megatron/DDP. Automatic device placement, mixed precision (FP16/BF16/FP8). Interactive config, single launch command. HuggingFace ecosystem standard.

OpenLAIR/dr-claw · 69 tokens

huggingface-hub

Hugging Face Hub — model discovery, download, inference, and upload.

furkangonel/cowrangler · 22 tokens