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

rebase to main #446

Open
wants to merge 14 commits into
base: hf-model-ci
Choose a base branch
from
Open

rebase to main #446

wants to merge 14 commits into from

Conversation

pdhirajkumarprasad
Copy link
Contributor

rebase to main

zjgarvey and others added 14 commits January 17, 2025 16:34
…unning (#424)

This makes `--mode=cl-onnx-iree` the default mode since it is the most
well-supported. A few code improvements are also made:

1. The flag `--iree-compile-args` now uses `-a` for shorthand, since
`-ica` is not really valid.
2. Refactors the script running for `cl-onnx-iree` through a util
function `run_command_and_log` in `logging_utils.py`.
3. Script running now uses `subprocess`, which more intelligently
catches errors with `ret.returncode` rather than the existence of
stage-specific output files.
4. reorganizes some imports for convenience and to allow case-by-case
requirement dependency
5. Raises a warning if `torch-mlir-opt` is not found when trying to run
with `preprocessing` (i.e., `--torchtolinalg`).
Updates actions and pins as suggested by OpenSSF Scorecard, see
https://github.com/ossf/scorecard/blob/main/docs/checks.md#pinned-dependencies.
In particular `actions/{download,upload}-artifact` was pointing to
`master`, however, the current default branch is `main`, which might
break the workflow after the announced deprecation date passed.
Actions are pinned with hashes as suggested by OpenSSF Scorecard, as
soon as #438 lands. Those actions can be upgraded with Dependabot, see
https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot.
Updates tokenizer input registry for failing HuggingFace models with
extra tokenizer attributes.
These models run successfully after adding the basic optimization
#444)

If running 

```
python run.py -t <some_test_1> -v -r test-run1 --get-metadata
```
and 

```
python run.py -t <some_test_2> -v -r test-run2 --get-metadata
```
Then 

```
python utils/find_duplicate_models.py -r . 
```
from the `alt_e2eshark` directory will identify duplicates from both
`./test-run1/` and `./test-run2/`.
Removes if conditions based on model name to decide Tokenizer class.
Instead, directly uses AutoTokenizer class.
Co-authored-by: Vinayak Dev <[email protected]>

---------

Co-authored-by: Vivek Agrawal <[email protected]>
Adds extra input during construct_input phase to avoid input vs
session_input size mismatch issue during native inference.

---------

Co-authored-by: Vivek Agrawal <[email protected]>
Fixes the bug introduced in commit:
 "Fixes native inference input size mistmatch issue (#447)"

tokenizer.model_input_names should be updated before tokenizer call.
Following testcases passes after fixing input issue at construct_input
phase (which was causing failure at compiled_inference phase):
```
hf_ko-sroberta-multitask
hf_robertuito-sentiment-analysis
hf_sbert_large_nlu_ru
hf_sentence-bert-base-ja-mean-tokens-v2
```
- Fixes opset_version issue for following models:
  - hf_llama-7b
  - hf_oasst-sft-4-pythia-12b-epoch-3.5
  - hf_Qwen2.5-1.5B-Instruct
  - hf_Qwen2.5-7B-Instruct
  - hf_Qwen2-7B-Instruct
  - hf_TinyLlama-1.1B-Chat-v1.0
  - hf_vicuna-7b-v1.5

- Fixes OOM issue for hf_StableBeluga2
- removes hf_wasmai-7b-v1 model from the hf list

---------

Co-authored-by: Vivek Agrawal <[email protected]>
Skip running the models that fails at setup stage with the following
category of errors

[ONNXRuntimeError] : 9 : NOT_IMPLEMENTED : Could not find an
implementation
Invalid source tar file
[ONNXRuntimeError] : 10 : INVALID_GRAPH
[ONNXRuntimeError] : 7 : INVALID_PROTOBUF :: Protobuf serialization
failed
[ONNXRuntimeError] : 1 : FAIL : Node
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.

7 participants