Commit faab245
authored
Adding aic-hw-version Compile Options Support (#528)
This pull request introduces support for compile-time options via
keyword arguments (`kwargs`), including the `aic-hw-version` parameter,
which now accepts values `"ai100"` or `"ai200"`. If no value is
provided, the default is `"ai100"`, representing the AI100 hardware.
These enhancements allow users to tailor the `compile` API to better
suit their specific requirements.
### Example Usage:
```python
from QEfficient import QEFFAutoModelForCausalLM
from transformers import AutoTokenizer
model_name = "gpt2"
model = QEFFAutoModelForCausalLM.from_pretrained(model_name, num_hidden_layers=2)
model.compile(prefill_seq_len=128, ctx_len=256, num_cores=16, num_devices=1, **{'aic-hw-version': 'ai100'})
tokenizer = AutoTokenizer.from_pretrained(model_name)
model.generate(prompts=["Hi there!!"], tokenizer=tokenizer)
```
> **Note:** Previously, the default value for `aic-hw-version` was
`"2.0"`, which implicitly referred to AI100. This value is now
deprecated and replaced with the explicit `"ai100"` identifier.
---------
Signed-off-by: Abukhoyer Shaik <[email protected]>1 parent 9d9e44a commit faab245
File tree
6 files changed
+68
-11
lines changed- QEfficient
- base
- cloud
- compile
- transformers/models
- utils
- docs/source
6 files changed
+68
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
155 | 160 | | |
156 | 161 | | |
| 162 | + | |
157 | 163 | | |
158 | 164 | | |
159 | 165 | | |
| |||
311 | 317 | | |
312 | 318 | | |
313 | 319 | | |
| 320 | + | |
314 | 321 | | |
315 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
316 | 326 | | |
317 | 327 | | |
318 | 328 | | |
| |||
344 | 354 | | |
345 | 355 | | |
346 | 356 | | |
347 | | - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
348 | 364 | | |
349 | 365 | | |
350 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
147 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
290 | 291 | | |
291 | 292 | | |
292 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
293 | 300 | | |
294 | 301 | | |
295 | 302 | | |
| 303 | + | |
296 | 304 | | |
297 | 305 | | |
298 | 306 | | |
| |||
1701 | 1709 | | |
1702 | 1710 | | |
1703 | 1711 | | |
| 1712 | + | |
1704 | 1713 | | |
1705 | 1714 | | |
1706 | 1715 | | |
1707 | 1716 | | |
| 1717 | + | |
1708 | 1718 | | |
| 1719 | + | |
1709 | 1720 | | |
1710 | 1721 | | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
1711 | 1725 | | |
1712 | 1726 | | |
1713 | 1727 | | |
| |||
1960 | 1974 | | |
1961 | 1975 | | |
1962 | 1976 | | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
1963 | 1981 | | |
1964 | 1982 | | |
1965 | 1983 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
| 89 | + | |
89 | 90 | | |
90 | 91 | | |
91 | 92 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
119 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
120 | 133 | | |
121 | 134 | | |
122 | 135 | | |
| |||
0 commit comments