Tutorial 1: sample project
The fastest way to see the pipeline work end to end is to use the sample project that np workspace init already generated for you. Using the sample project means there is no project or dataset setup to do first.
What you'll build
You'll validate, run, and inspect the ResNet-18 sample experiment that is already in your workspace, and see what a completed pipeline looks like.
This tutorial assumes that you have completed Quick start through workspace initialization. If you have not run np workspace init yet, do that first to create the sample project this tutorial uses.
Step 1. Navigate to the sample experiment
cd workspace/sample_project/experiment_00
This experiment is already configured: resnet18_pt2_pytorch_static_fp32 targeting Raspberry Pi 5, with GO + GQ steps in its run.yaml.
Step 2. Validate
This is an optional step.
np validate
Sample output
2026-08-20 13:05.00 [INFO ] [CLI] Validating run configuration
2026-08-20 13:05.02 [DONE ] [CLI] Validation Passed. No issues found.
╭─────────────────────────────── Execution Plan ───────────────────────────────╮
│ Steps: │
│ [1/2] graph_optimize │
│ [2/2] graph_quantize — scheme: W8-A8 │
│ Profile: INPUT_MODEL, GRAPH_OPTIMIZE, OUTPUT_MODEL │
│ Evaluate: │
│ INPUT_MODEL (snr) │
│ GRAPH_OPTIMIZE (snr) │
│ OUTPUT_MODEL (snr) │
│ Total: 8 jobs │
╰──────────────────────────────────────────────────────────────────────────────╯
Step 3. Run the pipeline
np run --wait
Pressing Ctrl+C while np run --wait is polling stops the CLI from watching, but it does not cancel anything. The pipeline keeps executing on the backend. To actually stop it, run np cancel.
Sample output
2026-08-20 13:05.20 [INFO ] [CLI] Submitting run (will wait for completion)
2026-08-20 13:05.20 [INFO ] [CLI] Logs appear as each step completes. A quiet screen means the run is still queued or a step is in progress.
2026-08-20 13:05.25 [INFO ] [Workflow] Downloading input model started
2026-08-20 13:05.26 [INFO ] [Workflow] Downloading input model completed (1.2s)
2026-08-20 13:05.26 [INFO ] [Workflow] Preparing calibration started
2026-08-20 13:05.27 [INFO ] [Workflow] Preparing calibration completed (0.9s)
2026-08-20 13:05.27 [INFO ] [Workflow]
════════════ [1/4] Graph Optimize ════════════
2026-08-20 13:05.27 [INFO ] [Workflow] Graph Optimize started
2026-08-20 13:05.48 [INFO ] [Workflow] Uploading artifacts completed (20.7s)
2026-08-20 13:05.48 [INFO ] [Workflow] Exporting VGF started
2026-08-20 13:06.33 [INFO ] [Workflow] Exporting VGF completed (44.8s)
2026-08-20 13:06.45 [INFO ] [Workflow] Applied 6 patterns (3 loops):
Loop 1:
- Remove Batch Norm Tracking (53)
- Replace Inplace Add (16)
- Replace Inplace Relu (49)
- Fuse BN To Conv (53)
Loop 2:
(no patterns applied)
Loop 3:
- Combine Add Relu (16)
- Combine Conv Relu (33)
2026-08-20 13:06.45 [DONE ] [Workflow] Graph Optimize completed (1m 18s)
2026-08-20 13:06.45 [INFO ] [Workflow]
════════════ [2/4] Graph Quantize ════════════
2026-08-20 13:06.45 [INFO ] [Workflow] Graph Quantize started
2026-08-20 13:06.45 [INFO ] [Workflow] Preparing calibration for quantization started
2026-08-20 13:06.45 [INFO ] [Workflow] Preparing calibration for quantization completed (0.0s)
2026-08-20 13:07.09 [INFO ] [Workflow] Uploading artifacts completed (18.9s)
2026-08-20 13:07.09 [INFO ] [Workflow] Exporting VGF started
2026-08-20 13:09.04 [INFO ] [Workflow] Exporting VGF completed (1m 55s)
2026-08-20 13:09.10 [DONE ] [Workflow] Graph Quantize completed (2m 25s)
2026-08-20 13:09.10 [INFO ] [Workflow]
════════════ [3/4] Evaluate ════════════
2026-08-20 13:09.10 [INFO ] [Workflow] Evaluate started
2026-08-20 13:09.10 [INFO ] [Workflow] Preparing evaluation dataset started
2026-08-20 13:09.10 [INFO ] [Workflow] Preparing evaluation dataset completed (0.1s)
2026-08-20 13:09.32 [DONE ] [Workflow] Evaluate completed (21.8s)
2026-08-20 13:09.32 [INFO ] [Workflow]
════════════ [4/4] Profile ════════════
2026-08-20 13:09.32 [INFO ] [Workflow] Profile started
2026-08-20 13:09.32 [INFO ] [Workflow] INPUT_MODEL
2026-08-20 13:09.35 [INFO ] [Workflow] GRAPH_OPTIMIZE
2026-08-20 13:09.38 [INFO ] [Workflow] OUTPUT_MODEL
2026-08-20 13:09.42 [DONE ] [Workflow] Profile completed (9.6s)
2026-08-20 13:09.42 [INFO ] [Workflow] Run completed (4m 17s)
2026-08-20 13:09.46 [DONE ] [CLI] Run completed successfully. (4m 26s)
[ Result Summary ]
Experiment experiment_00
Status success
Measurements
Evaluate base✓ 01_graph_optimize✓ 02_graph_quantize✓
Profile base✓ 01_graph_optimize✓ 02_graph_quantize✓ (estimated)
Artifacts
VGF base✓ 01_graph_optimize✓ 02_graph_quantize✓
NPIR base✓ 01_graph_optimize✓ 02_graph_quantize✓
[ Next Steps ]
View results or export artifacts:
$ np report
$ np export
Step 4. View results
np report
Sample output
Experiment: experiment_00
┏━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━┓
┃ Model ┃ Type ┃ Status ┃ Memory(MB) ┃ Latency(ms) ┃ MACs ┃ Params ┃ SNR (vs input) ┃
┡━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━┩
│ input_model │ - │ - │ - │ - │ 4.1G │ 25.6M │ - │
│ 01_graph_optimize │ graph_optimize │ success │ - │ - │ 4.1G │ 25.6M │ 121.06 │
│ 02_graph_quantize │ graph_quantize │ success │ - │ - │ 4.1G │ 25.6M │ 0.18 │
└───────────────────┴────────────────┴─────────┴────────────┴─────────────┴──────┴────────┴────────────────┘
RPi5 is an xnnpack-backend device, so mlia only produces MACs and parameters here. Real memory and latency estimates from mlia are available only when targeting ethos_u (Alif E8). To get real latency and memory numbers on RPi5, measure directly with on-device profiling. Signal-to-noise ratio (SNR) stayed reasonable through GQ despite the quantization. See Evaluator and Profiler for more on these numbers.
Step 5. Export the model
np export
Sample output
2026-08-20 13:07.40 [INFO ] [CLI] Exporting experiment artifacts
2026-08-20 13:07.40 [INFO ] [CLI] Fetching S3 artifacts (presigned GET) ...
2026-08-20 13:07.50 [DONE ] [CLI] Export completed.
[ Result Summary ]
Level deploy
Extracted to /path/to/my-workspace/workspace/sample_project/experiment_00/artifacts/deploy
[ Result ]
- model.pte
Step 6. Visualize the optimized graph
np visualize generates a link to the graph viewer (probe) rather than opening a browser directly. The viewer needs a browser session, so bootstrap that once with np visualize auth:
np visualize auth
Sample output
Session bootstrap ready — use EITHER method (both establish the same session):
1) Open in browser (auto-establishes the session):
https://auth.your-deployment.netspresso.ai/api/v1/visualize/authorize?bootstrap=eyJhbGciOi...
2) Or paste this token into the page's auth field (same value as the end of the link above):
──────────────────── TOKEN — copy the line below ────────────────────
eyJhbGciOi...
─────────────────────────────────────────────────────────────────────
This link/token expires in about 179s. Use it promptly.
Open the link (or paste the token) in your browser once. The session then lasts about an hour. Then generate the graph link. See Visualizer for what the viewer shows:
np visualize
Sample output
[Tool] Using --tool probe (default).
- probe : any model format. Supports --compare diff.
- model-explorer : VGF only. Single-graph view.
Pass --tool to silence this notice.
[Context] Experiment: experiment_00 (Detected)
2026-08-20 13:23.52 [DONE ] [CLI] Visualization link generated
https://app.your-deployment.netspresso.ai?target=<target_ref>&baseline=<model_ref>&workspace=<ws_ref>
[ Next Steps ]
Copy the URL and open it in your browser
Tip: Interactive mode
You can run any command without arguments. The CLI prompts for missing values:
$ np projects create
? Project name: my-model
? Model name: resnet50
? Device: raspberry_pi_5_16gb
? Runtime: executorch
? Backend: xnnpack
Next steps
- Tutorial 2: Computer vision (CV) model: Build a project from scratch instead of using the sample one, with more device and scheme options explained
- Tutorial 3: Large language model (LLM): Optimize a language model with AQ + GO + GQ steps
- Tutorial 4: Bring Your Own Model (BYOM) and Bring Your Own Data (BYOD): Bring your own model and dataset
- Concepts: Understand the workspace, project, experiment, and job hierarchy and the compatibility matrix
- Diagnosis and log reference: If anything did not go as expected