thinker-model-pack-validation

Packages quantized ONNX models with tpacker and validates Linger-Thinker inference consistency.

Updated Aug 7, 2026
One-click install
npx skills add https://github.com/LISTENAI/lnn_skills --skill thinker-model-pack-validation-listenai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: thinker-model-pack-validation
Source: https://github.com/LISTENAI/lnn_skills/tree/main/lnn-model-pack-validation
Command: npx skills add https://github.com/LISTENAI/lnn_skills --skill thinker-model-pack-validation-listenai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires linger, onnx, pythinker.

What problem does it solve? Deploying quantized ONNX models on Thinker hardware (Venus, ARCS, VenusA) requires iterative packing with tpacker, tuning memory and split thresholds to reduce hardware operator splitting, and verifying that Thinker inference matches the Linger reference. Doing this manually is error-prone and slow. ## Core Features & Use Cases - Automated Packing & Tuning: Builds a packing baseline with tpacker, analyzes operator splits between pre/post-split graphs, and iteratively optimizes threshold1-4, DMA prefetch, and tensor placement within real memory limits. - Consistency Validation: Runs tvalidator with fixed inputs to confirm Linger and Thinker produce matching outputs, including multi-resource DAG end-to-end checks. - Failure Reporting: Generates a minimal reproducible failure report with environment info, exact commands, and the first actionable error when packing or validation fails. - Use Case: You have a quantized ONNX model exported from Linger targeting the ARCS platform. The skill packs it within the 393216-byte shared memory limit, minimizes Conv/Linear splitting, and verifies bit-level consistency with the Linger reference. ## Quick Start Pack my quantized model model.onnx for the venus platform with tpacker, minimize operator splitting within the real memory limits, and validate consistency with tvalidator.

Frequently Asked Questions about thinker-model-pack-validation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I pack a quantized ONNX model for Thinker hardware?

Run tpacker with the ONNX graph, target platform (venus, arcs, or venusa), real shared memory and PSRAM limits, and threshold parameters. The skill builds a baseline first, then iteratively tunes thresholds to reduce hardware operator splitting while staying within memory constraints.

How to verify Linger and Thinker inference consistency?

Use tvalidator with the original ONNX, the packed resource via -r, and a dump-enabled libthinker.so for the same platform. Always pass fixed .npy inputs with -i and confirm the output explicitly states consistency verification passed, not just a zero exit code.

What do tpacker threshold1 through threshold4 control?

threshold1-3 control Conv and Linear operator split candidates with platform-specific limits, while threshold4 is the per-tensor payload size deciding automatic PSRAM versus shared memory placement. They are not total memory capacities, and some implementations count aligned elements rather than bytes.

Which platforms does Thinker model packing support?

The supported targets are venus, arcs, and venusa, each with different kernel limits and threshold semantics. The platform must match the ONNX graph metadata; a mismatch is a configuration error that cannot be fixed by tuning parameters.

Why does tpacker split my Conv or Linear operators excessively?

Excessive splitting usually means thresholds are below what the operator shapes allow within the memory budget, or platform hard limits force the splits. Analyze 7_graph_op_split.onnx and the memory report first, then raise only the relevant threshold within real hardware constraints.

When should I use --inputs/--outputs subgraph splitting in tpacker?

Use deployment subgraph splitting only when the whole graph cannot fit real memory limits or the deployment design explicitly requires multiple resources. For single-operator split problems, tune threshold1-3 first instead of cutting the deployment graph.