<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anil Guven on Medium]]></title>
        <description><![CDATA[Stories by Anil Guven on Medium]]></description>
        <link>https://medium.com/@anilguven1055?source=rss-3a6f2bd44b8d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LxXClFXm1SfDTD3x.jpg</url>
            <title>Stories by Anil Guven on Medium</title>
            <link>https://medium.com/@anilguven1055?source=rss-3a6f2bd44b8d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 18:51:14 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anilguven1055/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Citywise: Explore the World! — Android Trivia Game]]></title>
            <link>https://medium.com/@anilguven1055/citywise-explore-the-world-android-trivia-game-346e49d672a5?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/346e49d672a5</guid>
            <category><![CDATA[mobile-games]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[travel]]></category>
            <category><![CDATA[trivia]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Fri, 16 Jan 2026 16:13:15 GMT</pubDate>
            <atom:updated>2026-01-16T16:13:15.725Z</atom:updated>
            <content:encoded><![CDATA[<h3>Citywise: Explore the World! — Android Trivia Game</h3><p>Challenge your knowledge and explore the world in a fun and engaging way. Whether you’re a geography enthusiast or just looking for a fun brain teaser, Citywise offers a captivating experience for everyone.</p><p>Welcome to CityWise! <br>Jump into the adventure with our first release:<br>* Guess the city from the photo or clue and collect points.<br>* Discover new places and fun facts with the “City Guide” and “Story Guide”.<br>* Climb the leaderboards to prove you’re the top traveler.<br>* Unlock special achievements as you progress through the game.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FShbvEZSFNL4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DShbvEZSFNL4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FShbvEZSFNL4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/3a152a1de5db13344d7bf3fc0c4e4d17/href">https://medium.com/media/3a152a1de5db13344d7bf3fc0c4e4d17/href</a></iframe><h4>Key Features:</h4><p><strong>Two Exciting Game Modes:</strong><br>* Photo Mode: Guess the city from a stunning, high-quality image.<br>* Clue Mode: Use intriguing clues to deduce the city’s name.</p><p><strong>Compete and Climb: </strong>Rise through the ranks on our global and local leaderboards. Show off your skills and see how you stack up against players from around the world!</p><p><strong>Earn Achievements:</strong> Unlock a wide variety of achievements as you progress. From your first correct answer to becoming a geography expert, every milestone is celebrated.</p><p><strong>Build Your Collection: </strong>Every city you correctly guess is added to your personal “City Guide” and “Story Guide”. Unlock fascinating details and beautiful photos for each city in your collection.</p><p><strong>Visit the In-Game Market:</strong><br><em>1- Use Your Wits to Earn Coins:</em> Earn coins by answering correctly and unlocking achievements.<br><em>2- Strategic Boosters: </em>Spend your coins on helpful boosters like Hints, 50/50, or Skip Question to get you through tough levels.<br><em>3- Coin Packs:</em> Need a quick boost? You can also purchase coin packs directly from the market to load up on boosters and special items.</p><p><strong>Play Your Way: </strong>Sign in with Google, or email to save your progress, or jump right in as a guest to start playing immediately.</p><p><strong>Beautiful &amp; Modern Design: </strong>Enjoy a sleek, user-friendly interface with stunning visuals and smooth animations, available in both light and dark modes.</p><p>Download Citywise now and start your journey to becoming a city expert!</p><p><strong><em>Download and support:</em></strong> <a href="https://play.google.com/store/apps/details?id=com.citywise.app">https://play.google.com/store/apps/details?id=com.citywise.app</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p5lDgUozj2EkWagDuepMAw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=346e49d672a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Compression Techniques for Large Language Models — Learn Together — Part 5]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/compression-techniques-for-large-language-models-learn-together-part-5-8c9ae13b0c04?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/600/1*itdc9Dq4iL1fZ-UbPlinUQ.png" width="600"></a></p><p class="medium-feed-snippet">Large Language Model (LLM) compression techniques have been developed to reduce the size of complex and large-scale models, reduce&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/compression-techniques-for-large-language-models-learn-together-part-5-8c9ae13b0c04?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/compression-techniques-for-large-language-models-learn-together-part-5-8c9ae13b0c04?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c9ae13b0c04</guid>
            <category><![CDATA[quantization]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[fine-tuning]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 20:59:53 GMT</pubDate>
            <atom:updated>2025-04-19T20:59:53.371Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Most Common Topic: Fine-tuning Large Language Models — Learn Together — Part 4]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/most-common-topic-fine-tuning-large-language-models-learn-together-part-4-d9d9f042af45?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/600/1*nCdz2UyLk_dfnIrYrZAPuQ.png" width="600"></a></p><p class="medium-feed-snippet">Previous articles (Part2, Part3) just contain examples of pre-trained LLMs. The important thing about LLMs is that you can fine-tune any&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/most-common-topic-fine-tuning-large-language-models-learn-together-part-4-d9d9f042af45?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/most-common-topic-fine-tuning-large-language-models-learn-together-part-4-d9d9f042af45?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/d9d9f042af45</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[llama-3]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Sat, 19 Apr 2025 13:00:05 GMT</pubDate>
            <atom:updated>2025-04-19T13:00:05.284Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Most Common Topic: Large Language Models for NLG Task — Learn Together — Part 3]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/most-common-topic-large-language-models-for-nlg-task-learn-together-part-3-b3ef357a60a1?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/1200/1*8L6nstUsbpLz7DsIm_-a4g.png" width="1200"></a></p><p class="medium-feed-snippet">We emphasize LLMs for the natural language generation(NLG) tasks. We see that how LLMs can be used for this. Firstly, we remembered Part 1:</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/most-common-topic-large-language-models-for-nlg-task-learn-together-part-3-b3ef357a60a1?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/most-common-topic-large-language-models-for-nlg-task-learn-together-part-3-b3ef357a60a1?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/b3ef357a60a1</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Fri, 18 Apr 2025 14:01:45 GMT</pubDate>
            <atom:updated>2025-04-18T14:01:45.914Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Most Common Curious Topic: Large Language Models for NLU Task? Learn Together — Part 2]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-for-nlu-task-learn-together-part-2-47481b9f9c6f?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/681/1*KLBXbhJUBD3TtXUBeARY0w.png" width="681"></a></p><p class="medium-feed-snippet">We emphasize LLMs for the NLU tasks. We see that how LLMs can be used for this. Firstly, we remembered Part 1:</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-for-nlu-task-learn-together-part-2-47481b9f9c6f?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-for-nlu-task-learn-together-part-2-47481b9f9c6f?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/47481b9f9c6f</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[hugging-face]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 18:23:58 GMT</pubDate>
            <atom:updated>2025-04-17T18:25:59.445Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Most Common Curious Topic: Large Language Models — What is it exactly? Learn Together -  Part 1]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-what-is-it-exactly-learn-together-part-1-e7d7f66f2114?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/600/1*buwsgdirV8pR282ZzOZjcw.png" width="600"></a></p><p class="medium-feed-snippet">Nowadays, many sectors use AI applications for related tasks. These AI applications are based on LLMs, generally. Many examples are given&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-what-is-it-exactly-learn-together-part-1-e7d7f66f2114?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/most-common-curious-topic-large-language-models-what-is-it-exactly-learn-together-part-1-e7d7f66f2114?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d7f66f2114</guid>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[transformers]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Thu, 17 Apr 2025 15:30:15 GMT</pubDate>
            <atom:updated>2025-04-17T18:26:19.656Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Introduction AI & Free AI Courses — Accelerate Your Career]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/introduction-ai-free-ai-courses-accelerate-your-career-e8115a568efe?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/2560/1*E0yEvGDqXof63L66vR1r3A.jpeg" width="2560"></a></p><p class="medium-feed-snippet">Artificial intelligence (AI) encompasses a range of technologies that empower computers to carry out complex tasks&#x200A;&#x2014;&#x200A;such as interpreting&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/introduction-ai-free-ai-courses-accelerate-your-career-e8115a568efe?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/introduction-ai-free-ai-courses-accelerate-your-career-e8115a568efe?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8115a568efe</guid>
            <category><![CDATA[free-course]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Tue, 15 Apr 2025 21:27:19 GMT</pubDate>
            <atom:updated>2025-04-15T21:27:19.354Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering Methods in LLMs for Multi-label Classification]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@anilguven1055/prompt-engineering-methods-in-llms-for-multi-label-classification-0fd71b9b1c17?source=rss-3a6f2bd44b8d------2"><img src="https://cdn-images-1.medium.com/max/1920/1*5oizX0ez3H4wozDo0wDQbw.png" width="1920"></a></p><p class="medium-feed-snippet">Prompt engineering enhances the performance of large language models (LLMs) by using natural language prompts to access their embedded&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@anilguven1055/prompt-engineering-methods-in-llms-for-multi-label-classification-0fd71b9b1c17?source=rss-3a6f2bd44b8d------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@anilguven1055/prompt-engineering-methods-in-llms-for-multi-label-classification-0fd71b9b1c17?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/0fd71b9b1c17</guid>
            <category><![CDATA[multitasking]]></category>
            <category><![CDATA[classification]]></category>
            <category><![CDATA[prompt]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[large-language-models]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Mon, 14 Apr 2025 19:27:42 GMT</pubDate>
            <atom:updated>2025-04-15T21:29:44.883Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Türkçe Ürün Yorumu Analizi — Python ile Dil Modelleri]]></title>
            <link>https://medium.com/@anilguven1055/t%C3%BCrk%C3%A7e-%C3%BCr%C3%BCn-yorumu-analizi-python-ile-dil-modelleri-c8ccd1551e37?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8ccd1551e37</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[text-mining]]></category>
            <category><![CDATA[language-model]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Fri, 23 Dec 2022 14:44:28 GMT</pubDate>
            <atom:updated>2022-12-23T19:55:25.224Z</atom:updated>
            <content:encoded><![CDATA[<h3>Türkçe Ürün Yorumları Analizi — Python ile Dil Modelleri</h3><p>Bu yazımızda dil modelleri ile Türkçe duygu analizi çalışması anlatılmaktadır. HepsiBurada sitesine ait ürün yorumlarını içeren veri seti üzerinde dil modelleri ile duygu analizi gerçekleştirilmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*byu1oSYIZFkryhvsZpHeRg.png" /></figure><h4>Veri Setinin Okunması</h4><p>Python ile dosya okuma işlemi için fonksiyonu yazıyoruz.</p><pre>def readFile(fileName):<br>    file = open(fileName, encoding = &#39;utf-8&#39;)<br>    rows = file.readlines() #read all lines<br>    file.close()<br><br>    file_ = []<br>    for row in rows:<br>        row = row.lower() #lower text<br>        file_.append(str(satir).rstrip(&quot;\n&quot;))<br><br>    return file_</pre><p>Veri setini ve etkisiz kelimeleri okuma işlemini gerçekleştiriyoruz. Etkisiz kelimeler genişletilerek yeni .txt dosyası oluşturulmuştur (Dosyalar ve kod github’da bulunmaktadır.).</p><pre>files = readFile(&#39;hepsiS1.txt&#39;)<br>stopwords = readFile(&#39;turkish_stopwordsV3.txt&#39;)</pre><h4>Kelimeleri Saydırma</h4><p>Dosyadaki toplam kelimeleri saydırma işlemini gerçekleştirebilirsiniz (ön-işlem uygulanmadan)</p><pre>from nltk.tokenize import word_tokenize<br>nltk.download(&#39;punkt&#39;)<br>total_word = []<br>for txt in files:<br>  #tokenize sentences<br>  text_tokens = word_tokenize(txt)<br>  for token in text_tokens:<br>    total_word.append(token)<br>print(&quot;Toplam kelime sayısı: &quot; + str(len(total_word)))<br>#obtain unique words<br>total_words = list(set(total_word))<br>print(&quot;Unique kelime sayısı: &quot; + str(len(total_words)))</pre><h4>Cümleleri Tokenlara (belirteç) Ayrıştırma ve Eğitim için csv Oluşturma</h4><p>Cümleler eğitim aşaması öncesinde noktalama işaretleri silme, kök alma, etkisiz kelimeleri silme gibi ön işlemlerden geçirilmelidir. Veri setinin okunması öncesinde <a href="https://zeyrek.readthedocs.io/en/latest/">zeyrek </a>kütüphanesi ile ayrıca kök alma işlemi gerçekleştirilmiştir.</p><pre>import csv<br>import nltk<br>from nltk.tokenize import word_tokenize<br>#create csv file<br>with open(&#39;hepsiS1.csv&#39;, &#39;w&#39;, newline=&#39;&#39;,encoding=&#39;utf-8&#39;) as file:<br>    fieldnames = [&#39;labels&#39;, &#39;text&#39;]<br>    #define dictionary writer<br>    writer = csv.DictWriter(file, fieldnames=fieldnames)<br>    writer.writeheader()<br>    ind = 0<br>    label = 0<br>    #read row in files<br>    for row in files:   <br>      #tokenize sentence<br>      text_tokens = word_tokenize(row)<br>      #remove stopwords in sentence<br>      tokens_without_sw = [word for word in text_tokens if not word in stopwords]<br>      #new sentence after processes<br>      filtered_sentence = (&quot; &quot;).join(tokens_without_sw)   <br>      writer.writerow({&#39;labels&#39;: label, &#39;text&#39;: row})<br>      ind += 1<br>      if ind == 13676: #change label according to dataset&#39;s index<br>        label += 1</pre><h4>Eğitim csv’si Okunması ve DataFrame Oluşturma</h4><p>Oluşturulan eğitim dosyası okunduktan sonra pandas kütüphanesi aracılığıyla DataFrame’e aktarılmaktadır. Dataframe içerisinde veri setinin etiketleri kategorik olarak ayarlanmaktadır.</p><pre>import pandas as pd<br>df=pd.read_csv(&quot;hepsiS1.csv&quot;)<br>df.columns=[&quot;labels&quot;,&quot;text&quot;]<br>df.labels=pd.Categorical(df.labels)<br>df[&#39;labels&#39;] = pd.factorize(df.labels)[0]</pre><h4>Model Eğitme için Eğitim-Geçerleme Verilerinin Ayrıştırılması</h4><p>Modellerin veya makine öğrenme yöntemlerin kullanılmasından önce veri seti eğitim (train) ve geçerleme (validation) veya test olarak ayrıştırılmalıdır.</p><pre>import torch,sklearn<br>from sklearn.model_selection import train_test_split<br><br># split a dataset into train and test sets<br>train_df, eval_df = train_test_split(df, test_size=0.2)</pre><h4>BERT-ELECTRA Dil Modellerinin Eğitilmesi</h4><p>Eğitim için dil modelleri tercih edilmiştir. <a href="https://huggingface.co/">Huggingface </a>sitesinde yer alan Türkçe modelleri ayrıca kullanılabilmektedir.</p><p>Model parametreler belirtilerek eğitim seti (train_df) ile beraber eğitim işlemi gerçekleştirilmektedir (num_labels: etiket sayısı, num_train_epochs: epok sayısı).</p><pre>from simpletransformers.classification import ClassificationModel<br>#Using BERT model and defining parameters<br>modelBert = ClassificationModel(&#39;bert&#39;, &#39;bert-base-multilingual-uncased&#39;, num_labels=2, <br>                            args={&#39;reprocess_input_data&#39;: True, &#39;overwrite_output_dir&#39;: True, &#39;num_train_epochs&#39;: 3})<br><br>modelBert.train_model(train_df, acc=sklearn.metrics.accuracy_score)<br><br>#Using ELECTRA model and defining parameters<br>modelElectra = ClassificationModel(&#39;electra&#39;, &#39;dbmdz/electra-base-turkish-cased-discriminator&#39;, num_labels=2, <br>                            args={&#39;reprocess_input_data&#39;: True, &#39;overwrite_output_dir&#39;: True, &#39;num_train_epochs&#39;: 3})<br><br>modelElectra.train_model(train_df, acc=sklearn.metrics.accuracy_score)</pre><h4>Dil Modellerinin Test Edilmesi</h4><p>Eğitilen model ile modelin test edilmesi işlemi uygulanmaktadır. Test işlemi için ayrıştırılan geçerleme (eval_df) seti kullanılmıştır.</p><pre>from sklearn.metrics import accuracy_score<br>#Testing for BERT model<br>test = eval_df <br>result, model_outputs, wrong_predictions = modelBert.eval_model(test)<br>predictions = model_outputs.argmax(axis=1)<br>actuals = test.labels.values<br>print(accuracy_score(actuals, predictions))</pre><p><strong>Kaynakça</strong></p><p>GitHub: <a href="https://github.com/anil1055/Turkish_Product_Review_Analysis_with_Language_Models"><em>https://github.com/anil1055/Turkish_Product_Review_Analysis_with_Language_Models</em></a></p><p>Yayın: <em>Guven, Z. A. (2021, September). The Effect of BERT, ELECTRA and ALBERT Language Models on Sentiment Analysis for Turkish Product Reviews. In 2021 6th International Conference on Computer Science and Engineering (UBMK) (pp. 629–632). </em><a href="https://ieeexplore.ieee.org/document/9559007"><em>IEEE link</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8ccd1551e37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dil Modelleri — Transformers, BERT, RoBERTa, ELECTRA, vb.]]></title>
            <link>https://medium.com/@anilguven1055/dil-modelleri-transformers-bert-roberta-electra-vb-a9edbbdd455d?source=rss-3a6f2bd44b8d------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9edbbdd455d</guid>
            <category><![CDATA[derin-ogrenme]]></category>
            <category><![CDATA[bert]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[doğal-dil-işleme]]></category>
            <category><![CDATA[language-model]]></category>
            <dc:creator><![CDATA[Anil Guven]]></dc:creator>
            <pubDate>Wed, 21 Dec 2022 20:58:30 GMT</pubDate>
            <atom:updated>2022-12-21T20:58:30.130Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dil Modelleri — Transformers, BERT, RoBERTa, ELECTRA, vb.</h3><p>Dil modelleri (DM), dil alanını temsil etmek için tasarlanmış bir makine öğrenimi modelidir. Soru cevaplama, özetleme, sınıflandırma, boşluk doldurma gibi birçok doğal dil işleme görevlerinde kullanılmaktadır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*RhIpCt8PcHUw9RwlLlobOA.png" /></figure><p>DM, kelime tahminini belirlemek için metinlerin gövdelerini analiz etmektedir. DM, tek yönlü ve çift yönlü olmak üzere ikiye ayrılmaktadır.</p><ul><li>Tek yönlü DM, girdi olarak token dizisi verildiğinde diziyi çarpanlarına ayırmaktadır ve diziye bir olasılık atamaktadır[1]. Tek yönlü dil modeline Transformers örnek verilebilir. Transformers, yalnızca dikkat mekanizmalarına dayanmaktadır, yineleme ve kıvrımlardan (convolution) tamamen vazgeçmektedir. Transformers mimarisi, eğitim verileri ve model boyutu ile ölçeklenmektedir, paralel eğitimi kolaylaştırır ve uzun boyutlu dizi özelliklerini yakalamaktadır [2].</li><li>Çift yönlü DM’nde ise girdi dizisi ve konum ile beraber kelimenin sol ve sağ bağlamı da kullanılarak girdi dizisine bir olasılık atanmaktadır [1]. Çift yönlü dil modellerine ise ELMO, BERT, ELECTRA örnektir. Bu yazıda çift yönlü dil modelleri açıklanmaktadır.</li></ul><h3>BERT</h3><p>BERT modeli; Transformer temelli çift yönlü kodlayıcı gösterimidir. Çoklu, bağlamsal, çift yönlü kelime gösterimleri oluşturmaktadr. Maskelenmiş dil modeli (MLM) adı verilen eğitim aracı yöntemi kullanmaktadır. MLM, girişteki bazı belirteçleri (token) rastgele maskelemektedir. Model, maskelenen kelimenin aslını yalnızca bağlama göre tahmin etmeyi amaçlamaktadır. BERT modeli ön-eğitilmiş şekilde metin özetleme, metin üretme, soru cevaplama, makine çevirisi gibi farklı görevler için de kullanılabilmektedir [3].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*hTlnHlReQZnCRKsAbUjSjA.png" /><figcaption>BERT modelinin ön-eğitim ve görevlere göre ince ayar aşaması</figcaption></figure><p>BERT’in yapısında iki aşama bulunmaktadır; ön-eğitim ve ince ayar. Ön-eğitim sırasında, model farklı ön-eğitim aşamaları üzerindeki etiketlenmemiş veriler ile eğitilmektedir. İnce ayar aşamasında, BERT modeli ilk önce önceden eğitilmiş parametrelerle başlatılmaktadır. Sonra tüm parametreler aşağı akıştaki etiketli veriler kullanılarak uygulanacak göreve göre hassas şekilde ayarlanmaktadır [3].</p><blockquote>Türkçe için geliştirilmiş ve ön-eğitilmiş BERT modelleri bulunmaktadır. BERT’in çoklu dil desteğiyle eğitilmiş <a href="https://huggingface.co/bert-base-multilingual-uncased">BERT-Multilingual</a> modeli, en büyük Wikipedia verisi ile Türkçe dahil 102 dilde eğitilmiş bir ön eğitilmiş modeldir [4: yayınımı inceleyebilirsiniz]. Ayrıca sadece Türkçe dili için geliştirilen <a href="https://huggingface.co/dbmdz/bert-base-turkish-uncased">BERT-Tr</a> modeli mevcuttur. Bu model, Türkçe OSCAR külliyatı (corpus), yeni bir Wikipedia dökümü, çeşitli OPUS külliyatının filtrelenmiş ve cümle bölümlenmiş versiyonu üzerinde eğitilmiştir [5,6: yayınlarımı inceleyebilirsiniz].</blockquote><h3>ELECTRA</h3><p>ELECTRA, BERT’e göre daha az hesaplama kullanarak transformer ağlarını önceden eğitmek için kullanılmaktadır. ELECTRA modelleri, başka sinir ağının ürettiği “gerçek” giriş belirteçleri ile “sahte” giriş belirteçlerini ayırt etmektedir. Modelin amacı, giriş belirteçlerini küçük bir transformer ağı tarafından üretilen negatif örneklerden ayırt etmek için bir metin kodlayıcıyı eğitmektir. Maskelenmiş dil modellemesine kıyasla, hesaplama açısından daha verimli performans göstermektedir [7]. Aşağıda yer alan şekil incelendiğinde, maskelenmiş “cooked” kelimesini Normak DM “ate” olarak bulurken, ELECTRA modeli bu kelimenin değişmiş (replaced) olduğunu tespit etmektedir.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*wu4WceEgwkA9RiJBig1pIQ.png" /><figcaption>ELECTRA modelinin işleyişi</figcaption></figure><blockquote>ELECTRA üzerinde Türkçe için oluşturulmuş ön-eğitilmiş modeller bulunmaktadır. <a href="https://huggingface.co/dbmdz/electra-base-turkish-cased-discriminator">ELECTRA-Tr</a> modeli ile sınıflandırma gibi görevler uygulanabilmektedir [4,6: yayınlarımı inceleyebilirsiniz].</blockquote><h3>ALBERT</h3><p>ALBERT modeli, BERT’in bellek limiti ve iletişim ek yükünü sorunundan dolayı oldukça az parametreye sahip olarak geliştirilmiştir. ALBERT, önceden eğitilmiş modellerin ölçeklendirilmesindeki başlıca engelleri kaldıran iki parametre azaltma tekniği içermektedir. İlki, çarpanlara ayrılmış gömme (embedding) parametreleştirmesidir. Matrisi iki küçük matrise yerleştiren büyük kelime dağarcığını ayrıştırarak, gizli katmanların boyutunu kelime gömme boyutundan ayrıştırılmaktadır. İkinci teknikte ise katmanlar arası parametre paylaşılmaktadır. Bu teknik, parametrenin ağın derinliği ile büyümesini engellemektedir. Her iki teknik BERT için parametre sayısını önemli ölçüde azaltmaktadır. BERT modeline benzer bir ALBERT konfigürasyonu 18 kat daha az parametreye sahiptir ve yaklaşık 1,7 kat daha hızlı eğitilebilmektedir [8].</p><blockquote>ALBERT üzerinde Türkçe için oluşturulmuş ön-eğitilmiş modeller bulunmaktadır. Örnek bir ön-eğitilmiş <a href="https://huggingface.co/loodos/albert-base-turkish-uncased">ALBERT-Tr</a> modeliyle sınıflandırma gibi belirli doğal dil işleme görevleri gerçekleştirilmektedir [4,6: yayınlarımı inceleyebilirsiniz].</blockquote><h3>RoBERTa</h3><p>BERT modeli için yüksek boyutlu verilerin eğitilmesi uzun sürdüğünden, eğitim maliyetlidir. Ayrıca uygun hipermetrelerin seçimi de modelin başarısı, zaman ve maliyet açısından da önemlidir. RoBERTa modeli, Robustly Optimized BERT, bu nedenle geliştirilmiştir. Model, BERT’in ön eğitim aşamasında değişiklikler uygulamaya dayanmaktadır. Bu değişiklikler, daha uzun diziler, maskeleme yöntemini statik yerine dinamik uygulama ve daha fazla veriler üzerinden daha büyük gruplar kullanmaktır. Ek olarak, BERT modelindeki sonraki cümle tahmin amacı kaldırılmıştır [9].</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/565/1*ax4rSE_xJGCM0BkY_ij4ug.png" /><figcaption>RoBERTa modeli işleyişi</figcaption></figure><p>Şekil incelendiğinde RoBERTa modeli, bir girdi span ve bağlamı (span sentence) almaktadır. Model, [CLS] belirtecinin gömülmesini, tüm tokenların ortalama gömülmesini ve span uzunluğunu birleştirerek sınıflandırıcıya gönderilmektedir [10].</p><h4>Kaynakça</h4><p><em>[1] F. Petroni et al., “Language models as knowledge bases?,” in EMNLPIJCNLP 2019–2019 Conference on Empirical Methods in Natural Language Processing and 9th International Joint Conference on Natural Language Processing, Proceedings of the Conference, 2020, pp. 2463–2473.</em></p><p><em>[2] Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., … &amp; Polosukhin, I. (2017). Attention is all you need. Advances in neural information processing systems, 30.</em></p><p><em>[3] J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, “BERT: Pretraining of deep bidirectional transformers for language understanding,” in NAACL HLT 2019–2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies — Proceedings of the Conference, 2019, vol. 1, pp. 4171–4186.</em></p><p><em>[4] Guven, Z. A. (2021, September). The Effect of BERT, ELECTRA and ALBERT Language Models on Sentiment Analysis for Turkish Product Reviews. In 2021 6th International Conference on Computer Science and Engineering (UBMK) (pp. 629–632). IEEE.</em></p><p><em>[5] Guven, Z. A. (2021, September). Comparison of BERT models and machine learning methods for sentiment analysis on Turkish tweets. In 2021 6th International Conference on Computer Science and Engineering (UBMK) (pp. 98–101). IEEE.</em></p><p><em>[6] Guven, Z. A. (2022). The Comparison of Language Models with a Novel Text Filtering Approach for Turkish Sentiment Analysis. Transactions on Asian and Low-Resource Language Information Processing.</em></p><p><em>[7] K. Clark, M.-T. Luong, Q. V. Le, and C. D. Manning, “ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators,” Mar. 2020, Accessed: Jun. 04, 2021. [Online]. Available: </em><a href="http://arxiv.org/abs/2003.10555."><em>http://arxiv.org/abs/2003.10555.</em></a></p><p><em>[8] Z. Lan, M. Chen, S. Goodman, K. Gimpel, P. Sharma, and R. Soricut, “ALBERT: A Lite BERT for Self-supervised Learning of Language Representations,” arXiv. 2019, [Online]. Available: </em><a href="http://arxiv.org/abs/1909.11942."><em>http://arxiv.org/abs/1909.11942.</em></a></p><p><em>[9] Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., … &amp; Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692.</em></p><p><em>[10] Chernyavskiy, A., Ilvovsky, D., &amp; Nakov, P. (2021, September). Transformers:“The End of History” for Natural Language Processing?. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases (pp. 677–693). Springer, Cham.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a9edbbdd455d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>