tenstorrent / tt-metal

:metal: TT-NN operator library, and TT-Metalium low level kernel programming model.
Apache License 2.0
388 stars 47 forks source link

Demo for functional roberta #6344

Open Sudharsan-V opened 5 months ago

Sudharsan-V commented 5 months ago

Update the Roberta demo to be compatible with the ttnn_functional_roberta model.

boris-drazic commented 5 months ago

Please use optimized bert implementation as underlying model models/demos/bert/tt/ttnn_optimized_bert.py

jayasuryamaganuru commented 5 months ago

commit for demo roberta token classification task - commit

dataset - conll2003

Demo for token classification task is in progress

Sudharsan-V commented 5 months ago

The demo for functional roberta QA is updated. Corresponding PR: #6601

Sample Output:

"context" : "Johann Joachim Winckelmann was a German art historian and archaeologist. He was a pioneering Hellenist who first articulated the difference between Greek, Greco-Roman and Roman art. The prophet and founding hero of modern archaeology, Winckelmann was one of the founders of scientific archaeology and first applied the categories of style on a large, systematic basis to the history of art.",
"question" : "What discipline did Winkelmann create?"

Output: Joachim Winckelmann was

Results:

exact: 0.0
F1: 3.611111111111111
kkeerthana0573 commented 3 months ago

The demo for functional RoBERTa QA is updated. Corresponding commit: commit. RoBERTa model uses optimized bert implementation as underlying model models/demos/bert/tt/ttnn_optimized_bert.py

Sample Outputs:

    "context" : "Johann Joachim Winckelmann was a German art historian and archaeologist. He was a pioneering Hellenist who first articulated the difference between Greek, Greco-Roman and Roman art. The prophet and founding hero of modern archaeology, Winckelmann was one of the founders of scientific archaeology and first applied the categories of style on a large, systematic basis to the history of art.",
    "question" : "What discipline did Winkelmann create?"

    "answer": "archaeology and first"
    "context" : "In Afghanistan, the mujahideen's victory against the Soviet Union in the 1980s did not lead to justice and prosperity, due to a vicious and destructive civil war between political and tribal warlords, making Afghanistan one of the poorest countries on earth. In 1992, the Democratic Republic of Afghanistan ruled by communist forces collapsed, and democratic Islamist elements of mujahdeen founded the Islamic State of Afghanistan. In 1996, a more conservative and anti-democratic Islamist movement known as the Taliban rose to power, defeated most of the warlords and took over roughly 80% of Afghanistan.",
    "question" : "Who ruled the duchy of Normandy"

    "answer": "Richard I"

Metrics used:

Observations are documented here.