> EulerNPU > 튜토리얼 > 06. 모델 예제 카탈로그

06. 모델 예제 카탈로그

examples/ 디렉토리에 동작하는 작은 모델들이 있습니다. 같은 CLI 흐름 (validate → compile → run → compare)으로 모두 실행됩니다. 이 페이지는 어느 예제가 어떤 op을 다루는지 한눈에 보기 위한 카탈로그입니다.

silicon 검증된 모델 (P06/P07/P08)은 별도 페이지 — 08 / 09 / 10.

기초 4종

예제모델핵심 opbackends
examples/tiny_mlp/2-layer MLP → softmaxlinear, relu, softmaxcpu_ref, npu_sim, zynq_ps
examples/tiny_cnn/Conv → pool → FC → softmaxconv2d, maxpool2d, linearcpu_ref, zynq_ps
examples/tiny_transformer/단일 decoder blocklinear, attention_core, layernormcpu_ref, npu_sim, zynq_ps
examples/robotics_policy_net/3-layer MLP policylinear, relu, tanhcpu_ref, npu_sim, zynq_ps

각 예제는 다음 5개 파일을 포함합니다:

실행 예 (tiny_mlp):

EX=examples/tiny_mlp
eulernpu validate $EX/spec.yaml
eulernpu compile  --spec $EX/spec.yaml --weights $EX/weights.npz --out /tmp/mlp
eulernpu run      --artifact /tmp/mlp --input $EX/input.npz --out /tmp/mlp.out.npz
eulernpu compare  --got /tmp/mlp.out.npz --expected $EX/golden.npz

응용 4종

예제모델핵심 op
examples/tiny_lstm_anomaly/LSTM anomaly detectorlstm_cell, sigmoid, slice
examples/tiny_transformer_policy/Transformer policyattention_core, silu, sequence_last
examples/quantized_cnn_int8/Quantized CNNquantize, dequantize, global_avgpool2d
examples/robot_nav_policy/Robot nav MLP (12D→4)linear, relu, softmax

INT8 양자화 예제 (quantized_cnn_int8)는 05. quantize와 같이 보면 좋습니다.

신규 op 그룹 (0.5.0)

P02 / P03 prerequisite로 추가된 op들의 작은 예제:

예제핵심 신규 op
examples/flash_attn_decoder/flash_attention (Dao 2022 online softmax)
examples/vit_patch_embed/image_norm, patch_embed, cls_token_prepend
examples/ddim_denoise_step/timestep_embed, cfg_scale, ddim_step
examples/edge_moe_transformer/router_linear, moe_topk_route, moe_expert_ffn
examples/edge_action_graph/graph_conv, node_pool, edge_aggregate
examples/robot_fusion_policy/gated_fusion, cross_modal_concat
examples/decoder_kvcache/kv_cache_append, rotary_embed, temperature_scale

각 신규 op은 eulernpu/hls/kernels/ 의 HLS 커널과 짝지어집니다. NumPy equivalence test + 헤더 syntax test + cycle model test 3-level로 검증되어 있습니다.

어디서 풀 그래프 모델을 보나

위 예제들은 op 별 작은 데모입니다. 풀 그래프 풀 모델examples/silicon_*/ 디렉토리에 있고, 3개 모두 XC7Z020 silicon에서 검증되어 있습니다:

프로젝트모델silicon페이지
examples/silicon_kws/DS-CNN + GRU KWS (11 commands)✅ XC7Z02008. kws_silicon
examples/silicon_bearing/1D-CNN bearing fault✅ XC7Z02009. bearing_silicon
examples/silicon_llm/nanoGPT 10.77M✅ XC7Z020 (L2 hybrid)10. llm_silicon_hybrid

examples/silicon_kws/ 는 P06의 모델 정의 origin (spec + 학습된 weights + golden + calib 데이터)입니다. P06이 같은 모델을 silicon에 올렸습니다.

다음 단계

FPGA / Zynq에 올리는 일반 흐름을 보려면 → 07. fpga_overview.