A collection of hands-on experiments, explorations, and implementations covering fundamental concepts and advanced techniques in Large Language Models, Natural Language Processing, and AI Agents. This repository documents my learning journey through various LLM frameworks and methodologies.
Screenshot showing the first successful model training run - BERT fine-tuning on Yelp review dataset achieving 57.2% accuracy after 3 epochs
This is an experimental workspace containing Jupyter notebooks and code implementations exploring:
- Foundation Concepts: Attention mechanisms, causal language modeling
- Model Training: Fine-tuning with transformers, LoRA adaptations
- Agent Frameworks: LangGraph, LlamaIndex, Smolagents
- Multimodal AI: Vision agents, image understanding
- Local LLM Integration: Ollama server setup and optimization
- Tool Development: Custom tools for AI agents
LLM-s/
βββ π Core Notebooks (Root)
β βββ LLM's_first_train.ipynb # First BERT training experiment
β βββ LLM's_chp1.ipynb # LLM fundamentals chapter 1
β βββ Attention_Mechanisms_chp_2.ipynb # Attention mechanisms deep dive
β βββ Causal_language_modeling.ipynb # English version
β βββ Causal_language_modeling-TR.ipynb # Turkish version
β βββ ollama_server_cloudflare.ipynb # Ollama + Cloudflare setup
β βββ tools.ipynb # Tool development experiments
β
βββ π€ agents/ # AI Agent experiments
β βββ HG_AI_agents_1.ipynb # HuggingFace agents basics
β βββ Multiple_Agents.ipynb # Multi-agent systems
β βββ Multiple_tools.ipynb # Multi-tool orchestration
β βββ Ollama_with_xterm.ipynb # Terminal-based Ollama
β βββ Tools_local.ipynb # Local tool development
β βββ Vision_Agents_with_smolagents.ipynb # Vision capabilities
β βββ saved_map.png # Agent execution visualization
β
βββ π fine_tune/ # Model fine-tuning
β βββ Fine_tune_with_lora.ipynb # LoRA parameter-efficient tuning
β
βββ π nlp_workspace/ # NLP experiments
β βββ Nlp-LLM_works_1.ipynb # NLP fundamentals
β
βββ π notebooks/unit2/ # Structured course work
β βββ Langraph/ # LangGraph implementations
β βββ LlamaIndex/ # LlamaIndex experiments
β βββ smolagents/ # Smolagents tutorials
β
βββ π Dataset Files
βββ AROG-TR.txt, AROG-ENG-SUBTITLE.txt # Turkish comedy scripts
βββ GORA-TR.txt, Gora-ENG.txt # Sci-fi comedy scripts
βββ yahsi_bati_eng_sub-utf.txt # Western comedy subtitles
βββ Live.csv # Live data experiments
- PyTorch: Deep learning framework for model training
- Transformers (Hugging Face): Pre-trained models and fine-tuning
- Datasets (HF): Dataset loading and processing
- Evaluate (HF): Model evaluation metrics
- LangChain: Building applications with LLMs
- LangGraph: Building stateful multi-actor applications
- LlamaIndex: Data framework for LLM applications
- Smolagents: Hugging Face's simple agent framework
- Ollama: Local LLM inference server
- Cloudflare Tunnel: Secure remote access to local services
- LiteLLM: Universal LLM API wrapper
- LoRA (Low-Rank Adaptation): Parameter-efficient fine-tuning
- Weights & Biases (wandb): Experiment tracking and visualization
- PEFT: Parameter-Efficient Fine-Tuning library
- Jupyter Notebook/Lab: Interactive development environment
- tqdm: Progress bars for training loops
- numpy, pandas: Data manipulation
- Pillow: Image processing (for vision agents)
- Deep dive into self-attention
- Multi-head attention implementations
- Positional encodings
- Attention visualization
- Autoregressive language generation
- GPT-style training
- Next-token prediction
- Available in English and Turkish versions
- BERT fine-tuning on Yelp reviews (5-class sentiment)
- Training with Hugging Face Trainer API
- Native PyTorch training loop implementation
- Weights & Biases integration
- Results: 60.8% accuracy (3 epochs), Dataset: 1,000 training samples
- Multimodal agent capabilities
- Image understanding with LLMs
- Tool integration for vision tasks
- Agent-to-agent communication
- Collaborative task solving
- Agent orchestration patterns
- Custom tool creation
- Tool calling mechanisms
- Local vs cloud tool integration
- Local Ollama installation and configuration
- Cloudflare Tunnel setup for remote access
- Model management (pulling, running)
- API integration examples
- Performance optimization
- Parameter-efficient training
- Low-rank matrix decomposition
- Memory-efficient fine-tuning
- Adapter-based transfer learning
- Building Blocks of LangGraph: Core concepts and components
- Stateful graph-based agent workflows
- Conditional branching in agent logic
- LLMs Integration: Connecting various LLM providers
- Components: Indexes, retrievers, query engines
- Agents: ReAct agents with LlamaIndex
- Workflows: Complex multi-step processes
- Code Agents: Agents that write and execute code
- Multiagent Systems: Collaborative agent networks
- Retrieval Agents: RAG-based agents
- Tool Calling: Advanced tool integration
- Tools: Custom tool development
- β Successfully fine-tuned BERT for sentiment classification
- β Implemented both Trainer API and native PyTorch training loops
- β Integrated Weights & Biases for experiment tracking
- β Explored LoRA for parameter-efficient fine-tuning
- β Built multi-agent systems with coordinated workflows
- β Created custom tools for specialized tasks
- β Implemented vision-capable agents
- β Explored three major frameworks: LangGraph, LlamaIndex, Smolagents
- β Set up local Ollama server for privacy-preserving LLM inference
- β Configured Cloudflare tunneling for remote access
- β Integrated multiple LLM providers through LiteLLM
- β Deep understanding of attention mechanisms
- β Mastered causal language modeling principles
- β Applied low-rank adaptation techniques
# Python 3.8+
python --version
# Install core dependencies
pip install torch transformers datasets evaluate
pip install langchain llamaindex smolagents
pip install jupyter notebook
pip install wandb tqdm numpy pandas-
Clone the repository:
git clone https://github.com/baloglu321/LLM-s.git cd LLM-s -
Install dependencies (create
requirements.txtas needed) -
Launch Jupyter:
jupyter notebook
-
Start with:
LLM's_chp1.ipynbfor fundamentalsLLM's_first_train.ipynbfor hands-on training- Explore
agents/for agent development
Follow instructions in ollama_server_cloudflare.ipynb for:
- Local Ollama installation
- Model downloads
- Cloudflare Tunnel configuration
| Epoch | Training Loss | Validation Loss | Accuracy |
|---|---|---|---|
| 1 | No log | 1.213 | 46.0% |
| 2 | No log | 1.014 | 55.7% |
| 3 | No log | 0.976 | 60.8% |
Model: google-bert/bert-base-cased
Dataset: Yelp Review Full (5-star ratings)
Training Samples: 1,000
Evaluation Samples: 1,000
Training Time: ~40 minutes (3 epochs)
Hardware: CUDA-enabled GPU
- Web search integration
- File processing utilities
- Image analysis capabilities
- Calculator and math operations
- ReAct (Reasoning + Acting) agents
- Multi-agent collaboration systems
- Vision-augmented agents
- Code-generating agents
- Full model fine-tuning
- LoRA adaptation
- Parameter-efficient methods
- Implement RAG (Retrieval-Augmented Generation)
- Explore reinforcement learning from human feedback (RLHF)
- Build production-ready agent systems
- Experiment with larger models (7B+)
- Create custom multimodal models
- Implement advanced prompting techniques
This is a personal learning repository, but suggestions and tips are welcome! Feel free to open issues or reach out with:
- Best practices for LLM experimentation
- Recommended resources
- Bug reports in notebooks
- Optimization suggestions
- Hugging Face NLP Course
- DeepLearning.AI courses
- LangChain Academy
- LlamaIndex tutorials
- "Attention is All You Need" (Vaswani et al.)
- "LoRA: Low-Rank Adaptation of Large Language Models"
- "ReAct: Synergizing Reasoning and Acting in Language Models"
This repository is for educational and experimental purposes. Feel free to use the code for learning.
- Hugging Face: For transformers, datasets, and agent frameworks
- LangChain Team: For the comprehensive agent framework
- LlamaIndex Team: For data-centric LLM tools
- Ollama: For easy local LLM deployment
- Weights & Biases: For experiment tracking
Note: This is an active learning repository. Notebooks may contain experimental code, incomplete implementations, and ongoing research. Use as reference for learning rather than production deployment.
Last Updated: January 2026
Status: π’ Active Learning & Experimentation
