Skip to content

Commit

Permalink
Back out "fix bert example" (#728)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #728

ATT

Reviewed By: alexanderguzhva

Differential Revision: D46186394

fbshipit-source-id: 01a41450ebe5a07e963da131c764731b3a6f0ce3
  • Loading branch information
aakhundov authored and facebook-github-bot committed May 25, 2023
1 parent 201937e commit 02460f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/03_bert/benchmark_ait.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
from aitemplate.frontend import Tensor
from aitemplate.testing import detect_target

from modeling.bert import BertBaseEncodersOnly, BertBaseUncased
from modeling.torch_model import BertBaseUncased as BertPt
from .modeling.bert import BertBaseEncodersOnly, BertBaseUncased
from .modeling.torch_model import BertBaseUncased as BertPt


def mark_output(y: Tensor) -> None:
Expand Down
6 changes: 3 additions & 3 deletions examples/03_bert/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

import torch

from benchmark_ait import compile_module
from modeling.torch_model import BertBaseUncased as BertPt

from transformers import BertTokenizer

from .benchmark_ait import compile_module
from .modeling.torch_model import BertBaseUncased as BertPt


def prepare_data(prompt: str, model_path: str):
tokenizer = BertTokenizer.from_pretrained(model_path)
Expand Down
2 changes: 1 addition & 1 deletion examples/03_bert/test_correctness.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import torch

from demo import run_model
from .demo import run_model

try:
from libfb.py.asyncio.await_utils import await_sync
Expand Down

0 comments on commit 02460f6

Please sign in to comment.