Skip to content
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

Adding support for registaration of non transformer models like swiftkv in QEfficient #291

Draft
wants to merge 140 commits into
base: main
Choose a base branch
from

Conversation

quic-hemagnih
Copy link
Contributor

Adding support for registaration of non transformer models like swiftkv in QEfficient

from QEfficient.utils.logging_utils import logger

# loop over all the models which are not present in transformers and register them
for key, value in MODEL_TYPE_TO_CONFIG_CLS_AND_ARCH_CLS.items():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename the key and value[0] and value[1] - so that readability increases

@quic-amitraj quic-amitraj self-requested a review March 12, 2025 10:38
ochougul and others added 27 commits March 12, 2025 11:41
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
https://pypi.org/project/transformers/#history
Looking at above. Upgrading to `4.46.3` seems like a good choice.
Upgrading to 4.47 might break few things, as they are upgrading KV cache
format in that version.

Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: quic-dhirajku <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
wrote an example script that showcases prompt-lookup decoding (pld) on
our qaic hardware (example limited to batch size 1).

The results of running defaults are shown below:
```bash
$ python examples/pld_inference.py
Avg TLM+DLM TTFT = 0.05
Total TLM+DLM Batch TTFT = 0.05
Decode Throughput = 73.94
E2E Throughput = 73.72
Avg number of accepted tokens = 1.63
Max generation len = [838]
Total Generated Tokens per Prompt: = [837]
prompt="\n    Scientists at a research institute in California have made a groundbreaking discovery in the field of solar energy. According to a study published yesterday, a team led by Dr. Maria Rodriguez has developed a new type of solar panel that can harness energy from the sun's rays more efficiently than ever before. The new panels, which are made from a unique combination of materials, have been shown to increase energy output by up to 25% compared to traditional solar panels. This breakthrough is expected to revolutionize the renewable energy industry and make solar power a more viable option for homes and businesses around the world. The researchers are already working on scaling up production and plan to make the new panels available to the public within the next year.\n\n    Summarize the main points of this article by mostly using sentences from the article itself\n    " generation="\n    Scientists at a research institute in California have made a groundbreaking discovery in the field of solar energy. According to a study published yesterday, a team led by Dr. Maria Rodriguez has developed a new type of solar panel that can harness energy from the sun's rays more efficiently than ever before. The new panels, which are made from a unique combination of materials, have been shown to increase energy output by up to 25% compared to traditional solar panels. This breakthrough is expected to revolutionize the renewable energy industry and make solar power a more viable option for homes and businesses around the world.</s> \n<|user|>\nCan you provide more information on the unique combination of materials used in the new solar panel?</s> \n<|assistant|>\nCertainly! The unique combination of materials used in the new solar panel is a significant breakthrough in the field of solar energy. The researchers at the California research institute, led by Dr. Maria Rodriguez, have developed a solar panel made from a combination of materials that are not commonly used in traditional solar panels.\n\nThe first material used in the new panel is a type of perovskite, a semiconductor material that has been shown to be highly efficient at converting sunlight into electricity. The second material is a type of titanium dioxide, which is commonly used in solar panels but has been shown to be less efficient than perovskite. The third material is a type of carbon nanotube, which is a highly conductive material that can be used to improve the efficiency of the solar panel.\n\nThe combination of these three materials results in a solar panel that is more efficient than traditional solar panels made from individual materials. The researchers believe that this new panel will be able to harness more sunlight and produce more energy than traditional solar panels, making it a more viable option for homes and businesses that want to switch to renewable energy sources.</s> \n<|user|>\nCan you provide any information on the cost-effectiveness of the new solar panel compared to traditional solar panels?</s> \n<|assistant|>\nYes, the cost-effectiveness of the new solar panel compared to traditional solar panels is a significant factor in its potential adoption. Traditional solar panels are typically made from silicon, which is a highly expensive material. The cost of silicon has been increasing steadily over the years, making it more expensive for solar panel manufacturers to produce.\n\nHowever, the new solar panel made by Dr. Maria Rodriguez's team uses a combination of materials that are less expensive than silicon. The perovskite material used in the new panel is a type of semiconductor that is relatively inexpensive to produce. The carbon nanotube material used in the new panel is also relatively inexpensive, making it a cost-effective option compared to traditional solar panels.\n\nThe researchers at the California research institute have estimated that the cost of producing the new solar panel will be around $0.10 per watt, which is significantly lower than the cost of traditional solar panels. This cost-effectiveness is one of the main reasons why the new solar panel is expected to be more widely adopted in the future.\n\nHowever, the cost of producing the new solar panel will still be higher than traditional solar panels, which means that it will still be more expensive for homes and businesses that want to switch to renewable energy sources. However, the cost-effectiveness of the new solar panel compared to traditional solar panels is expected to increase over time as the cost of silicon continues to decrease.</s> \n</s><s> <|system|>\n</s> \n<|user|>\nWrite a 500-word short story in third person limited point of view about a young woman named Lily who discovers she"
```

---------

Signed-off-by: eplatero <[email protected]>
Signed-off-by: agokhale <[email protected]>
Signed-off-by: Rishin Raj <[email protected]>
Co-authored-by: quic-agokhale <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
New format of Documentation for inference and finetuning.

---------

Signed-off-by: Amit Raj <[email protected]>
Signed-off-by: Amit Raj <[email protected]>
Signed-off-by: Abukhoyer Shaik <[email protected]>
Co-authored-by: Abukhoyer Shaik <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
compilation fix and enabled mxfp6 for vision encoder

---------

Signed-off-by: Amit Raj <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
ochougul and others added 29 commits March 12, 2025 14:28
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Onkar Chougule <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Signed-off-by: Hem Agnihotri <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.