Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "third_party/tt_forge_models"]
path = third_party/tt_forge_models
url = https://github.com/tenstorrent/tt-forge-models.git
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/densenet_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Densenet Demo Script

import forge
from ....third_party.tt_forge_models.densenet.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/efficientnet_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Efficientnet Demo Script

import forge
from third_party.tt_forge_models.efficientnet.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/ghostnet_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Ghostnet Demo Script

import forge
from ....third_party.tt_forge_models.ghostnet.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/regnet_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Regnet Demo Script

import forge
from ....third_party.tt_forge_models.regnet.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/resnext_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Resnext Demo Script

import forge
from ....third_party.tt_forge_models.resnext.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/swin_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Swin Demo Script

import forge
from ....third_party.tt_forge_models.swin.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/vgg_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Vgg Demo Script

import forge
from ....third_party.tt_forge_models.vgg.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/wideresnet_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Wideresnet Demo Script

import forge
from ....third_party.tt_forge_models.wide_resnet.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/cnn/xception_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Xception Demo Script

import forge
from ....third_party.tt_forge_models.xception.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)

# Post-process the output
# ModelLoader.print_cls_results(output)
19 changes: 19 additions & 0 deletions demos/tt-forge-fe/nlp/dpr_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# DPR Demo Script

import forge
from ....third_party.tt_forge_models.dpr.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
input_tokens = ModelLoader.load_inputs()

inputs = [input_tokens["input_ids"], input_tokens["attention_mask"], input_tokens["token_type_ids"]]

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=inputs)

# Run inference on Tenstorrent device
output = compiled_model(*inputs)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/nlp/mamba_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# Mamba Demo Script

import forge
from ....third_party.tt_forge_models.mamba.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
input_tokens = ModelLoader.load_inputs()

# prepare input
inputs = [input_tokens["input_ids"]]

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=inputs)

# Run inference on Tenstorrent device
output = compiled_model(*inputs)
17 changes: 17 additions & 0 deletions demos/tt-forge-fe/nlp/roberta_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# RoBERTa Demo Script

import forge
from ....third_party.tt_forge_models.roberta.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)
17 changes: 17 additions & 0 deletions demos/tt-forge-fe/nlp/squeezebert_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# SqueezeBERT Demo Script

import forge
from ....third_party.tt_forge_models.squeezebert.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
inputs = ModelLoader.load_inputs()

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=[inputs])

# Run inference on Tenstorrent device
output = compiled_model(inputs)
20 changes: 20 additions & 0 deletions demos/tt-forge-fe/nlp/xglm_demo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SPDX-FileCopyrightText: © 2025 Tenstorrent AI ULC
# SPDX-License-Identifier: Apache-2.0

# XGLM Demo Script

import forge
from ....third_party.tt_forge_models.xglm.pytorch import ModelLoader

# Load model and input
model = ModelLoader.load_model()
input_tokens = ModelLoader.load_inputs()

# Prepare input
inputs = [input_tokens["input_ids"], input_tokens["attention_mask"]]

# Compile the model using Forge
compiled_model = forge.compile(model, sample_inputs=inputs)

# Run inference on Tenstorrent device
output = compiled_model(inputs)
Empty file added third_party/__init__.py
Empty file.
1 change: 1 addition & 0 deletions third_party/tt_forge_models
Submodule tt_forge_models added at 3b8b56