File tree Expand file tree Collapse file tree 2 files changed +61
-1
lines changed
examples/onboarding_guide/causallm Expand file tree Collapse file tree 2 files changed +61
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,67 @@ This guide walks you through onboarding a new CausalLM model to QEfficient-trans
5353
5454## Onboarding Process
5555
56- ![ Onboarding Flowchart] ( ./Onboarding.png )
56+ ``` mermaid
57+ flowchart TD
58+ A["Check Transformers Library
59+ • Locate model in transformers/models/<model>/modeling_*.py
60+ • Identify architecture classes (Attention, DecoderLayer, etc.)"]
61+
62+ B{"Class already
63+ Implemented"}
64+
65+ C["Create Custom Files
66+ • Create modeling_*.py
67+ • Implement custom classes
68+ • Add __qeff_init__ methods"]
69+
70+ D["Test the model using
71+ the auto model class
72+ and validate the
73+ functionality"]
74+
75+ E["Add Mappings in pytorch_transforms.py
76+ • CustomOpsTransform (RMSNorm)
77+ • KVCacheTransform (all model classes)
78+ • ExternalModuleMapperTransform (if needed)"]
79+
80+ K{"if all test passes"}
81+
82+ L["Debug & Fix Issues
83+ Retest with test pipelines"]
84+
85+ M["Submit PR
86+ (Follow
87+ CONTRIBUTING
88+ guidelines)"]
89+
90+ A --> B
91+ B -->|No| C
92+ B -->|Yes| D
93+ C --> E
94+ E --> F
95+
96+ subgraph F["Testing Pipeline (4 Stages)"]
97+ direction TB
98+ G["Stage 1: PyTorch HF Model (Baseline)
99+ (tokens should match)"]
100+ H["Stage 2: PyTorch KV Model (After QEff transforms)
101+ (tokens should match)"]
102+ I["Stage 3: ONNX/ORT Model (After export)
103+ (tokens should match)"]
104+ J["Stage 4: Cloud AI 100 (Hardware execution)
105+ (tokens should match)"]
106+
107+ G --> H
108+ H --> I
109+ I --> J
110+ end
111+
112+ F --> K
113+ K -->|No| L
114+ L --> F
115+ K -->|Yes| M
116+ ```
57117
58118---
59119
You can’t perform that action at this time.
0 commit comments