An open API service indexing awesome lists of open source software.

https://github.com/azlinrusnan/transformers_and_generative_ai


https://github.com/azlinrusnan/transformers_and_generative_ai

Last synced: 11 days ago
JSON representation

Awesome Lists containing this project

README

          

# Transformers_and_Generative_AI

๐Ÿค– Understanding BERT and GPT in the Simplest Way
Both BERT and GPT are language models, which means theyโ€™re like smart brains trained to understand and work with human language.

## ๐Ÿง  BERT โ€“ Bidirectional Encoder Representations from Transformers
Think of BERT as a student who carefully reads a sentence from both directions โ€“ left to right AND right to left โ€“ to fully understand its meaning.

Example:

Sentence: "Ali ate rice at a delicious restaurant."

If you ask BERT: โ€œWhat did Ali eat?โ€
BERT looks at the entire sentence, not just from the start. It understands context from both sides, so its answers are more accurate.

BERT is great for:

- Understanding sentence meaning

- Question answering

- Extracting key info from text

- Filling in missing words

๐ŸŸข BERT = Strong understanding (two-way thinking)

## ๐Ÿง  GPT โ€“ Generative Pre-trained Transformer
GPT is like a creative writer. Itโ€™s really good at continuing sentences, writing stories, or even drafting emails.

Example:

You write: "I love eating nasi lemak because..."

GPT will continue:

"...it tastes amazing and reminds me of family breakfasts."

GPT reads only from left to right, but itโ€™s very good at predicting and generating natural-sounding text.

GPT is great for:

- Writing content

- Sentence completion

- Chatbots

- Translation

๐ŸŸ  GPT = Great at writing and generating text (one-way thinking)

๐Ÿ” **Summary of the Differences**
>
> | Feature | BERT | GPT |
> |-----------------|-----------------------------|-----------------------------|
> | Reading style | Both directions | Left to right only |
> | Main purpose | Understanding text | Generating text |
> | Example tasks | Question answering, filling blanks | Story writing, text completion |
> | Analogy | Focused reader | Creative writer |

### To summarise:

- BERT is like someone who reads carefully to understand.
- GPT is like someone who writes naturally to continue your thoughts.

ps: still learning, will continue on LLM and more!