Mert Özen Further With Every Line

Blog

Mert Özen's blog posts on software development, backend, frontend, and DevOps.

Series
16 posts found #ollama
The LLM Context Window: What the Model Remembers and What It Silently Cuts
Artificial Intelligence PART 04

The LLM Context Window: What the Model Remembers and What It Silently Cuts

LLM APIs are stateless; you send the chat history with every request and every turn grows the bill. Even though Gemma 3 supports 128K tokens, Ollama allocates a 4096-token window by default and cuts a 4498-token prompt down to 2051 tokens without any error. We set num_ctx in C# and TypeScript and try managing history with trimming and summarizing, using real output.

6 Nov 2026 11 min 9
Tokens and Tokenizers in LLMs: Why Does Turkish Take More Tokens?
Artificial Intelligence PART 03

Tokens and Tokenizers in LLMs: Why Does Turkish Take More Tokens?

What is a token, and how do BPE and SentencePiece split text? Using Ollama's prompt_eval_count counter we measure the same sentence in Turkish and English with the gemma3:4b and qwen3:4b tokenizers, then see with real numbers how many tokens numbers, GUIDs, JSON and code take, the hidden tokens of the chat template and how tokens affect cost, limits and speed.

6 Nov 2026 9 min 9
Your First LLM Request: The First Answer with Ollama, C# and TypeScript
Artificial Intelligence PART 02

Your First LLM Request: The First Answer with Ollama, C# and TypeScript

We get to know Ollama, look at models with ollama list and ollama ps, and send the first request to the /api/chat endpoint with curl. Then we repeat it in C# with Microsoft.Extensions.AI and OllamaSharp and in TypeScript with the ollama package, and use real output to read the token counts, the nanosecond durations and why the first request is slow.

6 Nov 2026 8 min 11
What Is an LLM? Large Language Models from a Developer's Point of View
Artificial Intelligence PART 01

What Is an LLM? Large Language Models from a Developer's Point of View

A large language model is a function that predicts the next token. We build that loop token by token with a local gemma3:4b, look at training versus inference, base versus instruct, open-weight versus closed and local versus cloud, and use real outputs to see where the model goes wrong on dates, arithmetic and order questions.

6 Nov 2026 9 min 13
Blog Map