No. 52
2026-09-09
yapay zeka nabzı — ham değil, demlenmişthe AI pulse — brewed, not raw
 VİDEOVIDEO
Türkçe altyazıTurkish subtitles
  1. Günümüzde herkes yerel LLM çalıştırmaya çalışıyor gibi görünüyor.These days, it seems like everyone is looking to run local LLMs.
  2. Ve bu doğru, GPT tarzı modelleri yapay zeka asistanları, kod editörleri ve daha fazlası olarak kendi kişisel bilgisayarınızda hatta bir dizüstü bilgisayarda bile çalıştırabilirsiniz.And that's right, you can actually run GPT-style models as AI assistants, code editors, and more from your own personal computer or even a laptop.
  3. Ve insanların bunu yapma isteklerinin birçok nedeni var.And there's a lot of reasons why people are looking to do this.
  4. Öncelikle, LLM'ler oldukça pahalı olabilir.First off, LLM's can get quite expensive.
  5. Bu yüzden onları kendiniz çalıştırmak çok para tasarrufu sağlayabilir.So running them yourself can save a lot money.
  6. Aynı zamanda, bir yapay zeka hizmetinden kesinti yaşamış veya hatta hız sınırlamasına takılmış olabilirsiniz.At the same time, you might've experienced getting an outage from an AI service or even getting rate-limited.
  7. Ve bu durum oldukça can sıkıcı olabilir.And that can be quite tricky.
  8. Ancak yerel LLM kullanmayı kişisel olarak tercih etmemin en büyük nedeni, kendi makinenizde çalıştırmanın sağladığı gizlilik ve güvenliktir.But the last part and the biggest reason that personally I like to use local LLMs is because the privacy and security that you get running it on your own machine.
  9. Ancak yerel LLM çalıştırmaktan bahsettiğimizde, bunu makinenizde yapmanızı sağlayan iki tanınmış araç hakkında genellikle duyarım: llama.cpp ve vLLM adlı başka bir araç.But when we talk about running local LLMs, you typically will hear about two well-known tools that can allow you to do this on your machine, llama.CPP and another tool called vLLM.
  10. Ve her ikisi de farklı kullanım senaryolarını hedefler.And both of them target different types of use cases.
  11. Ama endişelenme, yine de RAG yani geri getirme destekli üretim yapabilirsin.But don't worry, you can still do RAG or retrieval augmented generation.
  12. Yapay zeka ajanları inşa edebilir, hatta onları yapay zeka kod asistanı olarak bile kullanabilirsin.You can build AI agents, even use them as AI code assistants.
  13. Ama bu videonun sonunda bu iki araç arasında seçim yapmanın nasıl ve nedenini öğreneceksin.But by the end of this video, you'll learn how and why to pick between these two tools.
  14. Seni birkaç yıl geriye, Llama 2 adlı belirli bir modelin yayınlanmasına götürmek istiyorum.I wanna take us a few years back to the release of a particular model called Llama 2.
  15. Llama 2 Meta'dan geldi ve büyük bir dil modeliydi, ancak çok benzersizdi çünkü ticari açıdan başarılı olan ilk açık ağırlıklı model yayınlarından biriydi.And Llama 2 came from Meta and it was a large language model, but it was very unique because it was one of the first commercially successful open weight model releases.
  16. Çünkü elbette ChatGPT ve diğer servisler zaten API olarak kullanabileceğim veya ücretini ödeyebileceğim şekilde etraftaydı, ama Llama modelini Hugging Face veya GitHub'a gidip gerçekten indirebileceğim bir modeldi.Because, sure, ChatGPT and other services were already around that I could use as an API or pay for, but the Llama model was a model that I can go to, Hugging Face or GitHub and actually download this model.
  17. Ve bu modeli kaydedip kendi makinemde çalıştırmayı deneyebilirdim.And I could save that model and try to run it on my own machine.
  18. Ama küçük bir sorun vardı.But there was one small problem.
  19. Muhtemelen kendi donanımında çalıştıramazdın.You probably actually couldn't run it in your own hardware.
  20. Çünkü bu belirli model birkaç farklı boyutta yayınlanmıştı.That's because this specific model was released in a few different sizes.
  21. Böylece 7 milyar, 13 milyar ve en büyük olanı 70 milyar parametreye sahip modelleri elde ettik; bunların çalıştırılması, günümüzde ya pahalıya mal olan ya da bazı durumlarda bulması zor olan büyük bir grafik kartı gerektiren oldukça iddialı bir kurulum istiyordu.So we got 7 billion parameters, 13 billion parameters and the biggest at 70 billion parameters which required quite a hefty setup needing a big graphics card which these days is either expensive to get a hold of or in some cases hard to find.
  22. Bu nedenle, maliyeti yüksek olabilecek daha fazla donanım hızlandırıcısı ve daha büyük GPU satın almak yerine, llama.cpp'nin temel fikri, modelleri daha küçük donanımlarda erişilebilir kılmaktır.So instead of purchasing more hardware accelerators and bigger GPUs that can be quite costly, the idea with ;lama.CPP is to make models accessible on smaller pieces of hardware.
  23. Birkaç optimizasyon sayesinde, açık kaynaklı depolardan indirip kendi bilgisayarınızda çalıştırabileceğiniz modeller bunlardır.Models that you can download from open source repositories and run on your own computer because of a few optimizations.
  24. Bu optimizasyonlardan biri de kuantizasyondur.So one of these is quantization.
  25. Bunu nasıl çalıştığını gösteren bir örnek vereyim, çünkü pi sayısını düşündüğümüzde, öyle değil mi?And let me give you an example of how this works because when we think about pi, right?
  26. Aslında 3.141529'dur ve böyle devam eder.It's actually 3.141529 and it goes on.
  27. Geri kalanını bilmiyorum, ama onu basitleştirdiğimiz şekli 3.14'tür.I don't know the rest of it, but the way that we simplify it is 3.14.
  28. Büyük dil modellerinden söz ederken de benzer bir teori geçerlidir, çünkü bir GPU içinde çok farklı hesaplama yapıyorsunuz ve ağırlıklar bazen daha yüksek hassasiyette saklanıyor.And the same kind of theory exists when we're talking about large language models because you're computing a lot of different calculations within a GPU and the weights are stored at sometimes higher precision.
  29. Bu örnekte, bu taban, float, 16 hassasiyeti olabilir.So for this example, that could be base, float, 16 precision.
  30. Ve bunu kuantize ederek veya özü itibarıyla daha küçük bir değere sıkıştırarak, tamsayı sekiz veya tamsayı dörde düşebiliriz.And by quantizing it or essentially compressing it down to a smaller value, we can go to integer eight or integer four.
  31. Böylece çok daha büyük bir modeli çok daha küçük bir boyuta indirgeriz.And so we take a much bigger model and get it to a much smaller size.
  32. Bu sayede, bir GPU'nun kapasite gereksinimlerini, örneğin 30 gigabaytlık depolama alanından, bu modeli verimli bir şekilde çalıştırmak için gereken 4 gigabaytlık VRAM'e kadar düşürebiliriz.And this can take our capacity requirements for a GPU from, say, for example, 30 gigabytes of storage down to, say for example four gigabytes of VRAM needed to run this model efficiently.
  33. Ayrıca, model ağırlıklarını ve ilişkili meta verileri tek bir birimde birleştirmek gibi başka optimizasyonlar da vardır.Now, there's also other optimizations such as combining the models weights and associated metadata into one unit.
  34. Şimdi burada bir sinir ağırlığının ağırlıklarını düşünelim, öyle değil mi?So let's think of the weights here, right, of a neural network.
  35. Bunlar, bu modeli çalıştırmak için indirilebilecek güvenli tensörler veya benzeri dosyalar olabilir ve bunları, model yapılandırması ve tüm bu farklı dosyalarla birlikte tek bir .gguf dosyasında birleştiriyoruz. Bu da bize farklı modelleri kolayca değiştirmemizi sağlarSo these could be like the safe tensors or whatever you might be downloading in order to run this model and combining this with the tokenizer with the models configuration and all of these different files into one singular .gguf file. So this allows us to easily swap in different models
  36. ve tüm bu farklı yetenekleri tek bir .gguf dosyasından denememizi mümkün kılar; bu, llama.cpp'nin getirdiği büyük bir yeniliktir.and be able to try out all of rhese different capabilities from a single .gguf file and so this is a big innovation that llama.CPP brought.
  37. Son olarak, çıkarımı sadece GPU'larda değil, CPU'da da çalıştırma yeteneğine de sahibiz; bu çok önemli çünkü birçok kişisel bilgisayarda GPU bulunmuyor.And finally, we also have the ability to run inference on not just GPUs, but also CPU as well, which is really important because a lot of personal computers just don't have a GPU.
  38. Ve tüm bu optimizasyonlar gerçekten karşılığını verdi, çünkü aniden LLM'leri bir dizüstü bilgisayarda veya Raspberry Pi'de çalıştırabildiniz ve LLM'leri çevrimdışı olarak çalıştırabildiniz. Fabrikaları veya IoT ortamlarını düşünün.And all of these optimizations really paid off because suddenly you could run LLMs on a laptop or a Raspberry Pi and you could runs LLM's offline. So think about factories or IOT environments.
  39. Ve bu tüm llama.cpp projesi, dünya genelinde geliştiriciler tarafından benimsenen Ollama ve LM Studio gibi diğer araçlara yol açtı.And this whole llama.CPP project led to other tools like Ollama and LM Studio, which are well adopted by developers around the world.
  40. Ama evet, tek bir modeli yerel olarak çalıştırmak harika, ama RAG için gömme üretmek, kod ajanı olarak görev yapmak veya araç kullanımı yapmak gibi farklı türde modellere sahip olduğumuzda ne olur, öyle değil mi?But sure, running one model locally is great, but what happens when we have different types of models for generating embeddings for RAG or for acting as a coding agent or doing tool usage, right?
  41. Ya da bu modelleri kullanan 10 kullanıcı olabilir.Or maybe we have 10 users that are all using these models or.
  42. 10.000 kullanıcı, öyle değil mi?10,000, right?
  43. Ya da iş yüklerini donanımlar arasında ve bölgeler arasında dağıtmakla ünlü olan bir sanal makine veya Kubernetes üzerinde yüksek performanslı bir bilgisayara dağıtıyorsunuz.Or maybe you're deploying to a high performance computer on a VM or Kubernetes, which is famous for distributing workloads across hardware and regions.
  44. vLLM, yerel LLM fikrini bir üst seviyeye taşıyor.So what vLLM does is takes the local LLM idea to another level.
  45. Nvidia GPU'ları, Google TPU'ları, AMD, Intel ve diğer olası donanımlar gibi donanım hızlandırıcılarıyla ölçek düzeyinde verimliliğe odaklanıyor.So it focuses on efficiency at scale with hardware accelerators like Nvidia's GPUs, Google's TPUs, you've got AMD, you got Intel, and whatever else it might be.
  46. Bu modelleri çalıştırmak için kullanabileceğiniz çok geniş bir donanım yığınına sahip olmak.To have this very broad hardware stack that you can use to run these models with.
  47. Ve ortada, tıpkı llama.cpp gibi, vLLM bir LLM motoru olarak görev yapıyor.And in the middle, just like llama.CPP, vLLM acts as an LLM engine.
  48. Böylece modellerin metni işleyebilmesini, ses, görsel ve video üretebilmesini sağlıyor.And so it allows you to run models to be able to process text, to be to do audio, to be be able do images and video.
  49. Neredeyse tüm önde gelen model üreticilerinin bu farklı model formatlarının tamamı.So all of these different types of model formats from almost every leading model manufacturer out there.
  50. Yani tüm açık kaynak laboratuvarları.So all the open source labs.
  51. Genellikle vLLM gibi bir motor için ilk gün desteğiyle gelirler, ancak sadece geniş donanım ve model uyumluluğuna sahip olmakla kalmıyoruz, vLLM'de örneğin gruplamayı (batching) işlemek için birçok iyileştirme de var.Typically come with this day one support for an engine like vLLM, but not only do we have this broad set of hardware compatibility and model compatibility, but there's a lot of improvements in vLLM in order to handle, for example, batching.
  52. Gruplama (batching) nasıl çalışır?So what does batching look like?
  53. Diyelim ki her kullanıcıdan sürekli gelen 10 istek var, öyle değil mi?Well, let's say we have those 10 requests that come in continuously per user, right?
  54. Gerçek isteği göstermek yerine, ızgarada pişen pankekleri göstereceğim çünkü diyelim ki altısını pişiriyoruz ama farklı zamanlarda bitiyorlar.And instead of showing you the actual request, I'm going to show you pancakes on a griddle because let's say we're cooking six of these but they're going to be finished at different times.
  55. Belki bu bitti, bu bitti, bu da bitti.So maybe this one is done, this one has done, this one was done.
  56. Izgaraya yeni pankek koymadan önce hepsinin bitmesini beklemek istemiyorum, çünkü çok fazla pankek pişiriyorsam.And I don't wanna wait if I'm having to cook a lot of pancakes for all of these to be finished before I put on new pancakes on the grill.
  57. Bu, vLLM'in sürekli gruplama (continuous batching) olarak adlandırdığı şeyin bir örneğidir.So that's an example of what vLLM calls continuous batching.
  58. Verimli KV önbellek (KV cache) kullanımı için diğer optimizasyonlar da var.Now there's also other optimizations for efficient KV cache usage.
  59. Size bir örnek vereyim.So let me give you an example.
  60. Bir kullanıcının isteği bir LLM'e geldiğinde, aslında girdi tokenlarını büyük dil modelinin her katmanından geçiriyoruz.So when a user's request comes into an LLM, what actually happens is we take those input tokens and run them through each of the layers of the large language model.
  61. Ve bu süreçte, token token metin üretirken, aynı zamanda kaynak metin üzerinde yaptığımız hesaplamalar nedeniyle KV önbelleği biriktiriyoruz.And as this happens, we're generating more text token by token, but at the same time accumulating what's known as KV cache because of these calculations that we're doing on the original source text.
  62. Ve bana inanın, bu durum oldukça büyük boyutlara ulaşabilir.And trust me, this can get quite large.
  63. Genellikle, istemlerin modele işlenmesinden istenen çıktıya ulaşılana kadar onlarca gigabaytlık alanın kullanıldığını görüyoruz.We typically see, you know, dozens of gigabytes being used for the passage of prompts through a model to finally get to a response that is the desired output.
  64. Mesele şu ki, donanım hızlandırıcılarının sınırlı miktarda alanı var.And the thing is, with hardware accelerators only having limited amounts of space.
  65. Mesela NVIDIA'nın A100 GPU'suna bakarsak, bunu birkaç farklı bölüme ayırıyoruz.Well, if we take a A100 GPU, for example, from NVIDIA, we actually split this up into a few different sections.
  66. Çoğu alan, genellikle belleğe yüklenen model ağırlıklarıyla dolu oluyor.The majority is typically going to be the model weights itself being loaded into memory.
  67. Ancak modelin geri kalanının büyük kısmı aslında bu KV önbelleğidir; böylece aynı kullanıcı aynı isteği birden fazla kez yaparsa, tüm istemi yeniden hesaplamak zorunda kalmayız.But the vast majority of the rest of the model is actually this KV cache, so that if we have the same user make the same request multiple times, we don't have to recalculate that entire prompt itself.
  68. Bu yüzden vLLM'de, bunun gerçekleşmesini sağlamak için sayfalı dikkat (paged attention) olarak bilinen bir teknikle doğru önbellekleme konusunda birçok optimizasyon var.So there is a lot of optimizations with vLLM on proper caching with a technique known as paged attention in order to make this happen.
  69. Mesele şu ki, llama.CPP ve vLLM nicelleştirmeden (quantization) büyük ölçüde faydalanırken, vLLM'in getirdiği ve spekülatörler (speculators) olarak bilinen başka bir fayda daha var.But the thing is, although llama.CPP and vLLM greatly benefit from quantization, there's another benefit that vLLM, also brings in, which is known as speculators.
  70. Size bir örnek vereyim.So let me give you an example.
  71. Diyelim ki, oldukça iyi performans gösteren daha küçük bir modelimiz var ve yanıtın birkaç farklı bölümünü üretiyor; ardından bu yanıtın kullanıcıya geri verilecek olanla tam olarak eşleştiğini doğrulamak için daha büyük bir model kullanmak istiyoruz.Let's say we have a smaller model, which performs quite well, generate a few different parts of a response, and we want to use a larger model to verify that that response is exactly what we want to give back to the user.
  72. Buna spekülatörlerin kullanımı denir.This is what's known as using speculators.
  73. Bu, ayrıca çıkarım sırasında bir yapay zeka modeli kullanırken ön-doldurma (pre-fill) ve çözme (decode) aşamalarını ayırmak için LLM-D adlı açık kaynaklı bir projeyle birlikte ayrıştırma (disaggregation) tekniğiyle de birleştirilebilir.And it can also be combined with a technique known as disaggregation with a open source project called LLM-D in order to split up the multiple stages of pre-fill and decode when you're using an AI model for inference.
  74. RAG veya yapay zeka ajanları geliştiren son kullanıcı olarak endişelenmeyin, çünkü bu iki yapay zeka ajanı da DeepSeek, Quinn veya Llama gibi modelleri, hatta çok modlu modelleri bile OpenAI uyumlu uç noktalar üzerinden sunabilir.As an end user building RAG or AI agents, don't worry, because both of these AI agents can serve models like DeepSeek or Quinn or Llama, even multimodal models using open AI compatible endpoints.
  75. Yani kod tabanınızda yapılandırmayı çok değiştirmenize gerek yok, çünkü yine aynı tamamlama veya yanıt API'sini kullanıyorsunuz, bu da gerçekten harika.So you don't have to change much of the configuration in your actual code base because you're still using the same completions or responses API, which is really nice.
  76. Bu, temelde ChatGPT tarzı API'lerin doğrudan yerleşik bir ikamesidir.It's essentially a drop in replacement for a ChatGPT style APIs.
  77. Genellikle insanlar kolay test için ücretli bir API ile başlar, faturaların arttığını görür ve ardından daha büyük bir ortamda VLLM veya llama.CPP'ye geçer.And typically what folks will do is they start with a paid API for easy testing, see those bills start to rise and then switch over to either VLLM or llama.CPP on a bigger environment.
  78. Mesele şu ki, bunlar farklı kullanım senaryoları için tasarlanmıştır; çünkü llama.CPP ile genellikle tüketici donanımıyla çalışırsınız, vLLM ile ise bunu üretim iş yüklerinde çalıştırırsınız, ancak hedef aynı kalır: yapay zekanızı yerelde çalıştırmak.The thing is they're made for different use cases because for llama.CPP you're typically working with consumer hardware, and with vLLM, you're going to be running this in production workloads, but the goal remains the same running your own AI locally.
  79. Şimdi merak ediyorum, yerel bir yapay zeka modelini denediniz mi veya şu anda deniyor musunuz?Now, I'm curious, have you tried or you're currently trying a local AI model?
  80. Sizin için neyin işe yaradığını yorum bölümünde bana bildirin.Let me know in the comment section what's worked for you.
  81. Ve bugün bir şeyler öğrendiysen, algoritmayı hacklemek için o beğeni butonuna basmayı unutma.And if you learned something today, please be sure to smash that like button to hack the algorithm.
  82. Ve her zamanki gibi izlediğiniz için teşekkürler.And as always, thank you for watching.
  83. Bir sonraki videoda görüşmek üzere.We'll see you in the next one.
Altyazı bilgisayarımda üretildi ve videoyla ilerler; bir satıra tıklayın, o ana atlasın.Subtitles generated on my computer; they follow the video — click a line to jump there.

Llama.cpp vs vLLM: Hangi Yerel LLM Motoru Gerçekten Ölçekleniyor?Llama.cpp vs vLLM: Which Local LLM Engine Actually Scales?

Llama.cpp ve vLLM arasındaki temel farkları ve yerel LLM çalıştırmada ölçeklenebilirlik açısından hangisinin daha uygun olduğunu karşılaştırıyor.It compares the fundamental differences between Llama.cpp and vLLM and which is more suitable in terms of scalability for running local LLMs.

Bu video youtube.com üzerinde yayımlandı; buradaki oynatıcı YouTube’undur. Türkçe özet ve altyazı AiPulse için hazırlanmıştır.This video is published on youtube.com; the player here is YouTube’s. The Turkish summary and subtitles are prepared for AiPulse.
YouTube’da izleWatch on YouTube    AI Kritik →AI Critique →
Bültene dönBack to the issue