<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>multi-armed-bandit on AI Logs</title><link>https://drafts.ragv.in/tags/multi-armed-bandit/</link><description>Recent content in multi-armed-bandit on AI Logs</description><generator>Hugo</generator><language>en-us</language><copyright>2025 Raghava Dhanya · License</copyright><lastBuildDate>Thu, 30 Jun 2022 16:54:09 +0530</lastBuildDate><atom:link href="https://drafts.ragv.in/tags/multi-armed-bandit/index.xml" rel="self" type="application/rss+xml"/><item><title>Python with a Dash of C++: Optimizing Recommendation Serving</title><link>https://drafts.ragv.in/posts/python-with-a-dash-of-cpp-optimizing/</link><pubDate>Thu, 30 Jun 2022 16:54:09 +0530</pubDate><guid>https://drafts.ragv.in/posts/python-with-a-dash-of-cpp-optimizing/</guid><description>&lt;p&gt;Serving recommendation to 200+ millions of users for thousands of candidates with less than 100ms is &lt;strong&gt;hard&lt;/strong&gt; but doing that in Python is &lt;strong&gt;harder&lt;/strong&gt;. Why not add some compiled spice to it to make it faster? Using Cython you can add C++ components to your Python code. Isn&amp;rsquo;t all machine learning and statistics libraries already written in C and Cython to make them super fast? Yes. But there&amp;rsquo;s still some optimizations left on the table. I&amp;rsquo;ll go through how I optimized some of our sampling methods in the recommendation system using C++.&lt;/p&gt;</description></item><item><title>Go faster with Go: Golang for ML Serving</title><link>https://drafts.ragv.in/posts/golang-for-machine-learning-serving/</link><pubDate>Mon, 20 Jun 2022 21:36:00 +0530</pubDate><guid>https://drafts.ragv.in/posts/golang-for-machine-learning-serving/</guid><description>&lt;p&gt;So the ask is to do &lt;strong&gt;3 Million Predictions per second&lt;/strong&gt; with as little resources as possible. Thankfully its one of the simpler model of Recommendation systems, Multi Armed Bandit(MAB).
Multi Armed bandit usually involves sampling from distribution like &lt;a href="https://en.wikipedia.org/wiki/Beta_distribution"&gt;Beta Distribution&lt;/a&gt;. That&amp;rsquo;s where the most time is spent. If we can concurrently do as many sampling as we can, we&amp;rsquo;ll use the resources well. Maximizing Resource utilization is the key to reducing overall resources needed for the model.&lt;/p&gt;</description></item></channel></rss>