<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Machine Learning on jwhogg</title><link>https://jwhogg.github.io/tags/machine-learning/</link><description>Recent content in Machine Learning on jwhogg</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 18 Jun 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://jwhogg.github.io/tags/machine-learning/index.xml" rel="self" type="application/rss+xml"/><item><title>Edge AI: ML inference in the browser</title><link>https://jwhogg.github.io/articles/ml_inference_browser/</link><pubDate>Tue, 18 Jun 2024 00:00:00 +0000</pubDate><guid>https://jwhogg.github.io/articles/ml_inference_browser/</guid><description>&lt;p&gt;Recently, I stumbled across a &lt;a href="https://whisper.ggerganov.com/"&gt;guy who ported&lt;/a&gt; OpenAI&amp;rsquo;s &lt;a href="https://github.com/openai/whisper"&gt;Whisper&lt;/a&gt; model into c++, in various sizes, allowing the model to be run on-device, at impressive speed.&lt;/p&gt;
&lt;!-- &lt;span class="text-gray-500 text-sm"&gt;
 [(source)](https://github.com/ggerganov/whisper.cpp) 
&lt;/span&gt;
 --&gt;
&lt;!-- ![whisper running on iphone](/images/whisper_iphone.gif#smaller) --&gt;
&lt;p&gt;I went down a rabbit-hole, and found a whole family of popular models that had been ported to work on-device, from the browser:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://websd.mlc.ai/#text-to-image-generation-demo"&gt;Stable difusion running in browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jobergum/browser-ml-inference?tab=readme-ov-file"&gt;Text emotion prediction in browser&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/ggerganov/llama.cpp"&gt;Llama c++&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://webllm.mlc.ai/"&gt;Web LLM&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hyuto.github.io/yolov5-onnxruntime-web/"&gt;YOLO in the browser&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;figure&gt;
 &lt;img
 src="https://jwhogg.github.io/images/yolo_browser.webp#smaller"
 alt="yolo in the browser"
 loading="lazy"
 
 /&gt;
 &lt;figcaption&gt;yolo in the browser&lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Word2Vec Overview</title><link>https://jwhogg.github.io/articles/word2vec_intro/</link><pubDate>Wed, 12 Jun 2024 00:00:00 +0000</pubDate><guid>https://jwhogg.github.io/articles/word2vec_intro/</guid><description>&lt;p&gt;In this article we will introduce the context surrounding word2vec, including the motivation for distributed word embeddings, how the Continious Bag-of-Words and Skip-gram algorithms work, and the advancements since the original paper was released. We will also go into the training of the neural network, so it is assumed you have some knowledge on this.&lt;/p&gt;
&lt;span class="text-gray-500 text-sm"&gt;
 
These 2 papers introduced word2vec to the world back in 2013: 
&lt;/span&gt;

&lt;table&gt;
	&lt;thead&gt;
			&lt;tr&gt;
					&lt;th&gt;&lt;figure&gt;
 &lt;img
 src="https://jwhogg.github.io/images/word2vec_paper_1.webp#smaller"
 alt="paper1"
 loading="lazy"
 
 /&gt;
 &lt;figcaption&gt;paper1&lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/th&gt;
					&lt;th&gt;&lt;figure&gt;
 &lt;img
 src="https://jwhogg.github.io/images/word2vec_paper_2.webp#smaller"
 alt="paper2"
 loading="lazy"
 
 /&gt;
 &lt;figcaption&gt;paper2&lt;/figcaption&gt;
 &lt;/figure&gt;
&lt;/th&gt;
			&lt;/tr&gt;
	&lt;/thead&gt;
	&lt;tbody&gt;
			&lt;tr&gt;
					&lt;td&gt;&lt;span class="text-gray-500 text-sm"&gt;
 [Word2Vec Paper 1](https://arxiv.org/pdf/1301.3781)- introducing CBOW and Skip-Gram
&lt;/span&gt;
&lt;/td&gt;
					&lt;td&gt;&lt;span class="text-gray-500 text-sm"&gt;
 [Word2Vec Paper 2](https://arxiv.org/pdf/1310.4546)- Performance Improvements
&lt;/span&gt;
&lt;/td&gt;
			&lt;/tr&gt;
	&lt;/tbody&gt;
&lt;/table&gt;


&lt;h3 id="motivation"&gt;
 Motivation
&lt;/h3&gt;
&lt;p&gt;For many NLP tasks, we need to learn on data which can&amp;rsquo;t be easily represented numerically. For example, let&amp;rsquo;s look at the popular &lt;a href="https://huggingface.co/datasets/stanfordnlp/imdb/viewer/plain_text/train"&gt;IMDB dataset&lt;/a&gt;, which gives reviews in one column, and a binary sentiment label in the next:&lt;/p&gt;</description></item></channel></rss>