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

Bringup tt-torch models in forge #1314

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kamalrajkannan78
Copy link
Contributor

@kamalrajkannan78 kamalrajkannan78 commented Feb 25, 2025

Summary

  • This PR addresses Issue #1321 by porting models from tt-torch to tt-forge. The current compilation status of these models are available in the logs.

  • A list of skipped models along with the reasons for their exclusion can be found in Issue #1339. Any models that were missed in this PR will be included in PR #1337.

Note:

  • The following test cases are passing end-to-end (E2E), so a push marker has been added:
forge/test/models/pytorch/text/albert/test_albert.py::test_albert_sequence_classification_pytorch
forge/test/models/pytorch/text/perceiverio/test_perceiverio.py::test_perceiverio_masked_lm_pytorch
forge/test/models/pytorch/text/bert/test_bert.py::test_bert_question_answering_pytorch[phiyodr/bert-large-finetuned-squad2]

Logs:

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests604 ran478 passed126 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ☑️Skipped ⚠️Failed ❌️
TT-Forge-FE Tests604 ran477 passed126 skipped1 failed
TestResult
TT-Forge-FE Tests
pytest
test_dla.test_dla_pytorch[dla34]❌ failure

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests662 ran525 passed137 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests662 ran525 passed137 skipped0 failed
TestResult
No test annotations available

@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/tt_torch_models_bringup branch from 66ff210 to 09430d9 Compare February 25, 2025 09:39
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests662 ran525 passed137 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests604 ran478 passed126 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests662 ran525 passed137 skipped0 failed
TestResult
No test annotations available

@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/tt_torch_models_bringup branch 2 times, most recently from 899912e to 823a81e Compare February 25, 2025 19:42
Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests4 ran0 passed0 skipped4 failed
TestResult
TT-Forge-FE Tests
pytest
test_bloom.forge.test.models.pytorch.text.bloom.test_bloom❌ failure
test_glpn_kitti.forge.test.models.pytorch.vision.glpn_kitti.test_glpn_kitti❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

3 similar comments
Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests4 ran0 passed0 skipped4 failed
TestResult
TT-Forge-FE Tests
pytest
test_bloom.forge.test.models.pytorch.text.bloom.test_bloom❌ failure
test_glpn_kitti.forge.test.models.pytorch.vision.glpn_kitti.test_glpn_kitti❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests4 ran0 passed0 skipped4 failed
TestResult
TT-Forge-FE Tests
pytest
test_bloom.forge.test.models.pytorch.text.bloom.test_bloom❌ failure
test_glpn_kitti.forge.test.models.pytorch.vision.glpn_kitti.test_glpn_kitti❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests4 ran0 passed0 skipped4 failed
TestResult
TT-Forge-FE Tests
pytest
test_bloom.forge.test.models.pytorch.text.bloom.test_bloom❌ failure
test_glpn_kitti.forge.test.models.pytorch.vision.glpn_kitti.test_glpn_kitti❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/tt_torch_models_bringup branch from 823a81e to da83043 Compare February 26, 2025 09:11
Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests3 ran0 passed0 skipped3 failed
TestResult
TT-Forge-FE Tests
pytest
test_mlp_mixer.forge.test.models.pytorch.vision.mlp_mixer.test_mlp_mixer❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

3 similar comments
Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests3 ran0 passed0 skipped3 failed
TestResult
TT-Forge-FE Tests
pytest
test_mlp_mixer.forge.test.models.pytorch.vision.mlp_mixer.test_mlp_mixer❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests3 ran0 passed0 skipped3 failed
TestResult
TT-Forge-FE Tests
pytest
test_mlp_mixer.forge.test.models.pytorch.vision.mlp_mixer.test_mlp_mixer❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

Copy link

TestsPassedSkippedFailed ❌️
TT-Forge-FE Tests3 ran0 passed0 skipped3 failed
TestResult
TT-Forge-FE Tests
pytest
test_mlp_mixer.forge.test.models.pytorch.vision.mlp_mixer.test_mlp_mixer❌ failure
test_rmbg.forge.test.models.pytorch.vision.rmbg.test_rmbg❌ failure
test_yolos.forge.test.models.pytorch.vision.yolo.test_yolos❌ failure

@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/tt_torch_models_bringup branch 6 times, most recently from e8ebdde to 8b18209 Compare February 27, 2025 10:21
@kamalrajkannan78 kamalrajkannan78 marked this pull request as ready for review February 27, 2025 10:22
@kamalrajkannan78 kamalrajkannan78 force-pushed the kkannan/tt_torch_models_bringup branch from 8b18209 to 8a3aab6 Compare February 27, 2025 10:57
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests618 ran483 passed135 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests676 ran542 passed134 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests618 ran483 passed135 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests676 ran542 passed134 skipped0 failed
TestResult
No test annotations available



def load_model():
model = AutoModelForCausalLM.from_pretrained("bigscience/bloom-1b1")
Copy link
Member

Choose a reason for hiding this comment

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

Maybe pass the model_variant as param?


def load_input():
test_input = "This is a sample text from "
tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom-1b1", padding_side="left")
Copy link
Member

Choose a reason for hiding this comment

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

Same here.



def load_model():
model = GLPNForDepthEstimation.from_pretrained("vinvino02/glpn-kitti")
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.

def load_input():
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw)
processor = GLPNImageProcessor.from_pretrained("vinvino02/glpn-kitti")
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.



def load_model():
model = MgpstrForSceneTextRecognition.from_pretrained("alibaba-damo/mgp-str-base")
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.

def load_input():
url = "https://i.postimg.cc/ZKwLg2Gw/367-14.png"
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
processor = MgpstrProcessor.from_pretrained("alibaba-damo/mgp-str-base")
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.



def load_input():
url = "https://i.postimg.cc/ZKwLg2Gw/367-14.png"
Copy link
Member

Choose a reason for hiding this comment

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

Should we really take those images? What do others think?



def load_model():
model = AutoModelForImageSegmentation.from_pretrained("briaai/RMBG-2.0", trust_remote_code=True)
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.



def load_model():
model = AutoModelForObjectDetection.from_pretrained("hustvl/yolos-tiny")
Copy link
Member

Choose a reason for hiding this comment

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

Pass model_variant as param.

Copy link
Contributor

@ashokkumarkannan1 ashokkumarkannan1 left a comment

Choose a reason for hiding this comment

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

Great Work @kamalrajkannan78 . Thanks for the PR. Left few review comments. Please address those comments.... :)

module_name = build_module_name(
framework=Framework.PYTORCH,
model="albert",
task=Task.QA,
Copy link
Contributor

Choose a reason for hiding this comment

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

variant missing?

module_name = build_module_name(
framework=Framework.PYTORCH,
model="albert",
task=Task.SEQUENCE_CLASSIFICATION,
Copy link
Contributor

Choose a reason for hiding this comment

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

missing variant?

Comment on lines +97 to +98
variants = ["bert-large-cased-whole-word-masking-finetuned-squad", "phiyodr/bert-large-finetuned-squad2"]

Copy link
Contributor

Choose a reason for hiding this comment

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

unused?

module_name = build_module_name(
framework=Framework.PYTORCH,
model="bloom",
source=Source.HUGGINGFACE,
Copy link
Contributor

Choose a reason for hiding this comment

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

missing variant? pls check all the model test files and add the variants

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.

4 participants