Study notes and small examples on NLP: Transformer architecture, text vectorisation in TensorFlow, and Hugging Face pipelines served with Gradio.
This repository is a learning log rather than a single project. It combines annotated lecture screenshots on Transformers (including their use in robotics), short notes on LLMs, and two runnable examples: text preprocessing with Keras TextVectorization, and a named entity recognition demo built on a fine-tuned RoBERTa model and exposed through a Gradio web interface. Code comments are written in Turkish.
| Path | Description |
|---|---|
cs25_transformers/ |
Screenshots from Transformers lectures: attention and self-attention, positional encoding, encoder/decoder layers, BERT, GPT-2/GPT-3, chain-of-thought prompting, RNN/LSTM limitations, and Transformers for robotics (RT-1, offline RL) |
with_tensorflow/nlp_tf_1.py |
Text standardisation, tokenisation and vectorisation with Keras TextVectorization, including custom standardise and split functions |
with_hugging_face/nlp_hf_1.py |
NER with the Tirendaz/roberta-base-NER pipeline and a Gradio Interface with highlighted entities |
with_hugging_face/*.png |
Notes on classification, generation, fine-tuning and multilingual models with Hugging Face |
llm/ |
Short notes on open LLMs (Mistral 7B, Llama) and an overview image of LLM types |
nlp_info |
Background notes on the shift from RNNs to Transformers, BERT vs GPT, and common NLP libraries |
- Python, TensorFlow / Keras
- Hugging Face Transformers, Gradio
pip install tensorflow transformers gradio
python with_tensorflow/nlp_tf_1.py
python with_hugging_face/nlp_hf_1.py # downloads the model and launches a Gradio demo with a share link