-
Notifications
You must be signed in to change notification settings - Fork 60
Adding aic-hw-version Compile Options Support #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Abukhoyer Shaik <[email protected]>
|
I have made a little change to the |
|
Is anything pending on this? I think we are good to merge this change. |
Yes, the compiler changes need to be merged first before we proceed with adding this change to Qeff. |
e19023e to
244fa42
Compare
Signed-off-by: Abukhoyer Shaik <[email protected]>
Signed-off-by: Abukhoyer Shaik <[email protected]>
quic-amitraj
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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.
```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]>
This pull request introduces support for compile-time options via keyword arguments (
kwargs), including theaic-hw-versionparameter, 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
compileAPI to better suit their specific requirements.Example Usage: